diff options
author | cvs2git <cvs2git> | 2004-04-07 09:08:35 +0000 |
---|---|---|
committer | cvs2git <cvs2git> | 2004-04-07 09:08:35 +0000 |
commit | 022491d9d2723ca4d7d0718cdb1fd67e7652428e (patch) | |
tree | fc1e50c0d78ecc401ef2214a6a11ee07242be0f8 /rt/html/Admin | |
parent | 35effa1bf4ac902547615c816960bbc8db8e7256 (diff) |
This commit was manufactured by cvs2svn to create tag 'NET_WHOIS_RAW_0_31'.NET_WHOIS_RAW_0_31
Diffstat (limited to 'rt/html/Admin')
65 files changed, 0 insertions, 5031 deletions
diff --git a/rt/html/Admin/Elements/AddCustomFieldValue b/rt/html/Admin/Elements/AddCustomFieldValue deleted file mode 100644 index 8850734f2..000000000 --- a/rt/html/Admin/Elements/AddCustomFieldValue +++ /dev/null @@ -1,44 +0,0 @@ -%# BEGIN LICENSE BLOCK -%# -%# Copyright (c) 1996-2003 Jesse Vincent <jesse@bestpractical.com> -%# -%# (Except where explictly superceded by other copyright notices) -%# -%# This work is made available to you under the terms of Version 2 of -%# the GNU General Public License. A copy of that license should have -%# been provided with this software, but in any event can be snarfed -%# from www.gnu.org. -%# -%# This work is distributed in the hope that it will be useful, but -%# WITHOUT ANY WARRANTY; without even the implied warranty of -%# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -%# General Public License for more details. -%# -%# Unless otherwise specified, all modifications, corrections or -%# extensions to this work which alter its source code become the -%# property of Best Practical Solutions, LLC when submitted for -%# inclusion in the work. -%# -%# -%# END LICENSE BLOCK -<b><&|/l&>Add Value</&></b></b></b></b> -<TABLE BORDER="0"> -<TR><TD><small> -<&|/l&>Sort</&>:<br> -<input name="CustomField-<% $CustomField->Id %>-AddValue-SortOrder" size="5"> -</TD> -<TD><small> -<&|/l&>Name</&>:<br> -<input size=20 name="CustomField-<% $CustomField->Id %>-AddValue-Name"> -</TD> -<TD><small> -<&|/l&>Description</&>:<br> -<input size="60" name="CustomField-<% $CustomField->Id %>-AddValue-Description"> -</TD></TR> -</TABLE> - -<%init> -</%init> -<%args> -$CustomField => undef -</%args> diff --git a/rt/html/Admin/Elements/CreateUserCalled b/rt/html/Admin/Elements/CreateUserCalled deleted file mode 100644 index 8ceccca73..000000000 --- a/rt/html/Admin/Elements/CreateUserCalled +++ /dev/null @@ -1,26 +0,0 @@ -%# BEGIN LICENSE BLOCK -%# -%# Copyright (c) 1996-2003 Jesse Vincent <jesse@bestpractical.com> -%# -%# (Except where explictly superceded by other copyright notices) -%# -%# This work is made available to you under the terms of Version 2 of -%# the GNU General Public License. A copy of that license should have -%# been provided with this software, but in any event can be snarfed -%# from www.gnu.org. -%# -%# This work is distributed in the hope that it will be useful, but -%# WITHOUT ANY WARRANTY; without even the implied warranty of -%# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -%# General Public License for more details. -%# -%# Unless otherwise specified, all modifications, corrections or -%# extensions to this work which alter its source code become the -%# property of Best Practical Solutions, LLC when submitted for -%# inclusion in the work. -%# -%# -%# END LICENSE BLOCK -<FORM METHOD=get ACTION="<% $RT::WebPath %>/Admin/Users/Create.html"> -<&|/l&>New user called</&> <INPUT NAME="Name" size=10><input type=submit value="<&|/l&>Create</&>"> -</form> diff --git a/rt/html/Admin/Elements/EditCustomField b/rt/html/Admin/Elements/EditCustomField deleted file mode 100644 index 7baed168b..000000000 --- a/rt/html/Admin/Elements/EditCustomField +++ /dev/null @@ -1,127 +0,0 @@ -%# BEGIN LICENSE BLOCK -%# -%# Copyright (c) 1996-2003 Jesse Vincent <jesse@bestpractical.com> -%# -%# (Except where explictly superceded by other copyright notices) -%# -%# This work is made available to you under the terms of Version 2 of -%# the GNU General Public License. A copy of that license should have -%# been provided with this software, but in any event can be snarfed -%# from www.gnu.org. -%# -%# This work is distributed in the hope that it will be useful, but -%# WITHOUT ANY WARRANTY; without even the implied warranty of -%# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -%# General Public License for more details. -%# -%# Unless otherwise specified, all modifications, corrections or -%# extensions to this work which alter its source code become the -%# property of Best Practical Solutions, LLC when submitted for -%# inclusion in the work. -%# -%# -%# END LICENSE BLOCK -<& /Elements/ListActions, actions => \@results &> - - -<FORM METHOD=POST ACTION="CustomField.html"> -<INPUT TYPE=HIDDEN NAME="CustomField" VALUE="<%$id %>"> -<INPUT TYPE=HIDDEN name="Queue" value="<%$Queue%>"> - -<TABLE WIDTH="100%" BORDER="0"> -<TR><TD ALIGN="RIGHT"> -<&|/l&>Name</&>: -</TD><TD> -<input name="Name" VALUE="<%$CustomFieldObj->Name%>" SIZE=20> -</TD></TR> -<TR><TD ALIGN="RIGHT"> -<&|/l&>Description</&>: -</TD><TD> -<input name="Description" VALUE="<%$CustomFieldObj->Description%>" SIZE=80> -</TD></TR> -<TR><TD ALIGN="RIGHT"> -<&|/l&>Type</&>: -</TD><TD> -<& /Admin/Elements/SelectCustomFieldType, Name => "Type", Default => $CustomFieldObj->Type &> -</TD></TR> -<TR><TD> -</TD><TD> -<INPUT TYPE=HIDDEN NAME="SetEnabled" VALUE="1"> -<INPUT TYPE=CHECKBOX NAME="Enabled" VALUE="1" <%$EnabledChecked%>> <&|/l&>Enabled (Unchecking this box disables this custom field)</&> -</TD></TR> -</TABLE> - -<P> -% if ($CustomFieldObj->Id and $CustomFieldObj->Type =~ /Select/) { -<h2><&|/l&>Values</&></h2> -<font size=-1> -<& /Admin/Elements/EditCustomFieldValues, CustomField => $CustomFieldObj &> -<& /Admin/Elements/AddCustomFieldValue, CustomField => $CustomFieldObj &> -</font> -% } -<&/Elements/Submit&> -</FORM> - - - -<%INIT> - -my $CustomFieldObj = RT::CustomField->new($session{'CurrentUser'}); -my $EnabledChecked = "CHECKED"; -my (@results); - -if (! $CustomField ) { - $title = loc("Create a CustomField"); - $id = 'new'; -} else { - - if ($CustomField eq 'new') { - my ($val, $msg) = $CustomFieldObj->Create(Queue => $Queue, - Name => $Name, - Type => $Type, - Description => $Description, - ); - Abort(loc("Could not create CustomField", $msg)) unless ($val); - push @results, $msg; - $CustomFieldObj->SetSortOrder($CustomFieldObj->id); - $title = loc('Created CustomField [_1]', $CustomFieldObj->Name()); - } else { - $CustomFieldObj->Load($CustomField) || Abort(loc('No CustomField')); - $title = loc('Editing CustomField [_1]', $CustomFieldObj->Name()); - - my @aresults = ProcessCustomFieldUpdates ( - CustomFieldObj => $CustomFieldObj, - ARGSRef => \%ARGS ); - push @results, @aresults; - } - - -$id = $CustomFieldObj->id; - - #we're asking about enabled on the web page but really care about disabled. - my $Disabled = ($Enabled ? 0 : 1); - - if ( ($SetEnabled) and ( $Disabled != $CustomFieldObj->Disabled) ) { - my ($code, $msg) = $CustomFieldObj->SetDisabled($Disabled); - push @results, loc('Enabled status [_1]', loc_fuzzy($msg)); - } - - if ($CustomFieldObj->Disabled()) { - $EnabledChecked =""; - } - -} - - -</%INIT> -<%ARGS> -$id => undef -$title => undef -$Queue => undef -$CustomField => undef -$Type => undef -$Description => undef -$Name => undef -$SetEnabled => undef -$Enabled => undef -</%ARGS> diff --git a/rt/html/Admin/Elements/EditCustomFieldValues b/rt/html/Admin/Elements/EditCustomFieldValues deleted file mode 100644 index 2c9e6d082..000000000 --- a/rt/html/Admin/Elements/EditCustomFieldValues +++ /dev/null @@ -1,42 +0,0 @@ -%# BEGIN LICENSE BLOCK -%# -%# Copyright (c) 1996-2003 Jesse Vincent <jesse@bestpractical.com> -%# -%# (Except where explictly superceded by other copyright notices) -%# -%# This work is made available to you under the terms of Version 2 of -%# the GNU General Public License. A copy of that license should have -%# been provided with this software, but in any event can be snarfed -%# from www.gnu.org. -%# -%# This work is distributed in the hope that it will be useful, but -%# WITHOUT ANY WARRANTY; without even the implied warranty of -%# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -%# General Public License for more details. -%# -%# Unless otherwise specified, all modifications, corrections or -%# extensions to this work which alter its source code become the -%# property of Best Practical Solutions, LLC when submitted for -%# inclusion in the work. -%# -%# -%# END LICENSE BLOCK -<i><&|/l&>(Check box to delete)</&></i> -<ul> -% while (my $v = $values->Next) { -<li> -<INPUT TYPE="text" SIZE="2" NAME="CustomField-<%$CustomField->Id%>-SortOrder<%$v->Id()%>" VALUE="<%$v->SortOrder()%>"> -<input type="checkbox" name="CustomField-<%$CustomField->Id%>-DeleteValue" value="<%$v->id%>"> -<%$v->Name%> -% if ($v->Description) { -<i>(<%$v->Description%>)</i> -% } -</li> -% } -</ul> -<%init> -my $values = $CustomField->Values(); -</%init> -<%args> -$CustomField => undef -</%args> diff --git a/rt/html/Admin/Elements/EditCustomFields b/rt/html/Admin/Elements/EditCustomFields deleted file mode 100644 index 81c984d29..000000000 --- a/rt/html/Admin/Elements/EditCustomFields +++ /dev/null @@ -1,213 +0,0 @@ -%# BEGIN LICENSE BLOCK -%# -%# Copyright (c) 1996-2003 Jesse Vincent <jesse@bestpractical.com> -%# -%# (Except where explictly superceded by other copyright notices) -%# -%# This work is made available to you under the terms of Version 2 of -%# the GNU General Public License. A copy of that license should have -%# been provided with this software, but in any event can be snarfed -%# from www.gnu.org. -%# -%# This work is distributed in the hope that it will be useful, but -%# WITHOUT ANY WARRANTY; without even the implied warranty of -%# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -%# General Public License for more details. -%# -%# Unless otherwise specified, all modifications, corrections or -%# extensions to this work which alter its source code become the -%# property of Best Practical Solutions, LLC when submitted for -%# inclusion in the work. -%# -%# -%# END LICENSE BLOCK -<& /Elements/ListActions, actions => \@actions &> - -<TABLE> -<TR> -<TD VALIGN=TOP> -<h2><%$caption%></h2> -</TD></TR></TABLE> -% if ($CustomFields->Count == 0 ) { -<P><i><&|/l&>(No custom fields)</&></i></P> -% } else { -<TABLE cellspacing=0 cellpadding=2> -% my $count; -% while (my $CustomFieldObj = $CustomFields->Next) { -<TR> - <TD valign="TOP"> -% if ($CustomFieldObj->Name) { - <A HREF="CustomField.html?Queue=<%$id%>&CustomField=<%$CustomFieldObj->id()%>"><b><%$CustomFieldObj->Name%></b></a><br> -% } else { - <A HREF="CustomField.html?Queue=<%$id%>&CustomField=<%$CustomFieldObj->id()%>"><i>(<%loc("no name")%>)</i></a><br> -% } - <%$CustomFieldObj->Description%> - </TD> - <TD valign="TOP"> - <i><% $CustomFieldObj->FriendlyType %></i> - </TD> -% # show 'move up' unless it's the first item -% if ($count++) { - <TD valign="TOP"> - <a href="CustomFields.html?id=<%$id%>&CustomField=<%$CustomFieldObj->id%>&Move=-1"><&|/l&>Move up</&></a> -% } else { - <TD valign="TOP" ALIGN=RIGHT> -% } - -% # show 'move down' unless it's the last item -% if (!$CustomFields->IsLast) { -% $m->print(' | ') if $count > 1; - <a href="CustomFields.html?id=<%$id%>&CustomField=<%$CustomFieldObj->id%>&Move=1"><&|/l&>Move down</&></a> -% } -</TD> -</TR> -% } - -</TABLE> -% } -<FORM METHOD=GET ACTION="CustomFields.html"> -% if ($id) { -<INPUT TYPE="Hidden" NAME="id" VALUE="<%$id%>"> -% } -<input type="checkbox" name="FindDisabledCustomFields"> <&|/l&>Include disabled custom fields in listing.</&> -<input type=submit value="<&|/l&>Go!</&>"> -</FORM> - - -<%INIT> -my $CustomFields = RT::CustomFields->new($session{'CurrentUser'}); -my $QueueObj = RT::Queue->new($session{'CurrentUser'}); -my $caption; - -if ($id) { - $QueueObj->Load($id); -} - -if ($QueueObj->id) { - $CustomFields->LimitToQueue($id); -} -else { - $CustomFields->LimitToGlobal(); -} - -if ($FindDisabledCustomFields) { - $caption = loc("All Custom Fields"); - $CustomFields->{'find_disabled_rows'} = 1; -} else { - $caption = loc("Enabled Custom Fields"); -} - -# {{{ deal with moving sortorder of custom fields -if ($CustomField and $Move) { - my $SourceObj = RT::CustomField->new($session{'CurrentUser'}); - $SourceObj->Load($CustomField) || Abort(loc('No CustomField')); - - my $TargetObj; - my $target_order = $SourceObj->SortOrder + $Move; - while (my $CustomFieldObj = $CustomFields->Next) { - my $this_order = $CustomFieldObj->SortOrder; - - # if we have an exact match, finish the loop now - ($TargetObj = $CustomFieldObj, last) if $this_order == $target_order; - - # otherwise, we need to apropos toward the general direction - # ... first, check the sign is correct - next unless ($this_order - $SourceObj->SortOrder) * $Move > 0; - - # ... next, see if we already have a candidate - if ($TargetObj) { - # ... if yes, compare the delta and choose the smaller one - my $orig_delta = abs($TargetObj->SortOrder - $target_order); - my $this_delta = abs($this_order - $target_order); - next if $orig_delta < $this_delta; - } - - $TargetObj = $CustomFieldObj; - } - - if ($TargetObj) { - # swap their sort order - my ($s, $t) = ($SourceObj->SortOrder, $TargetObj->SortOrder); - $TargetObj->SetSortOrder($s); - $SourceObj->SetSortOrder($t); - # because order changed, we must redo search for subsequent uses - $CustomFields->RedoSearch; - } - - $CustomFields->GotoFirstItem; -} -# }}} - -# {{{ now process the 'copy queue' action -my @actions; -if ($Source and $Source ne $id) { - my $SourceQueue = RT::Queue->new($session{'CurrentUser'}); - $SourceQueue->Load($Source) || Abort(loc("Couldn't load queue")); - my $SourceCustomFields = RT::CustomFields->new($session{'CurrentUser'}); - $SourceCustomFields->LimitToQueue($SourceQueue->id); - - # delete old fields - foreach my $CustomFieldObj ( @{$CustomFields->ItemsArrayRef} ) { - $CustomFieldObj->Delete; - } - - # add new fields - while (my $SourceCustomFieldObj = $SourceCustomFields->Next) { - my $CustomFieldObj = RT::CustomField->new($session{'CurrentUser'}); - my ($val, $msg) = $CustomFieldObj->Create( - id => $SourceCustomFieldObj->id, - Queue => $id, - Name => $SourceCustomFieldObj->Name, - Type => $SourceCustomFieldObj->Type, - Description => $SourceCustomFieldObj->Description, - ); - Abort(loc("Could not create CustomField") . ": $msg") unless ($val); - push @actions, $msg; - - $CustomFieldObj->SetSortOrder($SourceCustomFieldObj->SortOrder); - - # add new values - my $values = $SourceCustomFieldObj->Values(); - while (my $v = $values->Next) { - my ( $addval, $addmsg ) = $CustomFieldObj->AddValue( - Name => $v->Name, - Description => $v->Description, - SortOrder => $v->SortOrder - ); - } - } - - # because content changed, we must redo search for subsequent uses - $CustomFields->RedoSearch; - $CustomFields->GotoFirstItem; -} -# }}} - -# {{{ deal with deleting existing custom fields -foreach my $key (keys %ARGS) { - # {{{ if we're trying to delete the custom field - if ($key =~ /^DeleteCustomField-(\d+)/) { - my $id = $1; - my $CustomFieldObj = RT::CustomField->new($session{'CurrentUser'}); - $CustomFieldObj->Load($id); - my ($retval, $msg) = $CustomFieldObj->Delete; - if ($retval) { - push @actions, loc("Custom field deleted"); - } - else { - push @actions, $msg; - } - } - # }}} -} -# }}} - -</%INIT> -<%ARGS> -$id => 0 -$title => undef -$Move => undef -$Source => undef -$CustomField => undef -$FindDisabledCustomFields => undef -</%ARGS> diff --git a/rt/html/Admin/Elements/EditQueueWatchers b/rt/html/Admin/Elements/EditQueueWatchers deleted file mode 100644 index db39bfb67..000000000 --- a/rt/html/Admin/Elements/EditQueueWatchers +++ /dev/null @@ -1,55 +0,0 @@ -%# BEGIN LICENSE BLOCK -%# -%# Copyright (c) 1996-2003 Jesse Vincent <jesse@bestpractical.com> -%# -%# (Except where explictly superceded by other copyright notices) -%# -%# This work is made available to you under the terms of Version 2 of -%# the GNU General Public License. A copy of that license should have -%# been provided with this software, but in any event can be snarfed -%# from www.gnu.org. -%# -%# This work is distributed in the hope that it will be useful, but -%# WITHOUT ANY WARRANTY; without even the implied warranty of -%# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -%# General Public License for more details. -%# -%# Unless otherwise specified, all modifications, corrections or -%# extensions to this work which alter its source code become the -%# property of Best Practical Solutions, LLC when submitted for -%# inclusion in the work. -%# -%# -%# END LICENSE BLOCK -%if ($Members->Count == 0 ) { -<ul> -<li><i><&|/l&>none</&></i> -% } else { -<i><&|/l&>(Check box to delete)</&></i><br><BR> -<ul> -% while (my $watcher=$Members->Next) { -<li> -<INPUT TYPE=CHECKBOX - NAME="Queue-<%$QueueObj->Id%>-DelWatcher-Type-<%$Watchers->Type%>-Principal-<%$watcher->MemberId%>" - UNCHECKED> -% if ($watcher->MemberObj->IsUser) { -<a href="<%$RT::WebPath%>/Admin/Users/Modify.html?id=<%$watcher->MemberObj->ObjectId%>"> -% } else { -<a href="<%$RT::WebPath%>/Admin/Groups/Modify.html?id=<%$watcher->MemberObj->ObjectId%>"> -% } -<%$watcher->MemberObj->Object->Name%></a> -% } -% } -</ul> - -<%INIT> -my $Members = $Watchers->MembersObj; -</%INIT> - -<%ARGS> -$QueueObj => undef -$Watchers => undef -</%ARGS> - - - diff --git a/rt/html/Admin/Elements/EditScrip b/rt/html/Admin/Elements/EditScrip deleted file mode 100644 index 1f186c233..000000000 --- a/rt/html/Admin/Elements/EditScrip +++ /dev/null @@ -1,158 +0,0 @@ -%# BEGIN LICENSE BLOCK -%# -%# Copyright (c) 1996-2003 Jesse Vincent <jesse@bestpractical.com> -%# -%# (Except where explictly superceded by other copyright notices) -%# -%# This work is made available to you under the terms of Version 2 of -%# the GNU General Public License. A copy of that license should have -%# been provided with this software, but in any event can be snarfed -%# from www.gnu.org. -%# -%# This work is distributed in the hope that it will be useful, but -%# WITHOUT ANY WARRANTY; without even the implied warranty of -%# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -%# General Public License for more details. -%# -%# Unless otherwise specified, all modifications, corrections or -%# extensions to this work which alter its source code become the -%# property of Best Practical Solutions, LLC when submitted for -%# inclusion in the work. -%# -%# -%# END LICENSE BLOCK -<& /Elements/ListActions, actions => \@actions &> - - -<FORM METHOD=POST ACTION="Scrip.html"> -<input type="hidden" name="id" value="<%$id%>"> -<input type="hidden" name="Queue" value="<%$Queue%>"> -<TABLE> -<TR> -<TD ALIGN=RIGHT> -<&|/l&>Description</&>: -</TD> -<TD> -<input Name="Scrip-<%$id%>-Description" value="<%$scrip->Description%>"> -</TR> -<TR> -<TD ALIGN=RIGHT> -<&|/l&>Condition</&>: -</TD> -<TD> -<& /Admin/Elements/SelectScripCondition, Name => "Scrip-$id-ScripCondition", Default => $scrip->ConditionObj->Id &><BR> -</TD> -</TR> -<TR> -<TD ALIGN=RIGHT> -<&|/l&>Custom condition</&>: -</TD> -<TD> -<TEXTAREA COLS=80 ROWS=5 NAME="Scrip-<%$id%>-CustomIsApplicableCode"><%$scrip->CustomIsApplicableCode%></TEXTAREA> -</TD> -</TR> -<TR> -<TD ALIGN=RIGHT> -<&|/l&>Action</&>: -</TD> -<TD> -<& /Admin/Elements/SelectScripAction, Name => "Scrip-$id-ScripAction", Default => $scrip->ActionObj->Id &> -</TD> -</TR> -<TR> -<TD ALIGN=RIGHT> -<&|/l&>Custom action preparation code</&>: -</TD> -<TD> -<TEXTAREA COLS=80 ROWS=5 NAME="Scrip-<%$id%>-CustomPrepareCode"><%$scrip->CustomPrepareCode%></TEXTAREA> -</TD> -</TR> -<TR> -<TD ALIGN=RIGHT> -<&|/l&>Custom action cleanup code</&>: -</TD> -<TD> -<TEXTAREA COLS=80 ROWS=5 NAME="Scrip-<%$id%>-CustomCommitCode"><%$scrip->CustomCommitCode%></TEXTAREA> -</TD> -</TR> -<TR> -<TD ALIGN=RIGHT> -<&|/l&>Stage</&>: -</TD> -<TD> -<& /Admin/Elements/SelectStage, Name => "Scrip-$id-Stage", Default => $scrip->Stage &> -</TD> -</TR> -<TR> -<TD ALIGN=RIGHT> -<&|/l&>Template</&>: -</TD> -<TD> -<& /Admin/Elements/SelectTemplate, Name => "Scrip-$id-Template", Default => $scrip->TemplateObj->Id, Queue => $Queue &> -</TD> -</TR> - -<& /Elements/Submit, Caption => loc("Be sure to save your changes"), Reset => 1 &> -</FORM> -<%init> -my (@actions); - - -my $scrip = new RT::Scrip($session{'CurrentUser'}); - -if ( $id eq 'new' ) { - - my ( $retval, $msg ) = $scrip->Create( - Queue => $Queue, - ScripAction => $ARGS{"Scrip-new-ScripAction"}, - ScripCondition => $ARGS{"Scrip-new-ScripCondition"}, - Template => $ARGS{"Scrip-new-Template"}, - Description => $ARGS{"Scrip-new-Description"}, - CustomPrepareCode => $ARGS{"Scrip-new-CustomPrepareCode"}, - CustomCommitCode => $ARGS{"Scrip-new-CustomCommitCode"}, - CustomIsApplicableCode => $ARGS{"Scrip-new-CustomIsApplicableCode"}, - ); - if ( defined $retval ) { - push @actions, $msg; - } - else { - Abort( $msg); - } -} -elsif ($id) { - my ($val,$msg) =$scrip->Load($id); - if ($val) { - $id = $scrip->id; - } else { - Abort ($msg); - } - my @attribs = qw ( - Queue - ScripAction - ScripCondition - Template - Stage - Description - CustomPrepareCode - CustomCommitCode - CustomIsApplicableCode - ); - my @results = UpdateRecordObject( AttributesRef => \@attribs, - AttributePrefix => 'Scrip-'.$scrip->Id, - Object => $scrip, - ARGSRef => \%ARGS ); - push (@actions, @results); -} - -elsif ($ARGS{'create'}) { - $id = 'new'; -} - -# }}} -</%init> - -<%ARGS> -$id => undef -$title => undef -$Queue => 0 -</%ARGS> diff --git a/rt/html/Admin/Elements/EditScrips b/rt/html/Admin/Elements/EditScrips deleted file mode 100644 index 07a57f47b..000000000 --- a/rt/html/Admin/Elements/EditScrips +++ /dev/null @@ -1,99 +0,0 @@ -%# BEGIN LICENSE BLOCK -%# -%# Copyright (c) 1996-2003 Jesse Vincent <jesse@bestpractical.com> -%# -%# (Except where explictly superceded by other copyright notices) -%# -%# This work is made available to you under the terms of Version 2 of -%# the GNU General Public License. A copy of that license should have -%# been provided with this software, but in any event can be snarfed -%# from www.gnu.org. -%# -%# This work is distributed in the hope that it will be useful, but -%# WITHOUT ANY WARRANTY; without even the implied warranty of -%# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -%# General Public License for more details. -%# -%# Unless otherwise specified, all modifications, corrections or -%# extensions to this work which alter its source code become the -%# property of Best Practical Solutions, LLC when submitted for -%# inclusion in the work. -%# -%# -%# END LICENSE BLOCK -<& /Elements/ListActions, actions => \@actions &> - -<form action="Scrips.html" method="post"> -<input type="hidden" name="id" value="<%$id%>"> - -<P><&|/l&>Current Scrips</&>:</P> -% if ($Scrips->Count == 0 ) { -<P><i><&|/l&>(No scrips)</&></i></P> -% } else { -<TABLE> -<P><i><&|/l&>(Check box to delete)</&></i></P> - -% while (my $scrip = $Scrips->Next ) { -<TR> -<TD> -<input type="checkbox" name="DeleteScrip-<%$scrip->Id%>"> -</TD> -<TD> -<a href="Scrip.html?id=<%$scrip->Id%>&Queue=<%$id%>"><% $scrip->Description || "<i>(".loc('no value').")</i>" |n %></a><br> -<small><&|/l, loc($scrip->ConditionObj->Name), loc($scrip->ActionObj->Name), loc($scrip->TemplateObj->Name) &>[_1] [_2] with template [_3]</&></small> -</TD> -</TR> -% } - -</TABLE> - -% } -<& /Elements/Submit, - Caption => loc("Delete selected scrips"), - Label => loc("Delete") &> -</form> -<%init> -my (@actions); - -my $Scrips = RT::Scrips->new($session{'CurrentUser'}); - - -my $QueueObj = RT::Queue->new($session{'CurrentUser'}); -if ($id) { - $QueueObj->Load($id); -} - -if ($QueueObj->id) { - $Scrips->LimitToQueue($id); -} -else { - $Scrips->LimitToGlobal(); -} - - - - -# {{{ deal with modifying and deleting existing scrips -foreach my $key (keys %ARGS) { - # {{{ if we're trying to delete the scrip - if ($key =~ /^DeleteScrip-(\d+)/) { - my $id = $1; - my $scrip = new RT::Scrip($session{'CurrentUser'}); - $scrip->Load($id); - my ($retval, $msg) = $scrip->Delete; - if ($retval) { - push @actions, loc("Scrip deleted"); - } - else { - push @actions, $msg; - } - } - # }}} -} -# }}} -</%init> - -<%ARGS> -$id => undef -$title => undef -</%ARGS> diff --git a/rt/html/Admin/Elements/EditTemplates b/rt/html/Admin/Elements/EditTemplates deleted file mode 100644 index 12677ca78..000000000 --- a/rt/html/Admin/Elements/EditTemplates +++ /dev/null @@ -1,104 +0,0 @@ -%# BEGIN LICENSE BLOCK -%# -%# Copyright (c) 1996-2003 Jesse Vincent <jesse@bestpractical.com> -%# -%# (Except where explictly superceded by other copyright notices) -%# -%# This work is made available to you under the terms of Version 2 of -%# the GNU General Public License. A copy of that license should have -%# been provided with this software, but in any event can be snarfed -%# from www.gnu.org. -%# -%# This work is distributed in the hope that it will be useful, but -%# WITHOUT ANY WARRANTY; without even the implied warranty of -%# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -%# General Public License for more details. -%# -%# Unless otherwise specified, all modifications, corrections or -%# extensions to this work which alter its source code become the -%# property of Best Practical Solutions, LLC when submitted for -%# inclusion in the work. -%# -%# -%# END LICENSE BLOCK -<& /Elements/ListActions, actions => \@actions &> - -<FORM METHOD=GET ACTION="Templates.html"> -<INPUT TYPE="Hidden" NAME="id" VALUE="<%$id%>"> - -% if ($Templates->Count == 0 ) { -<P><i><&|/l&>(No templates)</&></i></P> -% } else { -<TABLE> -<TR> -<TH> -<i><&|/l&>(Check box to delete)</&></i> -</TH> -<TH> -</TH> -</TR> -% my $count; -% while (my $TemplateObj = $Templates->Next) { -<TR> -<TD> -<input type="checkbox" name="DeleteTemplate-<%$TemplateObj->Id%>"> -</TD> -<TD> -<A HREF="Template.html?Queue=<%$id%>&Template=<%$TemplateObj->id()%>"> -<B><% loc($TemplateObj->Name) %></B></A> -<br><% loc($TemplateObj->Description) %> -</TD> -</TR> - -% } -</TABLE> -% } - -<& /Elements/Submit &> -</FORM> - -<%INIT> -my $Templates = RT::Templates->new($session{'CurrentUser'}); -my $QueueObj = RT::Queue->new($session{'CurrentUser'}); -my @actions; - -if ($id) { - $QueueObj->Load($id); -} - -if ($QueueObj->id) { - $Templates->LimitToQueue($id); -} -else { - $Templates->LimitToGlobal(); -} - -# Now let callbacks add their extra limits -$m->comp('/Elements/Callback', Templates => $Templates, %ARGS); - -# {{{ deal with deleting existing templates -foreach my $key (keys %ARGS) { - # {{{ if we're trying to delete the template - if ($key =~ /^DeleteTemplate-(\d+)/) { - my $id = $1; - my $TemplateObj = RT::Template->new($session{'CurrentUser'}); - $TemplateObj->Load($id); - my ($retval, $msg) = $TemplateObj->Delete; - if ($retval) { - push @actions, loc("Template deleted"); - } - else { - push @actions, $msg; - } - } - # }}} -} -# }}} -</%INIT> -<%ARGS> -$id => 0 -$title => undef -$Move => undef -$Source => undef -$Template => undef -</%ARGS> diff --git a/rt/html/Admin/Elements/EditUserComments b/rt/html/Admin/Elements/EditUserComments deleted file mode 100644 index f791876be..000000000 --- a/rt/html/Admin/Elements/EditUserComments +++ /dev/null @@ -1,32 +0,0 @@ -%# BEGIN LICENSE BLOCK -%# -%# Copyright (c) 1996-2003 Jesse Vincent <jesse@bestpractical.com> -%# -%# (Except where explictly superceded by other copyright notices) -%# -%# This work is made available to you under the terms of Version 2 of -%# the GNU General Public License. A copy of that license should have -%# been provided with this software, but in any event can be snarfed -%# from www.gnu.org. -%# -%# This work is distributed in the hope that it will be useful, but -%# WITHOUT ANY WARRANTY; without even the implied warranty of -%# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -%# General Public License for more details. -%# -%# Unless otherwise specified, all modifications, corrections or -%# extensions to this work which alter its source code become the -%# property of Best Practical Solutions, LLC when submitted for -%# inclusion in the work. -%# -%# -%# END LICENSE BLOCK -<& /Elements/Header, Title => "Comments about $name" &> -<&|/l&>These comments aren't generally visible to the user</&>:<br> -<input type="hidden" name="id" value="<%$id%>"> -<TEXTAREA COLS=60 ROWS=15 WRAP=SOFT NAME="Comments"><% $UserObj->Comments %></TEXTAREA> -</FORM> - -<%ARGS> -$UserObj => undef -</%ARGS> diff --git a/rt/html/Admin/Elements/GroupTabs b/rt/html/Admin/Elements/GroupTabs deleted file mode 100644 index 87377820c..000000000 --- a/rt/html/Admin/Elements/GroupTabs +++ /dev/null @@ -1,76 +0,0 @@ -%# BEGIN LICENSE BLOCK -%# -%# Copyright (c) 1996-2003 Jesse Vincent <jesse@bestpractical.com> -%# -%# (Except where explictly superceded by other copyright notices) -%# -%# This work is made available to you under the terms of Version 2 of -%# the GNU General Public License. A copy of that license should have -%# been provided with this software, but in any event can be snarfed -%# from www.gnu.org. -%# -%# This work is distributed in the hope that it will be useful, but -%# WITHOUT ANY WARRANTY; without even the implied warranty of -%# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -%# General Public License for more details. -%# -%# Unless otherwise specified, all modifications, corrections or -%# extensions to this work which alter its source code become the -%# property of Best Practical Solutions, LLC when submitted for -%# inclusion in the work. -%# -%# -%# END LICENSE BLOCK -<& /Admin/Elements/Tabs, - subtabs => $tabs, - current_tab => 'Admin/Groups/', - current_subtab => $current_tab, - Title => $Title &> -<%INIT> -my $tabs; - -if ( $GroupObj and $GroupObj->id ) { -$tabs->{"this"} = { class => "currentnav", - path => "Admin/Groups/Modify.html?id=" . $GroupObj->id, - title => $GroupObj->Name, - current_subtab => $current_subtab, - subtabs => { - C => { title => loc('Basics'), - path => "Admin/Groups/Modify.html?id=" . $GroupObj->id }, - - D => { title => loc('Members'), - path => "Admin/Groups/Members.html?id=" . $GroupObj->id }, - - F => { title => loc('Group Rights'), - path => "Admin/Groups/GroupRights.html?id=" . $GroupObj->id, }, - G => { title => loc('User Rights'), - path => "Admin/Groups/UserRights.html?id=" . $GroupObj->id, }, - } -} -} -$tabs->{"A"} = { title => loc('Select group'), - path => "Admin/Groups/", }; -$tabs->{"B"} = { title => loc('New group'), - path => "Admin/Groups/Modify.html?Create=1", - separator => 1, }; - -# Now let callbacks add their extra tabs -$m->comp( '/Elements/Callback', tabs => $tabs, %ARGS ); -foreach my $tab ( sort keys %{$tabs->{'this'}->{'subtabs'}} ) { - if ( $tabs->{'this'}->{'subtabs'}->{$tab}->{'path'} eq $current_tab ) { - $tabs->{'this'}->{'subtabs'}->{$tab}->{"subtabs"} = $subtabs; - $tabs->{'this'}->{'subtabs'}->{$tab}->{"current_subtab"} = $current_subtab; - } -} - $tabs->{'this'}->{"current_subtab"} = $current_tab; - $current_tab = "Admin/Groups/Modify.html?id=".$GroupObj->id if $GroupObj; - -</%INIT> -<%ARGS> -$GroupObj => undef -$subtabs => undef -$current_subtab => undef -$current_tab => undef -$Title => undef -</%ARGS> - diff --git a/rt/html/Admin/Elements/Header b/rt/html/Admin/Elements/Header deleted file mode 100644 index 92a7c54ca..000000000 --- a/rt/html/Admin/Elements/Header +++ /dev/null @@ -1,28 +0,0 @@ -%# BEGIN LICENSE BLOCK -%# -%# Copyright (c) 1996-2003 Jesse Vincent <jesse@bestpractical.com> -%# -%# (Except where explictly superceded by other copyright notices) -%# -%# This work is made available to you under the terms of Version 2 of -%# the GNU General Public License. A copy of that license should have -%# been provided with this software, but in any event can be snarfed -%# from www.gnu.org. -%# -%# This work is distributed in the hope that it will be useful, but -%# WITHOUT ANY WARRANTY; without even the implied warranty of -%# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -%# General Public License for more details. -%# -%# Unless otherwise specified, all modifications, corrections or -%# extensions to this work which alter its source code become the -%# property of Best Practical Solutions, LLC when submitted for -%# inclusion in the work. -%# -%# -%# END LICENSE BLOCK -<& /Elements/Header, Title => $Title &> - -<%ARGS> -$Title => undef -</%ARGS> diff --git a/rt/html/Admin/Elements/ListGlobalCustomFields b/rt/html/Admin/Elements/ListGlobalCustomFields deleted file mode 100644 index 032f680ee..000000000 --- a/rt/html/Admin/Elements/ListGlobalCustomFields +++ /dev/null @@ -1,37 +0,0 @@ -%# BEGIN LICENSE BLOCK -%# -%# Copyright (c) 1996-2003 Jesse Vincent <jesse@bestpractical.com> -%# -%# (Except where explictly superceded by other copyright notices) -%# -%# This work is made available to you under the terms of Version 2 of -%# the GNU General Public License. A copy of that license should have -%# been provided with this software, but in any event can be snarfed -%# from www.gnu.org. -%# -%# This work is distributed in the hope that it will be useful, but -%# WITHOUT ANY WARRANTY; without even the implied warranty of -%# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -%# General Public License for more details. -%# -%# Unless otherwise specified, all modifications, corrections or -%# extensions to this work which alter its source code become the -%# property of Best Practical Solutions, LLC when submitted for -%# inclusion in the work. -%# -%# -%# END LICENSE BLOCK -% my $count = 0; -% while (my $CustomFieldObj = $CustomFields->Next) { -% $count++; -<font size="-1"><%$CustomFieldObj->id%>/<% loc($CustomFieldObj->Type) %>/<%$CustomFieldObj->Name%>: <%$CustomFieldObj->Description%></font> -<BR> -% } -% if (!$count) { -<font size="-1"><&|/l&>(No custom fields)</&></font> -% } - -<%init> -my $CustomFields = new RT::CustomFields ($session{'CurrentUser'}); -$CustomFields->LimitToGlobal(); -</%INIT> diff --git a/rt/html/Admin/Elements/ListGlobalScrips b/rt/html/Admin/Elements/ListGlobalScrips deleted file mode 100644 index 8dba3b6c4..000000000 --- a/rt/html/Admin/Elements/ListGlobalScrips +++ /dev/null @@ -1,37 +0,0 @@ -%# BEGIN LICENSE BLOCK -%# -%# Copyright (c) 1996-2003 Jesse Vincent <jesse@bestpractical.com> -%# -%# (Except where explictly superceded by other copyright notices) -%# -%# This work is made available to you under the terms of Version 2 of -%# the GNU General Public License. A copy of that license should have -%# been provided with this software, but in any event can be snarfed -%# from www.gnu.org. -%# -%# This work is distributed in the hope that it will be useful, but -%# WITHOUT ANY WARRANTY; without even the implied warranty of -%# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -%# General Public License for more details. -%# -%# Unless otherwise specified, all modifications, corrections or -%# extensions to this work which alter its source code become the -%# property of Best Practical Solutions, LLC when submitted for -%# inclusion in the work. -%# -%# -%# END LICENSE BLOCK -% my $count = 0; -% while (my $scrip = $Scrips->Next ) { -% $count++; -<font size="-1"><&|/l, loc($scrip->ConditionObj->Name), loc($scrip->ActionObj->Name), loc($scrip->TemplateObj->Name) &>[_1] [_2] with template [_3]</&></font> -<BR> -% } -% if (!$count) { -<font size="-1"><&|/l&>(No scrips)</&></font> -% } - -<%init> -my $Scrips = new RT::Scrips ($session{'CurrentUser'}); -$Scrips->LimitToGlobal(); -</%INIT> diff --git a/rt/html/Admin/Elements/ModifyQueue b/rt/html/Admin/Elements/ModifyQueue deleted file mode 100644 index e5761df35..000000000 --- a/rt/html/Admin/Elements/ModifyQueue +++ /dev/null @@ -1,78 +0,0 @@ -%# BEGIN LICENSE BLOCK -%# -%# Copyright (c) 1996-2003 Jesse Vincent <jesse@bestpractical.com> -%# -%# (Except where explictly superceded by other copyright notices) -%# -%# This work is made available to you under the terms of Version 2 of -%# the GNU General Public License. A copy of that license should have -%# been provided with this software, but in any event can be snarfed -%# from www.gnu.org. -%# -%# This work is distributed in the hope that it will be useful, but -%# WITHOUT ANY WARRANTY; without even the implied warranty of -%# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -%# General Public License for more details. -%# -%# Unless otherwise specified, all modifications, corrections or -%# extensions to this work which alter its source code become the -%# property of Best Practical Solutions, LLC when submitted for -%# inclusion in the work. -%# -%# -%# END LICENSE BLOCK -<& /Elements/TitleBoxStart, title => loc('Editing Configuration for queue [_1]', $QueueObj->Id) &> - -<FORM ACTION="<%$RT::WebPath%>/Admin/Queues/Modify.html" METHOD=POST> -<INPUT TYPE=HIDDEN NAME=id VALUE="<%$QueueObj->Id%>"> -<TABLE> -<TR><TD ALIGN=RIGHT> -<&|/l&>Queue Name</&>: -</TD> -<TD><INPUT name="Name" value="<%$QueueObj->Name%>"></TD> -</TR><TR> -<TD ALIGN=RIGHT> -<&|/l&>Description</&>:</TD><TD COLSPAN=3><INPUT name="Description" value="<%$QueueObj->Description%>" size=60></TD></TR> -<TR> -<TD ALIGN=RIGHT> -<&|/l&>Correspondence Address</&>: -</TD><TD> -<INPUT name="CorrespondAddress" value="<%$QueueObj->CorrespondAddress%>"> -</TD> -<TD ALIGN=RIGHT> - -<&|/l&>Comment Address</&>: </TD><TD> -<INPUT NAME="CommentAddress" value="<%$QueueObj->CommentAddress%>"> -</TD> -</TR><TR> - -<TD ALIGN=RIGHT> -<&|/l&>Priority starts at</&>: -</TD><TD><INPUT NAME="InitialPriority" value="<%$QueueObj->InitialPriority %>"> -</TD> -<TD ALIGN=RIGHT> -<&|/l&>Over time, priority moves toward</&>: -</TD><TD><INPUT NAME="FinalPriority" value="<%$QueueObj->FinalPriority %>"> -</TD> -</TR> -<TR> -<TD ALIGN=RIGHT> -<&|/l&>Requests should be due in</&>: -</TD><TD> -<INPUT NAME="DefaultDueIn" VALUE="<%$QueueObj->DefaultDueIn%>"> <&|/l&>days</&>. -</TD> -</TR> -</TABLE> -<& /Elements/Submit &> -</form> -<& /Elements/TitleBoxEnd &> - -<%INIT> - -</%INIT> - -<%ARGS> - - -$QueueObj => undef -</%ARGS> diff --git a/rt/html/Admin/Elements/ModifyTemplate b/rt/html/Admin/Elements/ModifyTemplate deleted file mode 100644 index 5f75bac5f..000000000 --- a/rt/html/Admin/Elements/ModifyTemplate +++ /dev/null @@ -1,60 +0,0 @@ -%# BEGIN LICENSE BLOCK -%# -%# Copyright (c) 1996-2003 Jesse Vincent <jesse@bestpractical.com> -%# -%# (Except where explictly superceded by other copyright notices) -%# -%# This work is made available to you under the terms of Version 2 of -%# the GNU General Public License. A copy of that license should have -%# been provided with this software, but in any event can be snarfed -%# from www.gnu.org. -%# -%# This work is distributed in the hope that it will be useful, but -%# WITHOUT ANY WARRANTY; without even the implied warranty of -%# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -%# General Public License for more details. -%# -%# Unless otherwise specified, all modifications, corrections or -%# extensions to this work which alter its source code become the -%# property of Best Practical Solutions, LLC when submitted for -%# inclusion in the work. -%# -%# -%# END LICENSE BLOCK -<TABLE> -<TR> -<TD ALIGN=RIGHT> -<&|/l&>Name</&>: -</TD> -<TD> -<input name="Name" VALUE="<%$Name%>" SIZE=20><BR> -</TD> -</TR> -<TR> -<TD ALIGN=RIGHT> -<&|/l&>Description</&>: -</TD> -<TD> -<input name="Description" VALUE="<%$Description%>" SIZE=80><BR> -</TD> -</TR> -<TR> -<TD ALIGN=RIGHT VALIGN=TOP> -<&|/l&>Content</&>:<BR> -</TD> -<TD> -<TEXTAREA NAME=Content ROWS=25 COLS=80 WRAP=SOFT> -<%$Content%></TEXTAREA> -</TD> -</TR> -</TABLE> - -<%INIT> - -</%INIT> - -<%ARGS> -$Name => undef -$Description => undef -$Content => undef -</%ARGS> diff --git a/rt/html/Admin/Elements/ModifyUser b/rt/html/Admin/Elements/ModifyUser deleted file mode 100644 index 876e8a71b..000000000 --- a/rt/html/Admin/Elements/ModifyUser +++ /dev/null @@ -1,99 +0,0 @@ -%# BEGIN LICENSE BLOCK -%# -%# Copyright (c) 1996-2003 Jesse Vincent <jesse@bestpractical.com> -%# -%# (Except where explictly superceded by other copyright notices) -%# -%# This work is made available to you under the terms of Version 2 of -%# the GNU General Public License. A copy of that license should have -%# been provided with this software, but in any event can be snarfed -%# from www.gnu.org. -%# -%# This work is distributed in the hope that it will be useful, but -%# WITHOUT ANY WARRANTY; without even the implied warranty of -%# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -%# General Public License for more details. -%# -%# Unless otherwise specified, all modifications, corrections or -%# extensions to this work which alter its source code become the -%# property of Best Practical Solutions, LLC when submitted for -%# inclusion in the work. -%# -%# -%# END LICENSE BLOCK -<& /Elements/TitleBoxStart, title => loc('Editing Configuration for user [_1]', $UserObj->Name) &> - -<FORM ACTION="<%$RT::WebPath%>/Admin/Users/Modify.html" METHOD=POST> -<INPUT TYPE=HIDDEN NAME=id VALUE="<%$UserObj->Id%>"> - -<&|/l&>Name</&>: <input name="Name" value="<%$UserObj->Name%>"> -<BR> -<&|/l&>New Password</&>: <input type=password name="Pass1"><BR> -<&|/l&>Retype Password</&>: <input type=password name="Pass2"><BR> - -<&|/l&>Comments</&>: <TEXTAREA name="Comments" COLS=80 ROWS=5 WRAP=VIRTUAL> -<%$UserObj->Comments%></TEXTAREA> - -<BR> -<&|/l&>Signature</&>: <TEXTAREA COLS=80 ROWS=5 name="Signature" WRAP=HARD> -<%$UserObj->Signature%></TEXTAREA> -<BR> -<&|/l&>EmailAddress</&>: <input name="EmailAddress" value="<%$UserObj->EmailAddress%>"> -<BR> -<&|/l&>FreeformContactInfo</&>: <input name="FreeformContactInfo" value="<%$UserObj->FreeformContactInfo%>"> -<BR> -<&|/l&>Organization</&>: <input name="Organization" value="<%$UserObj->Organization%>"> -<BR> -<&|/l&>RealName</&>: <input name="RealName" value="<%$UserObj->RealName%>"> -<BR> -<&|/l&>NickName</&>: <input name="NickName" value="<%$UserObj->NickName%>"> -<BR> -<&|/l&>Lang</&>: <input name="Lang" value="<%$UserObj->Lang%>"> -<BR> -<&|/l&>EmailEncoding</&>: <input name="EmailEncoding" value="<%$UserObj->EmailEncoding%>"> -<BR> -<&|/l&>WebEncoding</&>: <input name="WebEncoding" value="<%$UserObj->WebEncoding%>"> -<BR> -<&|/l&>ExternalContactInfoId</&>: <input name="ExternalContactInfoId" value="<%$UserObj->ExternalContactInfoId%>"> -<BR> -<&|/l&>ContactInfoSystem</&>: <input name="ContactInfoSystem" value="<%$UserObj->ContactInfoSystem%>"> -<BR> -<&|/l&>UnixUsername</&>: <input name="Gecos" value="<%$UserObj->Gecos%>"> -<BR> -<&|/l&>ExternalAuthId</&>: <input name="ExternalAuthId" value="<%$UserObj->ExternalAuthId%>"> -<BR> -<&|/l&>AuthSystem</&>: <input name="AuthSystem" value="<%$UserObj->AuthSystem%>"> -<BR> -<&|/l&>HomePhone</&>: <input name="HomePhone" value="<%$UserObj->HomePhone%>"> -<BR> -<&|/l&>WorkPhone</&>: <input name="WorkPhone" value="<%$UserObj->WorkPhone%>"> -<BR> -<&|/l&>MobilePhone</&>: <input name="MobilePhone" value="<%$UserObj->MobilePhone%>"> -<BR> -<&|/l&>PagerPhone</&>: <input name="PagerPhone" value="<%$UserObj->PagerPhone%>"> -<BR> -<&|/l&>Address1</&>: <input name="Address1" value="<%$UserObj->Address1%>"> -<BR> -<&|/l&>Address2</&>: <input name="Address2" value="<%$UserObj->Address2%>"> -<BR> -<&|/l&>City</&>: <input name="City" value="<%$UserObj->City%>"> -<BR> -<&|/l&>State</&>: <input name="State" value="<%$UserObj->State%>"> -<BR> -<&|/l&>Zip</&>: <input name="Zip" value="<%$UserObj->Zip%>"> -<BR> -<&|/l&>Country</&>: <input name="Country" value="<%$UserObj->Country%>"> -<BR> -<& /Elements/Submit &> -</form> -<& /Elements/TitleBoxEnd &> - -<%INIT> - -</%INIT> - -<%ARGS> - - -$UserObj => undef -</%ARGS> diff --git a/rt/html/Admin/Elements/QueueRightsForUser b/rt/html/Admin/Elements/QueueRightsForUser deleted file mode 100644 index 05bb51196..000000000 --- a/rt/html/Admin/Elements/QueueRightsForUser +++ /dev/null @@ -1,40 +0,0 @@ -%# BEGIN LICENSE BLOCK -%# -%# Copyright (c) 1996-2003 Jesse Vincent <jesse@bestpractical.com> -%# -%# (Except where explictly superceded by other copyright notices) -%# -%# This work is made available to you under the terms of Version 2 of -%# the GNU General Public License. A copy of that license should have -%# been provided with this software, but in any event can be snarfed -%# from www.gnu.org. -%# -%# This work is distributed in the hope that it will be useful, but -%# WITHOUT ANY WARRANTY; without even the implied warranty of -%# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -%# General Public License for more details. -%# -%# Unless otherwise specified, all modifications, corrections or -%# extensions to this work which alter its source code become the -%# property of Best Practical Solutions, LLC when submitted for -%# inclusion in the work. -%# -%# -%# END LICENSE BLOCK -<UL> -%while(my $ACE = $ACL->Next) { - -<LI><checkbox name="delete_ace_<%$ACE->id%>"> <% loc($ACE->RightName) %> (<%$ACE->UserObj->RealName%>) - -%} -</UL> - -<%INIT> -my $ACL = new RT::ACL($session{'CurrentUser'}); -$ACL->LimitToQueue($QueueObj->id); -$ACL->LimitPrincipalToUser($PrincipalId); -</%INIT> -<%ARGS> -$PrincipalId => undef -$QueueObj => undef -</%ARGS> diff --git a/rt/html/Admin/Elements/QueueTabs b/rt/html/Admin/Elements/QueueTabs deleted file mode 100644 index 3b4805afc..000000000 --- a/rt/html/Admin/Elements/QueueTabs +++ /dev/null @@ -1,93 +0,0 @@ -%# BEGIN LICENSE BLOCK -%# -%# Copyright (c) 1996-2003 Jesse Vincent <jesse@bestpractical.com> -%# -%# (Except where explictly superceded by other copyright notices) -%# -%# This work is made available to you under the terms of Version 2 of -%# the GNU General Public License. A copy of that license should have -%# been provided with this software, but in any event can be snarfed -%# from www.gnu.org. -%# -%# This work is distributed in the hope that it will be useful, but -%# WITHOUT ANY WARRANTY; without even the implied warranty of -%# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -%# General Public License for more details. -%# -%# Unless otherwise specified, all modifications, corrections or -%# extensions to this work which alter its source code become the -%# property of Best Practical Solutions, LLC when submitted for -%# inclusion in the work. -%# -%# -%# END LICENSE BLOCK -<& /Admin/Elements/Tabs, - subtabs => $tabs, - current_tab => 'Admin/Queues/', - current_subtab => $current_tab, - Title => $Title &> - -<%INIT> -my $tabs; -if ($id) { - $tabs->{'this'} = { - title => $QueueObj->Name, - path => "Admin/Queues/Modify.html?id=".$id, - current_subtab => $current_tab, - subtabs => { - C => { title => loc('Basics'), - path => "Admin/Queues/Modify.html?id=".$id, - }, - D => { title => loc('Watchers'), - path => "Admin/Queues/People.html?id=".$id, - }, - - E => { title => loc('Scrips'), - path => "Admin/Queues/Scrips.html?id=".$id, - }, - F => { title => loc('Templates'), - path => "Admin/Queues/Templates.html?id=".$id, - }, - - G => { title => loc('Custom Fields'), - path => 'Admin/Queues/CustomFields.html?id='.$id, - }, - - H => { title => loc('Group Rights'), - path => "Admin/Queues/GroupRights.html?id=".$id, - }, - I => { title => loc('User Rights'), - path => "Admin/Queues/UserRights.html?id=".$id, - } - } - }; -} -if ($session{'CurrentUser'}->HasRight( Object => $RT::System, Right => 'AdminQueue')) { - $tabs->{"A"} = { title => loc('Select queue'), - path => "Admin/Queues/", - }; - $tabs->{"B"} = { title => loc('New queue'), - path => "Admin/Queues/Modify.html?Create=1", - separator => 1, - }; -} - - # Now let callbacks add their extra tabs - $m->comp('/Elements/Callback', tabs => $tabs, %ARGS); -foreach my $tab ( sort keys %{$tabs->{'this'}->{'subtabs'}} ) { - if ( $tabs->{'this'}->{'subtabs'}->{$tab}->{'path'} eq $current_tab ) { - $tabs->{'this'}->{'subtabs'}->{$tab}->{"subtabs"} = $subtabs; - $tabs->{'this'}->{'subtabs'}->{$tab}->{"current_subtab"} = $current_subtab; - } -} - $current_tab = "Admin/Queues/Modify.html?id=".$id if $id; -</%INIT> - -<%ARGS> -$QueueObj => undef -$id => undef -$subtabs => undef -$current_subtab => undef -$current_tab => undef -$Title => undef -</%ARGS> diff --git a/rt/html/Admin/Elements/SelectCustomFieldType b/rt/html/Admin/Elements/SelectCustomFieldType deleted file mode 100644 index b5f4c079a..000000000 --- a/rt/html/Admin/Elements/SelectCustomFieldType +++ /dev/null @@ -1,36 +0,0 @@ -%# BEGIN LICENSE BLOCK -%# -%# Copyright (c) 1996-2003 Jesse Vincent <jesse@bestpractical.com> -%# -%# (Except where explictly superceded by other copyright notices) -%# -%# This work is made available to you under the terms of Version 2 of -%# the GNU General Public License. A copy of that license should have -%# been provided with this software, but in any event can be snarfed -%# from www.gnu.org. -%# -%# This work is distributed in the hope that it will be useful, but -%# WITHOUT ANY WARRANTY; without even the implied warranty of -%# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -%# General Public License for more details. -%# -%# Unless otherwise specified, all modifications, corrections or -%# extensions to this work which alter its source code become the -%# property of Best Practical Solutions, LLC when submitted for -%# inclusion in the work. -%# -%# -%# END LICENSE BLOCK -<SELECT NAME ="<%$Name%>"> -%for my $option ($cf->Types) { -<OPTION VALUE="<%$option%>" <%$option eq $Default && "SELECTED"%>><% $cf->FriendlyType($option) %></OPTION> -%} -</SELECT> -<%INIT> -my $cf = RT::CustomField->new($session{'CurrentUser'}); - -</%INIT> -<%ARGS> -$Default=>undef -$Name => 'Type' -</%ARGS> diff --git a/rt/html/Admin/Elements/SelectGroups b/rt/html/Admin/Elements/SelectGroups deleted file mode 100644 index 3cc909b29..000000000 --- a/rt/html/Admin/Elements/SelectGroups +++ /dev/null @@ -1,38 +0,0 @@ -%# BEGIN LICENSE BLOCK -%# -%# Copyright (c) 1996-2003 Jesse Vincent <jesse@bestpractical.com> -%# -%# (Except where explictly superceded by other copyright notices) -%# -%# This work is made available to you under the terms of Version 2 of -%# the GNU General Public License. A copy of that license should have -%# been provided with this software, but in any event can be snarfed -%# from www.gnu.org. -%# -%# This work is distributed in the hope that it will be useful, but -%# WITHOUT ANY WARRANTY; without even the implied warranty of -%# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -%# General Public License for more details. -%# -%# Unless otherwise specified, all modifications, corrections or -%# extensions to this work which alter its source code become the -%# property of Best Practical Solutions, LLC when submitted for -%# inclusion in the work. -%# -%# -%# END LICENSE BLOCK -<SELECT MULTIPLE NAME="<%$Name%>" SIZE=10> -%while (my $group = $groups->Next) { -<OPTION VALUE="<%$group->id%>"><%$group->Name%> -%} -</SELECT> - -<%INIT> -my $groups = new RT::Groups($session{'CurrentUser'}); -$groups->Limit(FIELD => 'Domain', OPERATOR => '=', VALUE => $Domain); - -</%INIT> -<%ARGS> -$Name => 'groups' -$Domain => 'UserDefined'; -</%ARGS> diff --git a/rt/html/Admin/Elements/SelectModifyGroup b/rt/html/Admin/Elements/SelectModifyGroup deleted file mode 100644 index 47978d3bf..000000000 --- a/rt/html/Admin/Elements/SelectModifyGroup +++ /dev/null @@ -1,33 +0,0 @@ -%# BEGIN LICENSE BLOCK -%# -%# Copyright (c) 1996-2003 Jesse Vincent <jesse@bestpractical.com> -%# -%# (Except where explictly superceded by other copyright notices) -%# -%# This work is made available to you under the terms of Version 2 of -%# the GNU General Public License. A copy of that license should have -%# been provided with this software, but in any event can be snarfed -%# from www.gnu.org. -%# -%# This work is distributed in the hope that it will be useful, but -%# WITHOUT ANY WARRANTY; without even the implied warranty of -%# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -%# General Public License for more details. -%# -%# Unless otherwise specified, all modifications, corrections or -%# extensions to this work which alter its source code become the -%# property of Best Practical Solutions, LLC when submitted for -%# inclusion in the work. -%# -%# -%# END LICENSE BLOCK -%while ( $Group = $Groups->Next) { -<A HREF="Modify.html?id=<%$Group->id%>"><%$Group->id%>: <%$Group->Name%></a><BR> -%} -<%INIT> -my ($Group); -my $Groups = new RT::Groups($session{'CurrentUser'}); -$Groups->UnLimit; -</%INIT> -<%ARGS> -</%ARGS> diff --git a/rt/html/Admin/Elements/SelectModifyQueue b/rt/html/Admin/Elements/SelectModifyQueue deleted file mode 100644 index c5152ac95..000000000 --- a/rt/html/Admin/Elements/SelectModifyQueue +++ /dev/null @@ -1,33 +0,0 @@ -%# BEGIN LICENSE BLOCK -%# -%# Copyright (c) 1996-2003 Jesse Vincent <jesse@bestpractical.com> -%# -%# (Except where explictly superceded by other copyright notices) -%# -%# This work is made available to you under the terms of Version 2 of -%# the GNU General Public License. A copy of that license should have -%# been provided with this software, but in any event can be snarfed -%# from www.gnu.org. -%# -%# This work is distributed in the hope that it will be useful, but -%# WITHOUT ANY WARRANTY; without even the implied warranty of -%# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -%# General Public License for more details. -%# -%# Unless otherwise specified, all modifications, corrections or -%# extensions to this work which alter its source code become the -%# property of Best Practical Solutions, LLC when submitted for -%# inclusion in the work. -%# -%# -%# END LICENSE BLOCK -%while ( $queue = $queues->Next) { -<A HREF="Modify.html?id=<%$queue->id%>"><%$queue->id%>: <%$queue->Name%></a><BR> -%} -<%INIT> -my ($queue); -my $queues = new RT::Queues($session{'CurrentUser'}); -$queues->UnLimit; -</%INIT> -<%ARGS> -</%ARGS> diff --git a/rt/html/Admin/Elements/SelectModifyUser b/rt/html/Admin/Elements/SelectModifyUser deleted file mode 100644 index 9e7789b4c..000000000 --- a/rt/html/Admin/Elements/SelectModifyUser +++ /dev/null @@ -1,49 +0,0 @@ -%# BEGIN LICENSE BLOCK -%# -%# Copyright (c) 1996-2003 Jesse Vincent <jesse@bestpractical.com> -%# -%# (Except where explictly superceded by other copyright notices) -%# -%# This work is made available to you under the terms of Version 2 of -%# the GNU General Public License. A copy of that license should have -%# been provided with this software, but in any event can be snarfed -%# from www.gnu.org. -%# -%# This work is distributed in the hope that it will be useful, but -%# WITHOUT ANY WARRANTY; without even the implied warranty of -%# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -%# General Public License for more details. -%# -%# Unless otherwise specified, all modifications, corrections or -%# extensions to this work which alter its source code become the -%# property of Best Practical Solutions, LLC when submitted for -%# inclusion in the work. -%# -%# -%# END LICENSE BLOCK -%while ( $user = $users->Next) { -<A HREF="Modify.html?id=<%$user->id%>"><%$user->id%>: <%$user->Name%></a><BR> -%} -<%INIT> -my ($user); -my $users = new RT::Users($session{'CurrentUser'}); -$users->Limit(FIELD => 'id', - VALUE => $RT::SystemUser->id, - OPERATOR => '!=' ); - -if (defined $IdLike) { -$users->Limit(FIELD => 'Name', - VALUE => $IdLike, - OPERATOR => 'LIKE' ); -} -if (defined $EmailLike) { -$users->Limit(FIELD => 'EmailAddress', - VALUE => $EmailLike, - OPERATOR => 'LIKE'); - -} -</%INIT> -<%ARGS> -$IdLike => undef -$EmailLike => undef -</%ARGS> diff --git a/rt/html/Admin/Elements/SelectNewGroupMembers b/rt/html/Admin/Elements/SelectNewGroupMembers deleted file mode 100644 index e5c28e909..000000000 --- a/rt/html/Admin/Elements/SelectNewGroupMembers +++ /dev/null @@ -1,61 +0,0 @@ -%# BEGIN LICENSE BLOCK -%# -%# Copyright (c) 1996-2003 Jesse Vincent <jesse@bestpractical.com> -%# -%# (Except where explictly superceded by other copyright notices) -%# -%# This work is made available to you under the terms of Version 2 of -%# the GNU General Public License. A copy of that license should have -%# been provided with this software, but in any event can be snarfed -%# from www.gnu.org. -%# -%# This work is distributed in the hope that it will be useful, but -%# WITHOUT ANY WARRANTY; without even the implied warranty of -%# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -%# General Public License for more details. -%# -%# Unless otherwise specified, all modifications, corrections or -%# extensions to this work which alter its source code become the -%# property of Best Practical Solutions, LLC when submitted for -%# inclusion in the work. -%# -%# -%# END LICENSE BLOCK -% if ($Show ne 'Groups') { -<b><&|/l&>Users</&></b> -<SELECT MULTIPLE NAME="<%$Name%>Users" SIZE=10> -%while (my $user = $users->Next) { -<OPTION VALUE="User-<%$user->id%>"><%$user->Name%></OPTION> -%} -</SELECT> -<br> -% } -% if ($Show ne 'Users') { -<b><&|/l&>Groups</&></b> -<SELECT MULTIPLE NAME="<%$Name%>Groups" SIZE=10> -%while (my $group = $groups->Next) { -<OPTION VALUE="Group-<%$group->id%>"><%$group->Name%></OPTION> -%} -</SELECT> -% } - -<%INIT> -my $users = new RT::Users($session{'CurrentUser'}); - -$users->Limit(FIELD => 'id', VALUE => $RT::SystemUser->id, OPERATOR => '!=' ); -$users->Limit(FIELD => 'id', VALUE => $RT::Nobody->id, OPERATOR => '!=' ); -$users->LimitToPrivileged(); - -my $groups = new RT::Groups($session{'CurrentUser'}); - -# self-recursive group membership considered harmful! -$groups->Limit(FIELD => 'id', VALUE => $Group->id, OPERATOR => '!=' ); -$groups->Limit(FIELD => 'Domain', OPERATOR => '=', VALUE => 'UserDefined'); - - -</%INIT> -<%ARGS> -$Name => 'Users' -$Show => 'All' -$Group -</%ARGS> diff --git a/rt/html/Admin/Elements/SelectRights b/rt/html/Admin/Elements/SelectRights deleted file mode 100644 index 8d87ac9a1..000000000 --- a/rt/html/Admin/Elements/SelectRights +++ /dev/null @@ -1,91 +0,0 @@ -%# BEGIN LICENSE BLOCK -%# -%# Copyright (c) 1996-2003 Jesse Vincent <jesse@bestpractical.com> -%# -%# (Except where explictly superceded by other copyright notices) -%# -%# This work is made available to you under the terms of Version 2 of -%# the GNU General Public License. A copy of that license should have -%# been provided with this software, but in any event can be snarfed -%# from www.gnu.org. -%# -%# This work is distributed in the hope that it will be useful, but -%# WITHOUT ANY WARRANTY; without even the implied warranty of -%# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -%# General Public License for more details. -%# -%# Unless otherwise specified, all modifications, corrections or -%# extensions to this work which alter its source code become the -%# property of Best Practical Solutions, LLC when submitted for -%# inclusion in the work. -%# -%# -%# END LICENSE BLOCK -<INPUT TYPE=HIDDEN NAME="CheckACL" VALUE="<%$ACLDesc%>"> - <TABLE BORDER=0> -<TR> -<TD valign=top width="180" align="left"> -<h3><&|/l&>Current rights</&></h3> -% if ($ACLObj->Count() > 0) { -<i>(<&|/l&>Check box to revoke right</&>)</i> <BR> -% } else { -<i><&|/l&>No rights granted.</&></i> <BR> -% } -% while (my $right = $ACLObj->Next()) { -% if ($right->RightName) { -<input type=checkbox value="<%$right->Id%>" name="RevokeRight-<%$ACLDesc%>-<%$right->RightName%>"> <% loc($right->RightName) %><br> -% } -% } -</TD> -<TD valign=top> -<h3><&|/l&>New rights</&></h3> -<SELECT SIZE=5 MULTIPLE NAME="GrantRight-<%$ACLDesc%>"> -% foreach $right (sort keys %Rights) { - <OPTION VALUE="<%$right%>" - ><% loc($right) %></OPTION> -% } -<OPTION VALUE="" SELECTED><&|/l&>(no value)</&></OPTION> -</SELECT> -</TD> -</TR> -</TABLE> -<%INIT> - my ($right, $ACLDesc, $AppliesTo, %Rights); - - # if the principal id points to a user, we really want to point - # to their ACL equivalence group. The machinations we're going through - # lead me to start to suspect that we really want users and groups - # to just be the same table. or _maybe_ that we want an object db. - my $princ = RT::Principal->new($RT::SystemUser); - $princ->Load($PrincipalId); - if ($princ->PrincipalType eq 'User') { - my $group = RT::Group->new($RT::SystemUser); - $group->LoadACLEquivalenceGroup($princ); - $PrincipalId = $group->PrincipalId; - } - - - my $ACLObj = new RT::ACL($session{'CurrentUser'}); - my $ACE = new RT::ACE($session{'CurrentUser'}); - - - $ACLObj->LimitToObject( $Object); - $ACLObj->LimitToPrincipal( Id => $PrincipalId); - $ACLObj->OrderBy(FIELD=>'RightName'); - - if (ref($Object) && UNIVERSAL::can($Object, 'AvailableRights')) { - %Rights = %{$Object->AvailableRights}; - } - - else { - %Rights = { loc('System Error') => loc("No rights found")}; - } - - $ACLDesc = "$PrincipalId-".ref($Object)."-".$Object->Id; -</%INIT> - -<%ARGS> -$PrincipalType => undef -$PrincipalId => undef -$Object =>undef -</%ARGS> diff --git a/rt/html/Admin/Elements/SelectScrip b/rt/html/Admin/Elements/SelectScrip deleted file mode 100644 index 18e4098a0..000000000 --- a/rt/html/Admin/Elements/SelectScrip +++ /dev/null @@ -1,48 +0,0 @@ -%# BEGIN LICENSE BLOCK -%# -%# Copyright (c) 1996-2003 Jesse Vincent <jesse@bestpractical.com> -%# -%# (Except where explictly superceded by other copyright notices) -%# -%# This work is made available to you under the terms of Version 2 of -%# the GNU General Public License. A copy of that license should have -%# been provided with this software, but in any event can be snarfed -%# from www.gnu.org. -%# -%# This work is distributed in the hope that it will be useful, but -%# WITHOUT ANY WARRANTY; without even the implied warranty of -%# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -%# General Public License for more details. -%# -%# Unless otherwise specified, all modifications, corrections or -%# extensions to this work which alter its source code become the -%# property of Best Practical Solutions, LLC when submitted for -%# inclusion in the work. -%# -%# -%# END LICENSE BLOCK -<SELECT NAME=<%$Name%>> -<OPTION VALUE="" -<% $Default eq undef && 'SELECTED' %> ->-</OPTION> -%while (my $Scrip = $Scrips->Next) { -<OPTION VALUE=<% $Scrip->Id %> -<% $Scrip->Id == $Default && 'SELECTED' %> -><% loc($Scrip->Name) %> -</OPTION> -%} -</SELECT> - -<%INIT> -my $Scrips = RT::Scrips->new($session{'CurrentUser'}); -$Scrips->UnLimit; - - - -</%INIT> -<%ARGS> - -$Default => undef -$Name => 'Scrip' - -</%ARGS> diff --git a/rt/html/Admin/Elements/SelectScripAction b/rt/html/Admin/Elements/SelectScripAction deleted file mode 100644 index 0d7f8ccfa..000000000 --- a/rt/html/Admin/Elements/SelectScripAction +++ /dev/null @@ -1,48 +0,0 @@ -%# BEGIN LICENSE BLOCK -%# -%# Copyright (c) 1996-2003 Jesse Vincent <jesse@bestpractical.com> -%# -%# (Except where explictly superceded by other copyright notices) -%# -%# This work is made available to you under the terms of Version 2 of -%# the GNU General Public License. A copy of that license should have -%# been provided with this software, but in any event can be snarfed -%# from www.gnu.org. -%# -%# This work is distributed in the hope that it will be useful, but -%# WITHOUT ANY WARRANTY; without even the implied warranty of -%# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -%# General Public License for more details. -%# -%# Unless otherwise specified, all modifications, corrections or -%# extensions to this work which alter its source code become the -%# property of Best Practical Solutions, LLC when submitted for -%# inclusion in the work. -%# -%# -%# END LICENSE BLOCK -<SELECT NAME=<%$Name%>> -<OPTION VALUE="" -<% $Default eq undef && 'SELECTED' %> ->-</OPTION> -%while (my $ScripAction = $ScripActions->Next) { -<OPTION VALUE=<%$ScripAction->Id%> -<% $ScripAction->Id == $Default && 'SELECTED' %> -><% loc($ScripAction->Name) %> -</OPTION> -%} -</SELECT> - -<%INIT> -my $ScripActions = RT::ScripActions->new($session{'CurrentUser'}); -$ScripActions->UnLimit; - - - -</%INIT> -<%ARGS> - -$Default => undef -$Name => 'ScripAction' - -</%ARGS> diff --git a/rt/html/Admin/Elements/SelectScripCondition b/rt/html/Admin/Elements/SelectScripCondition deleted file mode 100644 index aeb366a44..000000000 --- a/rt/html/Admin/Elements/SelectScripCondition +++ /dev/null @@ -1,48 +0,0 @@ -%# BEGIN LICENSE BLOCK -%# -%# Copyright (c) 1996-2003 Jesse Vincent <jesse@bestpractical.com> -%# -%# (Except where explictly superceded by other copyright notices) -%# -%# This work is made available to you under the terms of Version 2 of -%# the GNU General Public License. A copy of that license should have -%# been provided with this software, but in any event can be snarfed -%# from www.gnu.org. -%# -%# This work is distributed in the hope that it will be useful, but -%# WITHOUT ANY WARRANTY; without even the implied warranty of -%# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -%# General Public License for more details. -%# -%# Unless otherwise specified, all modifications, corrections or -%# extensions to this work which alter its source code become the -%# property of Best Practical Solutions, LLC when submitted for -%# inclusion in the work. -%# -%# -%# END LICENSE BLOCK -<SELECT NAME=<%$Name%>> -<OPTION VALUE="" -<% $Default eq undef && 'SELECTED' %> ->-</OPTION> -%while (my $ScripCondition = $ScripConditions->Next) { -<OPTION VALUE=<%$ScripCondition->Id%> -<% $ScripCondition->Id == $Default && 'SELECTED' %> -><% loc($ScripCondition->Name) %> -</OPTION> -%} -</SELECT> - -<%INIT> -my $ScripConditions = RT::ScripConditions->new($session{'CurrentUser'}); -$ScripConditions->UnLimit; - - - -</%INIT> -<%ARGS> - -$Default => undef -$Name => 'ScripCondition' - -</%ARGS> diff --git a/rt/html/Admin/Elements/SelectSingleOrMultiple b/rt/html/Admin/Elements/SelectSingleOrMultiple deleted file mode 100644 index 98e9ee78c..000000000 --- a/rt/html/Admin/Elements/SelectSingleOrMultiple +++ /dev/null @@ -1,43 +0,0 @@ -%# BEGIN LICENSE BLOCK -%# -%# Copyright (c) 1996-2003 Jesse Vincent <jesse@bestpractical.com> -%# -%# (Except where explictly superceded by other copyright notices) -%# -%# This work is made available to you under the terms of Version 2 of -%# the GNU General Public License. A copy of that license should have -%# been provided with this software, but in any event can be snarfed -%# from www.gnu.org. -%# -%# This work is distributed in the hope that it will be useful, but -%# WITHOUT ANY WARRANTY; without even the implied warranty of -%# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -%# General Public License for more details. -%# -%# Unless otherwise specified, all modifications, corrections or -%# extensions to this work which alter its source code become the -%# property of Best Practical Solutions, LLC when submitted for -%# inclusion in the work. -%# -%# -%# END LICENSE BLOCK - <select name="<%$Name%>"> - <option value="1" <%$SingleDefault%>><&|/l&>Single</&></option> - <option value="0" <%$MultipleDefault%>><&|/l&>Multiple</&></option> - </select> - - -<%INIT> -my ($SingleDefault, $MultipleDefault); -if ($Default == 1) { - $SingleDefault = "SELECTED"; -} -elsif ($Default == 0 ) { - $MultipleDefault = "SELECTED"; -} - -</%INIT> -<%ARGS> -$Name => 'Single' -$Default => 1 -</%ARGS> diff --git a/rt/html/Admin/Elements/SelectStage b/rt/html/Admin/Elements/SelectStage deleted file mode 100644 index b62964be4..000000000 --- a/rt/html/Admin/Elements/SelectStage +++ /dev/null @@ -1,39 +0,0 @@ -%# BEGIN LICENSE BLOCK -%# -%# Copyright (c) 1996-2003 Jesse Vincent <jesse@bestpractical.com> -%# -%# (Except where explictly superceded by other copyright notices) -%# -%# This work is made available to you under the terms of Version 2 of -%# the GNU General Public License. A copy of that license should have -%# been provided with this software, but in any event can be snarfed -%# from www.gnu.org. -%# -%# This work is distributed in the hope that it will be useful, but -%# WITHOUT ANY WARRANTY; without even the implied warranty of -%# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -%# General Public License for more details. -%# -%# Unless otherwise specified, all modifications, corrections or -%# extensions to this work which alter its source code become the -%# property of Best Practical Solutions, LLC when submitted for -%# inclusion in the work. -%# -%# -%# END LICENSE BLOCK -<SELECT NAME=<%$Name%>> -% foreach my $stage (qw(TransactionCreate TransactionBatch)) { -<OPTION VALUE=<%$stage%> -<% ($stage eq $Default) && 'SELECTED' %> -><% loc($stage) %> -</OPTION> -% } -<%INIT> -if ($Default eq '') { - $Default = 'TransactionCreate'; -} -</%INIT> -<%ARGS> -$Default => 'TransactionCreate' -$Name => 'Stage' -</%ARGS> diff --git a/rt/html/Admin/Elements/SelectTemplate b/rt/html/Admin/Elements/SelectTemplate deleted file mode 100644 index 70ff4d1cc..000000000 --- a/rt/html/Admin/Elements/SelectTemplate +++ /dev/null @@ -1,61 +0,0 @@ -%# BEGIN LICENSE BLOCK -%# -%# Copyright (c) 1996-2003 Jesse Vincent <jesse@bestpractical.com> -%# -%# (Except where explictly superceded by other copyright notices) -%# -%# This work is made available to you under the terms of Version 2 of -%# the GNU General Public License. A copy of that license should have -%# been provided with this software, but in any event can be snarfed -%# from www.gnu.org. -%# -%# This work is distributed in the hope that it will be useful, but -%# WITHOUT ANY WARRANTY; without even the implied warranty of -%# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -%# General Public License for more details. -%# -%# Unless otherwise specified, all modifications, corrections or -%# extensions to this work which alter its source code become the -%# property of Best Practical Solutions, LLC when submitted for -%# inclusion in the work. -%# -%# -%# END LICENSE BLOCK -<SELECT NAME=<%$Name%>> -<OPTION VALUE="" -<% $Default eq 'none' && 'SELECTED' %> ->-</OPTION> -%while (my $Template = $PrimaryTemplates->Next) { -<OPTION VALUE=<%$Template->Id%> -<% ($Template->Id == $Default) && 'SELECTED' %> -><% loc($Template->Name) %> -</OPTION> -%} -%while (my $Template = $OtherTemplates->Next) { -<OPTION VALUE=<%$Template->Id%> -<% ($Template->Id == $Default) && 'SELECTED'%> -><&|/l, loc($Template->Name) &>Global template: [_1]</&> -</OPTION> -%} -</SELECT> - -<%INIT> - - -my $PrimaryTemplates = RT::Templates->new($session{'CurrentUser'}); -if ($Queue != 0) { -$PrimaryTemplates->LimitToQueue($Queue); -} - -my $OtherTemplates = RT::Templates->new($session{'CurrentUser'}); -$OtherTemplates->LimitToGlobal($DefaultQueue); - -</%INIT> -<%ARGS> - -$Queue => undef -$Default => 'none' -$DefaultQueue => undef -$Name => 'Template' - -</%ARGS> diff --git a/rt/html/Admin/Elements/SelectUsers b/rt/html/Admin/Elements/SelectUsers deleted file mode 100644 index d4c8a85ad..000000000 --- a/rt/html/Admin/Elements/SelectUsers +++ /dev/null @@ -1,40 +0,0 @@ -%# BEGIN LICENSE BLOCK -%# -%# Copyright (c) 1996-2003 Jesse Vincent <jesse@bestpractical.com> -%# -%# (Except where explictly superceded by other copyright notices) -%# -%# This work is made available to you under the terms of Version 2 of -%# the GNU General Public License. A copy of that license should have -%# been provided with this software, but in any event can be snarfed -%# from www.gnu.org. -%# -%# This work is distributed in the hope that it will be useful, but -%# WITHOUT ANY WARRANTY; without even the implied warranty of -%# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -%# General Public License for more details. -%# -%# Unless otherwise specified, all modifications, corrections or -%# extensions to this work which alter its source code become the -%# property of Best Practical Solutions, LLC when submitted for -%# inclusion in the work. -%# -%# -%# END LICENSE BLOCK -<SELECT MULTIPLE NAME="<%$Name%>" SIZE=10> -%while (my $user = $users->Next) { -<OPTION VALUE="<%$user->id%>"><%$user->Name%> -%} -</SELECT> - -<%INIT> -my $users = new RT::Users($session{'CurrentUser'}); - -$users->Limit(FIELD => 'id', VALUE => $RT::SystemUser->id, OPERATOR => '!=' ); -$users->Limit(FIELD => 'id', VALUE => $RT::Nobody->id, OPERATOR => '!=' ); -$users->LimitToPrivileged(); - -</%INIT> -<%ARGS> -$Name => 'Users' -</%ARGS> diff --git a/rt/html/Admin/Elements/SystemTabs b/rt/html/Admin/Elements/SystemTabs deleted file mode 100644 index f38febdd7..000000000 --- a/rt/html/Admin/Elements/SystemTabs +++ /dev/null @@ -1,70 +0,0 @@ -%# BEGIN LICENSE BLOCK -%# -%# Copyright (c) 1996-2003 Jesse Vincent <jesse@bestpractical.com> -%# -%# (Except where explictly superceded by other copyright notices) -%# -%# This work is made available to you under the terms of Version 2 of -%# the GNU General Public License. A copy of that license should have -%# been provided with this software, but in any event can be snarfed -%# from www.gnu.org. -%# -%# This work is distributed in the hope that it will be useful, but -%# WITHOUT ANY WARRANTY; without even the implied warranty of -%# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -%# General Public License for more details. -%# -%# Unless otherwise specified, all modifications, corrections or -%# extensions to this work which alter its source code become the -%# property of Best Practical Solutions, LLC when submitted for -%# inclusion in the work. -%# -%# -%# END LICENSE BLOCK -<& /Admin/Elements/Tabs, subtabs => $tabs, - current_tab => 'Admin/Global/', - current_subtab => $current_tab, - Title => $Title &> - -<%INIT> - my $tabs = { - - A => { title => loc('Scrips'), - path => 'Admin/Global/Scrips.html', - }, - B => { title => loc('Templates'), - path => 'Admin/Global/Templates.html', - }, - - F => { title => loc('Custom Fields'), - path => 'Admin/Global/CustomFields.html', - }, - - G => { title => loc('Group Rights'), - path => 'Admin/Global/GroupRights.html', - }, - H => { title => loc('User Rights'), - path => 'Admin/Global/UserRights.html', - } - -}; - - # Now let callbacks add their extra tabs - $m->comp('/Elements/Callback', tabs => $tabs, %ARGS); - - foreach my $tab (sort keys %{$tabs}) { - if ($tabs->{$tab}->{'path'} eq $current_tab) { - $tabs->{$tab}->{"subtabs"} = $subtabs; - $tabs->{$tab}->{"current_subtab"} = $current_subtab; - } - } -</%INIT> - - -<%ARGS> -$id => undef -$current_tab => undef -$subtabs => undef -$current_subtab => undef -$Title => undef -</%ARGS> diff --git a/rt/html/Admin/Elements/Tabs b/rt/html/Admin/Elements/Tabs deleted file mode 100644 index 8fa2708fb..000000000 --- a/rt/html/Admin/Elements/Tabs +++ /dev/null @@ -1,63 +0,0 @@ -%# BEGIN LICENSE BLOCK -%# -%# Copyright (c) 1996-2003 Jesse Vincent <jesse@bestpractical.com> -%# -%# (Except where explictly superceded by other copyright notices) -%# -%# This work is made available to you under the terms of Version 2 of -%# the GNU General Public License. A copy of that license should have -%# been provided with this software, but in any event can be snarfed -%# from www.gnu.org. -%# -%# This work is distributed in the hope that it will be useful, but -%# WITHOUT ANY WARRANTY; without even the implied warranty of -%# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -%# General Public License for more details. -%# -%# Unless otherwise specified, all modifications, corrections or -%# extensions to this work which alter its source code become the -%# property of Best Practical Solutions, LLC when submitted for -%# inclusion in the work. -%# -%# -%# END LICENSE BLOCK -<& /Elements/Tabs, - tabs => $tabs, - current_toptab => 'Admin/', - current_tab => $current_tab, - Title => $Title &> - -<%INIT> - my $tabs = { A => { title => loc('Users'), - path => 'Admin/Users/', - }, - B => { title => loc('Groups'), - path => 'Admin/Groups/', - }, - C => { title => loc('Queues'), - path => 'Admin/Queues/', - }, - D => { 'title' => loc('Global'), - path => 'Admin/Global/', - }, - }; - - # Now let callbacks add their extra tabs - $m->comp('/Elements/Callback', tabs => $tabs, %ARGS); - - foreach my $tab (sort keys %{$tabs}) { - if ($tabs->{$tab}->{'path'} eq $current_tab) { - $tabs->{$tab}->{"subtabs"} = $subtabs; - $tabs->{$tab}->{"current_subtab"} = $current_subtab; - } - } - -</%INIT> - - -<%ARGS> -$subtabs => undef -$current_tab => undef -$current_subtab => undef -$Title => undef -</%ARGS> diff --git a/rt/html/Admin/Elements/UserTabs b/rt/html/Admin/Elements/UserTabs deleted file mode 100644 index 764fdfcb5..000000000 --- a/rt/html/Admin/Elements/UserTabs +++ /dev/null @@ -1,74 +0,0 @@ -%# BEGIN LICENSE BLOCK -%# -%# Copyright (c) 1996-2003 Jesse Vincent <jesse@bestpractical.com> -%# -%# (Except where explictly superceded by other copyright notices) -%# -%# This work is made available to you under the terms of Version 2 of -%# the GNU General Public License. A copy of that license should have -%# been provided with this software, but in any event can be snarfed -%# from www.gnu.org. -%# -%# This work is distributed in the hope that it will be useful, but -%# WITHOUT ANY WARRANTY; without even the implied warranty of -%# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -%# General Public License for more details. -%# -%# Unless otherwise specified, all modifications, corrections or -%# extensions to this work which alter its source code become the -%# property of Best Practical Solutions, LLC when submitted for -%# inclusion in the work. -%# -%# -%# END LICENSE BLOCK -<& /Admin/Elements/Tabs, - subtabs => $tabs, - current_tab => 'Admin/Users/', - current_subtab => $current_subtab, - Title => $Title &> -<%INIT> -my $tabs; -my $subtabs; -if ($id) { -$tabs->{'this'} = { title => eval { $UserObj->Name }, - - path => "Admin/Users/Modify.html?id=".$id, -subtabs => { - Queues => { title => loc('Basics'), - path => "Admin/Users/Modify.html?id=".$id - }, -# Scrips => { title => loc('Rights'), -# path => "Admin/Users/Rights.html?id=".$id -# } - - } -} -} -if ($session{'CurrentUser'}->HasRight( Object => $RT::System, Right => 'AdminUsers')) { - $tabs->{"A"} = { title => loc('Select user'), - path => "Admin/Users/", - }; - $tabs->{"B"} = { title => loc('New user'), - path => "Admin/Users/Modify.html?Create=1", - separator => 1, - }; -} - - # Now let callbacks add their extra tabs - $m->comp('/Elements/Callback', tabs => $tabs, %ARGS); - -foreach my $tab ( sort keys %{$tabs} ) { - if ( $tabs->{$tab}->{'path'} eq $current_subtab ) { - $tabs->{$tab}->{"current_subtab"} = $current_subtab; - } -} -</%INIT> - - -<%ARGS> -$UserObj => undef -$id => undef -$current_tab => undef -$current_subtab => undef -$Title => undef -</%ARGS> diff --git a/rt/html/Admin/Global/CustomField.html b/rt/html/Admin/Global/CustomField.html deleted file mode 100644 index 0974af538..000000000 --- a/rt/html/Admin/Global/CustomField.html +++ /dev/null @@ -1,61 +0,0 @@ -%# BEGIN LICENSE BLOCK -%# -%# Copyright (c) 1996-2003 Jesse Vincent <jesse@bestpractical.com> -%# -%# (Except where explictly superceded by other copyright notices) -%# -%# This work is made available to you under the terms of Version 2 of -%# the GNU General Public License. A copy of that license should have -%# been provided with this software, but in any event can be snarfed -%# from www.gnu.org. -%# -%# This work is distributed in the hope that it will be useful, but -%# WITHOUT ANY WARRANTY; without even the implied warranty of -%# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -%# General Public License for more details. -%# -%# Unless otherwise specified, all modifications, corrections or -%# extensions to this work which alter its source code become the -%# property of Best Practical Solutions, LLC when submitted for -%# inclusion in the work. -%# -%# -%# END LICENSE BLOCK -<& /Admin/Elements/Header, Title => $title &> -<& /Admin/Elements/SystemTabs, - current_tab => 'Admin/Global/CustomFields.html', - current_subtab => $current_subtab, - subtabs => $subtabs, - Title => $title &> - -<& /Admin/Elements/EditCustomField, title => $title, %ARGS &> - -<%INIT> -my ($title, $current_subtab); - -my $subtabs = { - A => { title => loc('Select custom field'), - path => "Admin/Global/CustomFields.html" - }, - B => { title => loc('New custom field'), - path => "Admin/Global/CustomField.html?create=1&Queue=0", - separator => 1, - } - }; -if ( $ARGS{'create'} ) { - $current_subtab = "Admin/Global/CustomField.html?create=1&Queue=0"; - $title = loc('Create a CustomField which applies to all queues'); -} -else { - $current_subtab = - "Admin/Global/CustomField.html?CustomField=" . $CustomField . "&Queue=0"; - $title = loc('Modify a CustomField which applies to all queues'); - $subtabs->{"C"} = { - title => loc( 'Custom Field #[_1]', $CustomField ), - path => "Admin/Global/CustomField.html?CustomField=" . $CustomField . "&Queue=0" - }; -} -</%INIT> -<%ARGS> -$CustomField => undef -</%ARGS> diff --git a/rt/html/Admin/Global/CustomFields.html b/rt/html/Admin/Global/CustomFields.html deleted file mode 100644 index f6bbddfed..000000000 --- a/rt/html/Admin/Global/CustomFields.html +++ /dev/null @@ -1,47 +0,0 @@ -%# BEGIN LICENSE BLOCK -%# -%# Copyright (c) 1996-2003 Jesse Vincent <jesse@bestpractical.com> -%# -%# (Except where explictly superceded by other copyright notices) -%# -%# This work is made available to you under the terms of Version 2 of -%# the GNU General Public License. A copy of that license should have -%# been provided with this software, but in any event can be snarfed -%# from www.gnu.org. -%# -%# This work is distributed in the hope that it will be useful, but -%# WITHOUT ANY WARRANTY; without even the implied warranty of -%# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -%# General Public License for more details. -%# -%# Unless otherwise specified, all modifications, corrections or -%# extensions to this work which alter its source code become the -%# property of Best Practical Solutions, LLC when submitted for -%# inclusion in the work. -%# -%# -%# END LICENSE BLOCK -<& /Admin/Elements/Header, Title => $title &> -<& /Admin/Elements/SystemTabs, - current_tab => 'Admin/Global/CustomFields.html', - current_subtab => 'Admin/Global/CustomFields.html', - subtabs => $subtabs, - Title => $title &> - -<& /Admin/Elements/EditCustomFields, title => $title, %ARGS &> - -<%INIT> -my $subtabs = { - A => { title => loc('Select custom field'), - path => "Admin/Global/CustomFields.html" - }, - B => { title => loc('New custom field'), - path => "Admin/Global/CustomField.html?create=1&Queue=0", - separator => 1, - } - }; -my $title = loc("Modify Custom Fields which apply to all queues"); -</%INIT> -<%ARGS> -$id => undef -</%ARGS> diff --git a/rt/html/Admin/Global/GroupRights.html b/rt/html/Admin/Global/GroupRights.html deleted file mode 100644 index 150e83f43..000000000 --- a/rt/html/Admin/Global/GroupRights.html +++ /dev/null @@ -1,99 +0,0 @@ -%# BEGIN LICENSE BLOCK -%# -%# Copyright (c) 1996-2003 Jesse Vincent <jesse@bestpractical.com> -%# -%# (Except where explictly superceded by other copyright notices) -%# -%# This work is made available to you under the terms of Version 2 of -%# the GNU General Public License. A copy of that license should have -%# been provided with this software, but in any event can be snarfed -%# from www.gnu.org. -%# -%# This work is distributed in the hope that it will be useful, but -%# WITHOUT ANY WARRANTY; without even the implied warranty of -%# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -%# General Public License for more details. -%# -%# Unless otherwise specified, all modifications, corrections or -%# extensions to this work which alter its source code become the -%# property of Best Practical Solutions, LLC when submitted for -%# inclusion in the work. -%# -%# -%# END LICENSE BLOCK -<& /Admin/Elements/Header, Title => loc('Modify global group rights') &> -<& /Admin/Elements/SystemTabs, - current_tab => 'Admin/Global/GroupRights.html', - Title => loc('Modify global group rights') &> -<& /Elements/ListActions, actions => \@results &> - - <FORM METHOD=POST ACTION="GroupRights.html"> - -<& /Elements/TitleBoxStart, title => loc('Modify global group rights.')&> - -<h1><&|/l&>System groups</&></h1> -<TABLE> -% $Groups = RT::Groups->new($session{'CurrentUser'}); -% $Groups->LimitToSystemInternalGroups(); -% while (my $Group = $Groups->Next()) { - <TR ALIGN=RIGHT> - <TD VALIGN=TOP> - <% loc($Group->Type) %> - </TD> - <TD> - <& /Admin/Elements/SelectRights, PrincipalId => $Group->PrincipalId, - Object =>$RT::System &> - </TD> - </TR> -% } -</TABLE> -<h1><&|/l&>Roles</&></h1> -<TABLE> -% $Groups = RT::Groups->new($session{'CurrentUser'}); -% $Groups->LimitToRolesForSystem(); -% while (my $Group = $Groups->Next()) { - <TR ALIGN=RIGHT> - <TD VALIGN=TOP> - <% loc($Group->Type) %> - </TD> - <TD> - <& /Admin/Elements/SelectRights, PrincipalId => $Group->PrincipalId, - Object => $RT::System &> - </TD> - </TR> -% } -</TABLE> -<h1><&|/l&>User defined groups</&></h1> -<TABLE> -% $Groups = RT::Groups->new($session{'CurrentUser'}); -% $Groups->LimitToUserDefinedGroups(); -% while (my $Group = $Groups->Next()) { - <TR ALIGN=RIGHT> - <TD VALIGN=TOP> - <% $Group->Name %> - </TD> - <TD> - <& /Admin/Elements/SelectRights, PrincipalId => $Group->PrincipalId, - Object => $RT::System &> - </TD> - </TR> -% } -</TABLE> - - <& /Elements/TitleBoxEnd &> - <& /Elements/Submit, Caption => loc("Be sure to save your changes"), Reset => 1 &> - - </FORM> - -<%INIT> - - #Update the acls. - my @results = ProcessACLChanges(\%ARGS); - - -my $Groups; - -</%INIT> - -<%ARGS> -</%ARGS> diff --git a/rt/html/Admin/Global/Scrip.html b/rt/html/Admin/Global/Scrip.html deleted file mode 100644 index 8b9cf6db6..000000000 --- a/rt/html/Admin/Global/Scrip.html +++ /dev/null @@ -1,56 +0,0 @@ -%# BEGIN LICENSE BLOCK -%# -%# Copyright (c) 1996-2003 Jesse Vincent <jesse@bestpractical.com> -%# -%# (Except where explictly superceded by other copyright notices) -%# -%# This work is made available to you under the terms of Version 2 of -%# the GNU General Public License. A copy of that license should have -%# been provided with this software, but in any event can be snarfed -%# from www.gnu.org. -%# -%# This work is distributed in the hope that it will be useful, but -%# WITHOUT ANY WARRANTY; without even the implied warranty of -%# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -%# General Public License for more details. -%# -%# Unless otherwise specified, all modifications, corrections or -%# extensions to this work which alter its source code become the -%# property of Best Practical Solutions, LLC when submitted for -%# inclusion in the work. -%# -%# -%# END LICENSE BLOCK -<& /Admin/Elements/Header, Title => $title &> -<& /Admin/Elements/SystemTabs, - current_tab => 'Admin/Global/Scrips.html', - current_subtab => $current_subtab, - subtabs => $subtabs, - Title => $title &> - -<& /Admin/Elements/EditScrip, title => $title, %ARGS &> - -<%init> -my ($title, $current_subtab); -my $subtabs = { - A => { title => loc('Select scrip'), - path => "Admin/Global/Scrips.html", - }, - B => { title => loc('New scrip'), - path => "Admin/Global/Scrip.html?create=1&Queue=0", - separator => 1, - } - }; - -if ($ARGS{'id'}) { - $current_subtab = "Admin/Global/Scrip.html?id=".$ARGS{'id'}."&Queue=0"; - $title = loc("Modify a scrip which applies to all queues"); - $subtabs->{"C"} = { title => loc('Scrip #[_1]', $ARGS{'id'}), - path => "Admin/Global/Scrip.html?id=".$ARGS{'id'}."&Queue=0" - } -} -else { - $current_subtab = "Admin/Global/Scrip.html?create=1&Queue=0"; - $title = loc("Add a scrip which will apply to all queues"); -} -</%init> diff --git a/rt/html/Admin/Global/Scrips.html b/rt/html/Admin/Global/Scrips.html deleted file mode 100644 index 763198015..000000000 --- a/rt/html/Admin/Global/Scrips.html +++ /dev/null @@ -1,53 +0,0 @@ -%# BEGIN LICENSE BLOCK -%# -%# Copyright (c) 1996-2003 Jesse Vincent <jesse@bestpractical.com> -%# -%# (Except where explictly superceded by other copyright notices) -%# -%# This work is made available to you under the terms of Version 2 of -%# the GNU General Public License. A copy of that license should have -%# been provided with this software, but in any event can be snarfed -%# from www.gnu.org. -%# -%# This work is distributed in the hope that it will be useful, but -%# WITHOUT ANY WARRANTY; without even the implied warranty of -%# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -%# General Public License for more details. -%# -%# Unless otherwise specified, all modifications, corrections or -%# extensions to this work which alter its source code become the -%# property of Best Practical Solutions, LLC when submitted for -%# inclusion in the work. -%# -%# -%# END LICENSE BLOCK -<& /Admin/Elements/Header, Title => $title &> -<& /Admin/Elements/SystemTabs, - current_tab => 'Admin/Global/Scrips.html', - current_subtab => 'Admin/Global/Scrips.html', - subtabs => $subtabs, - Title => $title &> -<& /Admin/Elements/EditScrips, title => $title, id => $id, %ARGS &> -</form> -<%init> - -my $subtabs = { - A => { title => loc('Select scrip'), - path => "Admin/Global/Scrips.html", - }, - B => { title => loc('New scrip'), - path => "Admin/Global/Scrip.html?create=1&Queue=0", - separator => 1, - } - }; -my $title = loc("Modify scrips which apply to all queues"); - -my (@actions); - -</%init> - - - -<%ARGS> -$id => 0 -</%ARGS> diff --git a/rt/html/Admin/Global/Template.html b/rt/html/Admin/Global/Template.html deleted file mode 100644 index 71f77e9dd..000000000 --- a/rt/html/Admin/Global/Template.html +++ /dev/null @@ -1,101 +0,0 @@ -%# BEGIN LICENSE BLOCK -%# -%# Copyright (c) 1996-2003 Jesse Vincent <jesse@bestpractical.com> -%# -%# (Except where explictly superceded by other copyright notices) -%# -%# This work is made available to you under the terms of Version 2 of -%# the GNU General Public License. A copy of that license should have -%# been provided with this software, but in any event can be snarfed -%# from www.gnu.org. -%# -%# This work is distributed in the hope that it will be useful, but -%# WITHOUT ANY WARRANTY; without even the implied warranty of -%# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -%# General Public License for more details. -%# -%# Unless otherwise specified, all modifications, corrections or -%# extensions to this work which alter its source code become the -%# property of Best Practical Solutions, LLC when submitted for -%# inclusion in the work. -%# -%# -%# END LICENSE BLOCK -<& /Admin/Elements/Header, Title => loc("Modify template [_1]", $TemplateObj->id) &> -<& /Admin/Elements/SystemTabs, - current_tab => 'Admin/Global/Templates.html', - current_subtab => $current_subtab, - subtabs => $subtabs, - Title => loc("Modify template [_1]", $TemplateObj->id) &> -<& /Elements/ListActions, actions => \@results &> - - -<FORM METHOD=POST ACTION="Template.html"> -%if ($Create ) { -<INPUT TYPE=HIDDEN NAME="Template" VALUE="new"> -% } else { -<INPUT TYPE=HIDDEN NAME="Template" VALUE="<%$TemplateObj->Id%>"> -% } - -%# hang onto the queue id -<INPUT TYPE=HIDDEN name="Queue" value="<%$Queue%>"> - -<& /Admin/Elements/ModifyTemplate, Name => $TemplateObj->Name, Description => $TemplateObj->Description, Content => $TemplateObj->Content &> - -<& /Elements/Submit, Caption => loc("Be sure to save your changes"), Reset => 1 &> -</FORM> - - - -<%INIT> - -my $TemplateObj = new RT::Template($session{'CurrentUser'}); -my ($title, @results, $current_subtab); - -my $subtabs = { - A => { title => loc('Select template'), - path => "Admin/Global/Templates.html" - }, - B => { title => loc('New template'), - path => "Admin/Global/Template.html?Create=1&Queue=0", - separator => 1, - } - }; - - -if ($Create) { - $current_subtab = "Admin/Global/Template.html?Create=1&Queue=0"; - $title = loc("Create a template"); -} - -else { - if ($Template eq 'new') { - my ($val, $msg) = $TemplateObj->Create(Queue => $Queue, Name => $Name); - Abort(loc("Could not create template: [_1]", $msg)) unless ($val); - push @results, $msg; - } - else { - $TemplateObj->Load($Template) || Abort(loc('No Template')); - } - $title = loc('Modify template [_1]', loc($TemplateObj->Name())); - - -} -if ($TemplateObj->Id()) { - my @attribs = qw( Description Content Queue Name); - my @aresults = UpdateRecordObject( AttributesRef => \@attribs, - Object => $TemplateObj, - ARGSRef => \%ARGS); - $current_subtab = "Admin/Global/Template.html?Queue=0&Template=".$TemplateObj->Id(); - $subtabs->{"C"} = { title => loc('Template #[_1]', $TemplateObj->Id()), - path => "Admin/Global/Template.html?Queue=0&Template=".$TemplateObj->Id(), - }; - push @results, @aresults; -} -</%INIT> -<%ARGS> -$Queue => undef -$Template => undef -$Create => undef -$Name => undef -</%ARGS> diff --git a/rt/html/Admin/Global/Templates.html b/rt/html/Admin/Global/Templates.html deleted file mode 100644 index 77aab0730..000000000 --- a/rt/html/Admin/Global/Templates.html +++ /dev/null @@ -1,53 +0,0 @@ -%# BEGIN LICENSE BLOCK -%# -%# Copyright (c) 1996-2003 Jesse Vincent <jesse@bestpractical.com> -%# -%# (Except where explictly superceded by other copyright notices) -%# -%# This work is made available to you under the terms of Version 2 of -%# the GNU General Public License. A copy of that license should have -%# been provided with this software, but in any event can be snarfed -%# from www.gnu.org. -%# -%# This work is distributed in the hope that it will be useful, but -%# WITHOUT ANY WARRANTY; without even the implied warranty of -%# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -%# General Public License for more details. -%# -%# Unless otherwise specified, all modifications, corrections or -%# extensions to this work which alter its source code become the -%# property of Best Practical Solutions, LLC when submitted for -%# inclusion in the work. -%# -%# -%# END LICENSE BLOCK -<& /Admin/Elements/Header, Title => $title &> -<& /Admin/Elements/SystemTabs, - current_tab => 'Admin/Global/Templates.html', - current_subtab => 'Admin/Global/Templates.html', - subtabs => $subtabs, - Title => $title &> -<& /Admin/Elements/EditTemplates, title => $title, %ARGS &> -</form> -<%init> - -my $subtabs = { - A => { title => loc('Select template'), - path => "Admin/Global/Templates.html" - }, - B => { title => loc('New template'), - path => "Admin/Global/Template.html?Create=1&Queue=0", - separator => 1, - } - }; -my $title = loc("Modify templates which apply to all queues"); - -my (@actions); - -</%init> - - - -<%ARGS> -$id => undef -</%ARGS> diff --git a/rt/html/Admin/Global/UserRights.html b/rt/html/Admin/Global/UserRights.html deleted file mode 100644 index aee82d1f4..000000000 --- a/rt/html/Admin/Global/UserRights.html +++ /dev/null @@ -1,77 +0,0 @@ -%# BEGIN LICENSE BLOCK -%# -%# Copyright (c) 1996-2003 Jesse Vincent <jesse@bestpractical.com> -%# -%# (Except where explictly superceded by other copyright notices) -%# -%# This work is made available to you under the terms of Version 2 of -%# the GNU General Public License. A copy of that license should have -%# been provided with this software, but in any event can be snarfed -%# from www.gnu.org. -%# -%# This work is distributed in the hope that it will be useful, but -%# WITHOUT ANY WARRANTY; without even the implied warranty of -%# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -%# General Public License for more details. -%# -%# Unless otherwise specified, all modifications, corrections or -%# extensions to this work which alter its source code become the -%# property of Best Practical Solutions, LLC when submitted for -%# inclusion in the work. -%# -%# -%# END LICENSE BLOCK -<& /Admin/Elements/Header, Title => loc('Modify global user rights') &> -<& /Admin/Elements/SystemTabs, - current_tab => 'Admin/Global/UserRights.html', - Title => loc('Modify global user rights') &> -<& /Elements/ListActions, actions => \@results &> - - <FORM METHOD=POST ACTION="UserRights.html"> - -<& /Elements/TitleBoxStart, title => loc('Modify global user rights.') &> - -<TABLE> - -% while (my $Member = $Users->Next()) { -% my $UserObj = $Member->MemberObj->Object(); -% my $group = RT::Group->new($session{'CurrentUser'}); -% $group->LoadACLEquivalenceGroup($Member->MemberObj); - <TR ALIGN=RIGHT> - <TD VALIGN=TOP> - <% $UserObj->Name %> - </TD> - <TD> - <& /Admin/Elements/SelectRights, PrincipalId => $group->PrincipalId, - Object => $RT::System &> - </TD> - </TR> -% } -</TABLE> - - <& /Elements/TitleBoxEnd &> - <& /Elements/Submit, Caption => loc("Be sure to save your changes"), Reset => 1 &> - - </FORM> - -<%INIT> - - #Update the acls. - my @results = ProcessACLChanges(\%ARGS); - -# {{{ Deal with setting up the display of current rights. - - -# Find out which users we want to display ACL selects for -my $Privileged = RT::Group->new($session{'CurrentUser'}); -$Privileged->LoadSystemInternalGroup('Privileged'); -my $Users = $Privileged->MembersObj(); - - - -# }}} - -</%INIT> - -<%ARGS> -</%ARGS> diff --git a/rt/html/Admin/Global/index.html b/rt/html/Admin/Global/index.html deleted file mode 100644 index 1749f4ffb..000000000 --- a/rt/html/Admin/Global/index.html +++ /dev/null @@ -1,64 +0,0 @@ -%# BEGIN LICENSE BLOCK -%# -%# Copyright (c) 1996-2003 Jesse Vincent <jesse@bestpractical.com> -%# -%# (Except where explictly superceded by other copyright notices) -%# -%# This work is made available to you under the terms of Version 2 of -%# the GNU General Public License. A copy of that license should have -%# been provided with this software, but in any event can be snarfed -%# from www.gnu.org. -%# -%# This work is distributed in the hope that it will be useful, but -%# WITHOUT ANY WARRANTY; without even the implied warranty of -%# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -%# General Public License for more details. -%# -%# Unless otherwise specified, all modifications, corrections or -%# extensions to this work which alter its source code become the -%# property of Best Practical Solutions, LLC when submitted for -%# inclusion in the work. -%# -%# -%# END LICENSE BLOCK -<& /Elements/Callback, tabs => $tabs, %ARGS &> -<& /Admin/Elements/Header, Title => loc('Admin/Global configuration') &> -<& /Admin/Elements/SystemTabs, - Title => loc('Admin/Global configuration') &> - -<ul> -% foreach my $key (sort keys %$tabs) { -<li><font size="+2"><a href="<% $tabs->{$key}{path} %>"><% $tabs->{$key}{title} %></a></font><br> -<% $tabs->{$key}{text} %> -</li> -% } -</ul> - -<%INIT> - my $tabs = { - - A => { title => loc('Scrips'), - text => loc('Modify scrips which apply to all queues'), - path => 'Scrips.html', - }, - B => { title => loc('Templates'), - text => loc('Edit system templates'), - path => 'Templates.html', - }, - - F => { title => loc('Custom Fields'), - text => loc('Modify Custom Fields which apply to all queues'), - path => 'CustomFields.html', - }, - - G => { title => loc('Group Rights'), - text => loc('Modify global group rights'), - path => 'GroupRights.html', - }, - H => { title => loc('User Rights'), - text => loc('Modify global user rights'), - path => 'UserRights.html', - } - -}; -</%INIT> diff --git a/rt/html/Admin/Groups/GroupRights.html b/rt/html/Admin/Groups/GroupRights.html deleted file mode 100644 index 6220259d3..000000000 --- a/rt/html/Admin/Groups/GroupRights.html +++ /dev/null @@ -1,95 +0,0 @@ -%# BEGIN LICENSE BLOCK -%# -%# Copyright (c) 1996-2003 Jesse Vincent <jesse@bestpractical.com> -%# -%# (Except where explictly superceded by other copyright notices) -%# -%# This work is made available to you under the terms of Version 2 of -%# the GNU General Public License. A copy of that license should have -%# been provided with this software, but in any event can be snarfed -%# from www.gnu.org. -%# -%# This work is distributed in the hope that it will be useful, but -%# WITHOUT ANY WARRANTY; without even the implied warranty of -%# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -%# General Public License for more details. -%# -%# Unless otherwise specified, all modifications, corrections or -%# extensions to this work which alter its source code become the -%# property of Best Practical Solutions, LLC when submitted for -%# inclusion in the work. -%# -%# -%# END LICENSE BLOCK -<& /Admin/Elements/Header, Title => loc('Modify group rights for group [_1]', $GroupObj->Name) &> -<& /Admin/Elements/GroupTabs, - GroupObj => $GroupObj, - current_tab => 'Admin/Groups/GroupRights.html?id='.$id, - Title => loc('Modify group rights for group [_1]', $GroupObj->Name) &> -<& /Elements/ListActions, actions => \@results &> - - <FORM METHOD=POST ACTION="GroupRights.html"> - <INPUT TYPE=HIDDEN NAME=id VALUE="<% $GroupObj->id %>"> - -<& /Elements/TitleBoxStart, title => loc('Modify group rights for group [_1]', $GroupObj->Name) &> - -<h1><&|/l&>System groups</&></h1> -<TABLE> -% $Groups = RT::Groups->new($session{'CurrentUser'}); -% $Groups->LimitToSystemInternalGroups(); -% while (my $Group = $Groups->Next()) { - <TR ALIGN=RIGHT> - <TD VALIGN=TOP> - <% loc($Group->Type) %> - </TD> - <TD> - <& /Admin/Elements/SelectRights, PrincipalId => $Group->PrincipalId, - PrincipalType => 'Group', - Object => $GroupObj &> - </TD> - </TR> -% } -</TABLE> -<h1><&|/l&>User defined groups</&></h1> -<TABLE> -% $Groups = RT::Groups->new($session{'CurrentUser'}); -% $Groups->LimitToUserDefinedGroups(); -% while (my $Group = $Groups->Next()) { - <TR ALIGN=RIGHT> - <TD VALIGN=TOP> - <% $Group->Name %> - </TD> - <TD> - <& /Admin/Elements/SelectRights, PrincipalId => $Group->PrincipalId, - PrincipalType => 'Group', - Object => $GroupObj &> - </TD> - </TR> -% } -</TABLE> - - <& /Elements/TitleBoxEnd &> - <& /Elements/Submit, Caption => loc("Be sure to save your changes"), Reset => 1 &> - - </FORM> - -<%INIT> - - #Update the acls. - my @results = ProcessACLChanges(\%ARGS); - - -if (!defined $id) { - Abort(loc("No Group defined")); -} - -my $GroupObj = RT::Group->new($session{'CurrentUser'}); -$GroupObj->Load($id) || Abort(loc("Couldn't load group [_1]",$id)); - -my $Groups; - -</%INIT> - -<%ARGS> -$id => undef -</%ARGS> diff --git a/rt/html/Admin/Groups/Members.html b/rt/html/Admin/Groups/Members.html deleted file mode 100644 index 6e669666f..000000000 --- a/rt/html/Admin/Groups/Members.html +++ /dev/null @@ -1,134 +0,0 @@ -%# BEGIN LICENSE BLOCK -%# -%# Copyright (c) 1996-2003 Jesse Vincent <jesse@bestpractical.com> -%# -%# (Except where explictly superceded by other copyright notices) -%# -%# This work is made available to you under the terms of Version 2 of -%# the GNU General Public License. A copy of that license should have -%# been provided with this software, but in any event can be snarfed -%# from www.gnu.org. -%# -%# This work is distributed in the hope that it will be useful, but -%# WITHOUT ANY WARRANTY; without even the implied warranty of -%# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -%# General Public License for more details. -%# -%# Unless otherwise specified, all modifications, corrections or -%# extensions to this work which alter its source code become the -%# property of Best Practical Solutions, LLC when submitted for -%# inclusion in the work. -%# -%# -%# END LICENSE BLOCK -<& /Admin/Elements/Header, Title => "RT/Admin/Edit the group ". $Group->Name &> -<& /Admin/Elements/GroupTabs, GroupObj => $Group, - current_tab => 'Admin/Groups/Members.html?id='.$id, - Title => "RT/Admin/Edit the group ". $Group->Name &> -<& /Elements/ListActions, actions => \@results &> - - -<& /Elements/TitleBoxStart, title => loc('Editing membership for group [_1]', $Group->Name) &> - -<FORM ACTION="<%$RT::WebPath%>/Admin/Groups/Members.html" METHOD=POST> -<INPUT TYPE=HIDDEN NAME=id VALUE="<%$Group->Id%>"> -<TABLE WIDTH="100%"> -<TR> -<TD> -<h3><&|/l&>Current members</&></h3> -</TD> -<TD> -<h3><&|/l&>Add members</&></h3> -</TD> -</TR> - -<TR> -<TD VALIGN=TOP> - -% if ($Group->MembersObj->Count == 0 ) { -<i><&|/l&>(No members)</&></i> -% } else { -<i><&|/l&>(Check box to delete)</&></i> -<br> -<br> -<&|/l&>Users</&> -% my $UserMembers = $Group->MembersObj; -% $UserMembers->LimitToUsers(); -<UL> -% while (my $member = $UserMembers->Next()) { -<LI><INPUT TYPE=CHECKBOX Name="DeleteMember-<%$member->MemberId%>"> -<%$member->MemberObj->Object->Name%> (<%$member->MemberObj->Object->RealName%>) -% } -</ul> -<&|/l&>Groups</&> -<ul> -% my $GroupMembers = $Group->MembersObj; -% $GroupMembers->LimitToGroups(); -% while (my $member = $GroupMembers->Next()) { -<LI><INPUT TYPE=CHECKBOX Name="DeleteMember-<%$member->MemberId%>"> -<%$member->MemberObj->Object->Name%> -% } -% } -</UL> -</TD> -<TD VALIGN=TOP> -<& /Admin/Elements/SelectNewGroupMembers, Name => "AddMembers", Group => $Group &> -</TD> -</TR> -</TABLE> -<& /Elements/TitleBoxEnd &> -<& /Elements/Submit, Caption => loc("Be sure to save your changes"), Reset => 1 &> -</form> - - -<%INIT> - -my $Group = new RT::Group($session{'CurrentUser'}); -$Group->Load($id) || Abort(loc('Could not load group')); - -my (@results); - -my $key; -foreach $key (keys %ARGS) { - -if ($key =~ /^DeleteMember-(\d+)$/) { - my $id = $1; - my ($val,$msg) = $Group->DeleteMember($id); - push (@results, $msg); -} -} - -# Make sure AddMembers is always an array -my @AddMembers = ( - ((ref $AddMembersUsers eq 'ARRAY') ? @{$AddMembersUsers} : ($AddMembersUsers)), - ((ref $AddMembersGroups eq 'ARRAY') ? @{$AddMembersGroups} : ($AddMembersGroups)), -); - -foreach my $member (@AddMembers) { - next unless ($member); - - my $principal; - - if ($member =~ /^Group-(\d+)$/) { - $principal = RT::Group->new($session{'CurrentUser'}); - $principal->Load($1); - } elsif ($member =~ /^User-(\d+)$/) { - $principal = RT::User->new($session{'CurrentUser'}); - $principal->Load($1); - } else { - next; - } - - - my ($val, $msg) = $Group->AddMember($principal->PrincipalId); - push (@results, $msg); -} - - -</%INIT> - -<%ARGS> -$AddMembersUsers => undef -$AddMembersGroups => undef -$id => undef -</%ARGS> diff --git a/rt/html/Admin/Groups/Modify.html b/rt/html/Admin/Groups/Modify.html deleted file mode 100644 index c5e91588e..000000000 --- a/rt/html/Admin/Groups/Modify.html +++ /dev/null @@ -1,134 +0,0 @@ -%# BEGIN LICENSE BLOCK -%# -%# Copyright (c) 1996-2003 Jesse Vincent <jesse@bestpractical.com> -%# -%# (Except where explictly superceded by other copyright notices) -%# -%# This work is made available to you under the terms of Version 2 of -%# the GNU General Public License. A copy of that license should have -%# been provided with this software, but in any event can be snarfed -%# from www.gnu.org. -%# -%# This work is distributed in the hope that it will be useful, but -%# WITHOUT ANY WARRANTY; without even the implied warranty of -%# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -%# General Public License for more details. -%# -%# Unless otherwise specified, all modifications, corrections or -%# extensions to this work which alter its source code become the -%# property of Best Practical Solutions, LLC when submitted for -%# inclusion in the work. -%# -%# -%# END LICENSE BLOCK -<& /Admin/Elements/Header, Title => $title &> - -<& /Admin/Elements/GroupTabs, - GroupObj => $Group, - current_tab => $current_tab, - Title => $title &> -<& /Elements/ListActions, actions => \@results &> - - - -<FORM ACTION="<%$RT::WebPath%>/Admin/Groups/Modify.html" METHOD=POST> - -%unless ($Group->Id) { -<INPUT TYPE=HIDDEN NAME=id VALUE="new"> -% } else { -<INPUT TYPE=HIDDEN NAME=id VALUE="<%$Group->Id%>"> -% } -<TABLE> -<TR><TD ALIGN=RIGHT> -<&|/l&>Name</&>: -</TD> -<TD><INPUT name="Name" value="<%$Group->Name%>"></TD> -</TR><TR> -<TD ALIGN=RIGHT> -<&|/l&>Description</&>:</TD><TD COLSPAN=3><INPUT name="Description" value="<%$Group->Description%>" size=60></TD> -</TR><TR> -<TD COLSPAN=2> -<INPUT TYPE=HIDDEN NAME="SetEnabled" VALUE="1"> -<INPUT TYPE=CHECKBOX NAME="Enabled" VALUE="1" <%$EnabledChecked%>> <&|/l&>Enabled (Unchecking this box disables this group)</&><BR> -</TR> -</TABLE> -<& /Elements/Submit, Caption => loc("Be sure to save your changes"), Reset => 1 &> -</form> -<%INIT> - -my $current_tab; -my ($title, @results, $Disabled, $EnabledChecked); - -my $Group = RT::Group->new($session{'CurrentUser'}); - -if ($Create) { - $current_tab = 'Admin/Groups/Modify.html?Create=1'; - $title = loc("Create a new group"); -} - -else { - $current_tab = 'Admin/Groups/Modify.html?id='.$id; - if ($id eq 'new' ) { - - my ($create_id, $create_msg) = $Group->CreateUserDefinedGroup(Name => - "$Name"); - unless ($create_id) { - Abort (loc("Group could not be created: [_1]", $create_msg)); - } - $id = $Group->Id; - } - else { - $Group->Load($id) || Abort('Could not load group'); - } - - - if ($id) { - $title = loc("Modify the group [_1]", $Group->Name); - - } - - # If the create failed - else { - $title = loc("Create a new group"); - $Create = 1; - } - -} - -if ($id) { - - my @fields = qw(Description Name ); - my @fieldresults = UpdateRecordObject ( AttributesRef => \@fields, - Object => $Group, - ARGSRef => \%ARGS ); - push (@results,@fieldresults); -} - -#we're asking about enabled on the web page but really care about disabled. -if ($Enabled == 1) { - $Disabled = 0; -} -else { - $Disabled = 1; -} -if ( ($SetEnabled) and ( $Disabled != $Group->Disabled) ) { - my ($code, $msg) = $Group->SetDisabled($Disabled); - push @results, loc('Enabled status [_1]', loc_fuzzy($msg)); -} - -unless ($Group->Disabled()) { - $EnabledChecked ="CHECKED"; -} - - -</%INIT> - - -<%ARGS> -$Create => undef -$Name => undef -$Description => undef -$SetEnabled => undef -$Enabled => undef -$id => undef -</%ARGS> diff --git a/rt/html/Admin/Groups/UserRights.html b/rt/html/Admin/Groups/UserRights.html deleted file mode 100644 index 0a87ef860..000000000 --- a/rt/html/Admin/Groups/UserRights.html +++ /dev/null @@ -1,92 +0,0 @@ -%# BEGIN LICENSE BLOCK -%# -%# Copyright (c) 1996-2003 Jesse Vincent <jesse@bestpractical.com> -%# -%# (Except where explictly superceded by other copyright notices) -%# -%# This work is made available to you under the terms of Version 2 of -%# the GNU General Public License. A copy of that license should have -%# been provided with this software, but in any event can be snarfed -%# from www.gnu.org. -%# -%# This work is distributed in the hope that it will be useful, but -%# WITHOUT ANY WARRANTY; without even the implied warranty of -%# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -%# General Public License for more details. -%# -%# Unless otherwise specified, all modifications, corrections or -%# extensions to this work which alter its source code become the -%# property of Best Practical Solutions, LLC when submitted for -%# inclusion in the work. -%# -%# -%# END LICENSE BLOCK -<& /Admin/Elements/Header, Title => loc('Modify user rights for group [_1]', $GroupObj->Name) &> -<& /Admin/Elements/GroupTabs, - GroupObj => $GroupObj, - current_tab => 'Admin/Groups/UserRights.html?id='.$id, - Title => loc('Modify user rights for group [_1]', $GroupObj->Name) &> -<& /Elements/ListActions, actions => \@results &> - - <FORM METHOD=POST ACTION="UserRights.html"> - <INPUT TYPE=HIDDEN NAME=id VALUE="<% $GroupObj->id %>"> - -<& /Elements/TitleBoxStart, title => loc('Modify user rights for group [_1]', $GroupObj->Name) &> - -<TABLE> - -% while (my $Member = $Users->Next()) { -% my $UserObj = $Member->MemberObj->Object(); - <TR ALIGN=RIGHT> - <TD VALIGN=TOP> - <% $UserObj->Name %> - </TD> - <TD> - <& /Admin/Elements/SelectRights, PrincipalId => $Member->MemberObj->Id, - PrincipalType => 'User', - Object => $GroupObj &> - </TD> - </TR> -% } - </TABLE> - - <& /Elements/TitleBoxEnd &> - <& /Elements/Submit, Caption => loc("Be sure to save your changes"), Reset => 1 &> - - </FORM> - -<%INIT> - - #Update the acls. - my @results = ProcessACLChanges(\%ARGS); - -# {{{ Deal with setting up the display of current rights. - - -#Define vars used in html above - - -if (!defined $id) { - Abort(loc("No Group defined")); -} - -my $GroupObj = RT::Group->new($session{'CurrentUser'}); -$GroupObj->Load($id) || Abort(loc("Couldn't load group [_1]",$id)); - -# Find out which users we want to display ACL selects for -my $Privileged = RT::Group->new($session{'CurrentUser'}); -$Privileged->LoadSystemInternalGroup('Privileged'); -my $Users = $Privileged->MembersObj(); - - - -# }}} - -</%INIT> - -<%ARGS> -$id => undef -$UserString => undef -$UserOp => undef -$UserField => undef -</%ARGS> diff --git a/rt/html/Admin/Groups/index.html b/rt/html/Admin/Groups/index.html deleted file mode 100644 index 57c86c90e..000000000 --- a/rt/html/Admin/Groups/index.html +++ /dev/null @@ -1,43 +0,0 @@ -%# BEGIN LICENSE BLOCK -%# -%# Copyright (c) 1996-2003 Jesse Vincent <jesse@bestpractical.com> -%# -%# (Except where explictly superceded by other copyright notices) -%# -%# This work is made available to you under the terms of Version 2 of -%# the GNU General Public License. A copy of that license should have -%# been provided with this software, but in any event can be snarfed -%# from www.gnu.org. -%# -%# This work is distributed in the hope that it will be useful, but -%# WITHOUT ANY WARRANTY; without even the implied warranty of -%# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -%# General Public License for more details. -%# -%# Unless otherwise specified, all modifications, corrections or -%# extensions to this work which alter its source code become the -%# property of Best Practical Solutions, LLC when submitted for -%# inclusion in the work. -%# -%# -%# END LICENSE BLOCK -<& /Admin/Elements/Header, Title => $title &> -<& /Admin/Elements/GroupTabs, current_tab => 'Admin/Groups/', - current_subtab => 'Admin/Groups/', - Title => $title &> - - -<UL> -%while ( my $Group = $Groups->Next) { -<LI><A HREF="Modify.html?id=<%$Group->id%>"><%$Group->Name || loc('(empty)')%></a><BR> -%} -</UL> - -<%INIT> -my $Groups = RT::Groups->new($session{'CurrentUser'}); -$Groups->LimitToUserDefinedGroups(); -my $title = loc('Select a group'); - -</%INIT> -<%ARGS> -</%ARGS> diff --git a/rt/html/Admin/Queues/CustomField.html b/rt/html/Admin/Queues/CustomField.html deleted file mode 100644 index 2515c3e94..000000000 --- a/rt/html/Admin/Queues/CustomField.html +++ /dev/null @@ -1,60 +0,0 @@ -%# BEGIN LICENSE BLOCK -%# -%# Copyright (c) 1996-2003 Jesse Vincent <jesse@bestpractical.com> -%# -%# (Except where explictly superceded by other copyright notices) -%# -%# This work is made available to you under the terms of Version 2 of -%# the GNU General Public License. A copy of that license should have -%# been provided with this software, but in any event can be snarfed -%# from www.gnu.org. -%# -%# This work is distributed in the hope that it will be useful, but -%# WITHOUT ANY WARRANTY; without even the implied warranty of -%# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -%# General Public License for more details. -%# -%# Unless otherwise specified, all modifications, corrections or -%# extensions to this work which alter its source code become the -%# property of Best Practical Solutions, LLC when submitted for -%# inclusion in the work. -%# -%# -%# END LICENSE BLOCK -<& /Admin/Elements/Header, Title => $title &> -<& /Admin/Elements/QueueTabs, id => $QueueObj->Id, - QueueObj => $QueueObj, - current_tab => 'Admin/Queues/CustomFields.html?id='.$QueueObj->id, - current_subtab => $current_subtab, - subtabs => $subtabs, - Title => $title &> - -<& /Admin/Elements/EditCustomField, title => $title, %ARGS &> - -<%INIT> -my $QueueObj = new RT::Queue($session{'CurrentUser'}); -$QueueObj->Load($Queue); - -my ($title, $current_subtab); - -unless($QueueObj->id) { - Abort(loc("Queue [_1] not found", $Queue)); -} -if ($CustomField) { - $title = loc('Modify a CustomField for queue [_1]', $QueueObj->Name()); -}else { - $current_subtab = "Admin/Queues/CustomField.html?create=1&Queue=".$QueueObj->id; - $title = loc('Create a CustomField for queue [_1]', $QueueObj->Name()); -} - -my $subtabs = { - A => { title => loc('New custom field'), - path => "Admin/Queues/CustomField.html?create=1&Queue=".$QueueObj->id - } - }; - -</%INIT> -<%ARGS> -$CustomField => undef -$Queue => undef -</%ARGS> diff --git a/rt/html/Admin/Queues/CustomFields.html b/rt/html/Admin/Queues/CustomFields.html deleted file mode 100644 index ddf39d71a..000000000 --- a/rt/html/Admin/Queues/CustomFields.html +++ /dev/null @@ -1,49 +0,0 @@ -%# BEGIN LICENSE BLOCK -%# -%# Copyright (c) 1996-2003 Jesse Vincent <jesse@bestpractical.com> -%# -%# (Except where explictly superceded by other copyright notices) -%# -%# This work is made available to you under the terms of Version 2 of -%# the GNU General Public License. A copy of that license should have -%# been provided with this software, but in any event can be snarfed -%# from www.gnu.org. -%# -%# This work is distributed in the hope that it will be useful, but -%# WITHOUT ANY WARRANTY; without even the implied warranty of -%# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -%# General Public License for more details. -%# -%# Unless otherwise specified, all modifications, corrections or -%# extensions to this work which alter its source code become the -%# property of Best Practical Solutions, LLC when submitted for -%# inclusion in the work. -%# -%# -%# END LICENSE BLOCK -<& /Admin/Elements/Header, Title => $title &> -<& /Admin/Elements/QueueTabs, id => $Queue->id, - current_tab => 'Admin/Queues/CustomFields.html?id='.$id, - QueueObj => $Queue, - subtabs => $subtabs, - Title => $title - &> - -<& /Admin/Elements/EditCustomFields, title => $title, %ARGS &> -<%INIT> -my $Queue = new RT::Queue($session{'CurrentUser'}); -$Queue->Load($id) || Abort(loc("Couldn't load queue", $id)); - -my $CustomFields = RT::CustomFields->new($RT::SystemUser); -$CustomFields->LimitToQueue($Queue->Id); -my $subtabs = { - A => { title => loc('New custom field'), - path => "Admin/Queues/CustomField.html?create=1&Queue=".$id, - } - }; - -my $title= loc('Edit Custom Fields for [_1]', $Queue->Name); -</%INIT> -<%ARGS> -$id => undef -</%ARGS> diff --git a/rt/html/Admin/Queues/GroupRights.html b/rt/html/Admin/Queues/GroupRights.html deleted file mode 100644 index a1ac709e1..000000000 --- a/rt/html/Admin/Queues/GroupRights.html +++ /dev/null @@ -1,110 +0,0 @@ -%# BEGIN LICENSE BLOCK -%# -%# Copyright (c) 1996-2003 Jesse Vincent <jesse@bestpractical.com> -%# -%# (Except where explictly superceded by other copyright notices) -%# -%# This work is made available to you under the terms of Version 2 of -%# the GNU General Public License. A copy of that license should have -%# been provided with this software, but in any event can be snarfed -%# from www.gnu.org. -%# -%# This work is distributed in the hope that it will be useful, but -%# WITHOUT ANY WARRANTY; without even the implied warranty of -%# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -%# General Public License for more details. -%# -%# Unless otherwise specified, all modifications, corrections or -%# extensions to this work which alter its source code become the -%# property of Best Practical Solutions, LLC when submitted for -%# inclusion in the work. -%# -%# -%# END LICENSE BLOCK -<& /Admin/Elements/Header, Title => loc('Modify group rights for queue [_1]', $QueueObj->Name) &> -<& /Admin/Elements/QueueTabs, id => $id, - QueueObj => $QueueObj, - current_tab => $current_tab, - Title => loc('Modify group rights for queue [_1]', $QueueObj->Name) &> -<& /Elements/ListActions, actions => \@results &> - - <FORM METHOD=POST ACTION="GroupRights.html"> - <INPUT TYPE=HIDDEN NAME=id VALUE="<% $QueueObj->id %>"> - - -<h1><&|/l&>System groups</&></h1> -<TABLE> -<& /Elements/Callback, QueueObj => $QueueObj, results => \@results, %ARGS &> -% $Groups = RT::Groups->new($session{'CurrentUser'}); -% $Groups->LimitToSystemInternalGroups(); -% while (my $Group = $Groups->Next()) { - <TR ALIGN=RIGHT> - <TD VALIGN=TOP> - <% loc($Group->Type) %> - </TD> - <TD> - <& /Admin/Elements/SelectRights, PrincipalId => $Group->PrincipalId, - Object => $QueueObj &> - </TD> - </TR> -% } -</TABLE> -<h1><&|/l&>Roles</&></h1> -<TABLE> -% $Groups = RT::Groups->new($session{'CurrentUser'}); -% $Groups->LimitToRolesForQueue($QueueObj->Id); -% while (my $Group = $Groups->Next()) { - <TR ALIGN=RIGHT> - <TD VALIGN=TOP> - <% loc($Group->Type) %> - </TD> - <TD> - <& /Admin/Elements/SelectRights, PrincipalId => $Group->PrincipalId, - Object => $QueueObj &> - </TD> - </TR> -% } -</TABLE> -<h1><&|/l&>User defined groups</&></h1> -<TABLE> -% $Groups = RT::Groups->new($session{'CurrentUser'}); -% $Groups->LimitToUserDefinedGroups(); -% while (my $Group = $Groups->Next()) { - <TR ALIGN=RIGHT> - <TD VALIGN=TOP> - <% $Group->Name %> - </TD> - <TD> - <& /Admin/Elements/SelectRights, PrincipalId => $Group->PrincipalId, - Object => $QueueObj &> - </TD> - </TR> -% } -</TABLE> - - <& /Elements/Submit, Caption => loc("Be sure to save your changes"), Reset => 1 &> - - </FORM> - -<%INIT> - - #Update the acls. - my @results = ProcessACLChanges(\%ARGS); - - -if (!defined $id) { - Abort(loc("No Queue defined")); -} - -my $QueueObj = RT::Queue->new($session{'CurrentUser'}); -$QueueObj->Load($id) || Abort(loc("Couldn't load queue [_1]",$id)); - -my $Groups; -my $current_tab; -$current_tab = 'Admin/Queues/GroupRights.html?id='.$QueueObj->id; - -</%INIT> - -<%ARGS> -$id => undef -</%ARGS> diff --git a/rt/html/Admin/Queues/Modify.html b/rt/html/Admin/Queues/Modify.html deleted file mode 100644 index 46608eba6..000000000 --- a/rt/html/Admin/Queues/Modify.html +++ /dev/null @@ -1,163 +0,0 @@ -%# BEGIN LICENSE BLOCK -%# -%# Copyright (c) 1996-2003 Jesse Vincent <jesse@bestpractical.com> -%# -%# (Except where explictly superceded by other copyright notices) -%# -%# This work is made available to you under the terms of Version 2 of -%# the GNU General Public License. A copy of that license should have -%# been provided with this software, but in any event can be snarfed -%# from www.gnu.org. -%# -%# This work is distributed in the hope that it will be useful, but -%# WITHOUT ANY WARRANTY; without even the implied warranty of -%# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -%# General Public License for more details. -%# -%# Unless otherwise specified, all modifications, corrections or -%# extensions to this work which alter its source code become the -%# property of Best Practical Solutions, LLC when submitted for -%# inclusion in the work. -%# -%# -%# END LICENSE BLOCK -<& /Admin/Elements/Header, Title => loc('Admin/Queue/Basics') &> -<& /Admin/Elements/QueueTabs, id => $QueueObj->id, - QueueObj => $QueueObj, - current_tab => $current_tab, - Title => loc('Admin/Queue/Basics') &> -<& /Elements/ListActions, actions => \@results &> - - - -<FORM ACTION="<%$RT::WebPath%>/Admin/Queues/Modify.html" METHOD=POST> -%if ($Create ) { -<INPUT TYPE=HIDDEN NAME=id VALUE="new"> -% } else { -<INPUT TYPE=HIDDEN NAME=id VALUE="<%$QueueObj->Id%>"> -% } - -<TABLE> -<TR><TD ALIGN=RIGHT> -<&|/l&>Queue Name</&>: -</TD> -<TD><INPUT name="Name" value="<% ($Create) ? "" : $QueueObj->Name %>"></TD> -</TR><TR> -<TD ALIGN=RIGHT> -<&|/l&>Description</&>:</TD><TD COLSPAN=3><INPUT name="Description" value="<% ($Create) ? "" : $QueueObj->Description %>" size=60></TD></TR> -<TR> -<TD ALIGN=RIGHT> -<&|/l&>Correspondence Address</&>: -</TD><TD> -<INPUT name="CorrespondAddress" value="<% ($Create) ? "" : $QueueObj->CorrespondAddress %>"> -<BR><font size="-1"><i><&|/l , $RT::CorrespondAddress&>(If left blank, will default to [_1]</&></i></font> -</TD> -<TD ALIGN=RIGHT> - -<&|/l&>Comment Address</&>: </TD><TD> -<INPUT NAME="CommentAddress" value="<% ($Create) ? "" : $QueueObj->CommentAddress %>"> -<BR><font size="-1"><i><&|/l , $RT::CommentAddress&>(If left blank, will default to [_1]</&></i></font> -</TD> -</TR><TR> - -<TD ALIGN=RIGHT> -<&|/l&>Priority starts at</&>: -</TD><TD><INPUT NAME="InitialPriority" value="<% ($Create) ? "" : $QueueObj->InitialPriority %>"> -</TD> -<TD ALIGN=RIGHT> -<&|/l&>Over time, priority moves toward</&>: -</TD><TD><INPUT NAME="FinalPriority" value="<% ($Create) ? "" : $QueueObj->FinalPriority %>"> -</TD> -</TR> -<TR> -<TD ALIGN=RIGHT> -<&|/l&>Requests should be due in</&>: -</TD><TD> -<INPUT NAME="DefaultDueIn" VALUE="<% ($Create) ? "" : $QueueObj->DefaultDueIn%>"> <&|/l&>days</&>. -</TD> -</TR> -<TR> -<TD> -</TD> -<TD COLSPAN=4><INPUT TYPE=HIDDEN NAME="SetEnabled" VALUE="1"> -<INPUT TYPE=CHECKBOX NAME="Enabled" VALUE="1" <%$EnabledChecked%>> <&|/l&>Enabled (Unchecking this box disables this queue)</&><BR> -<& /Elements/Callback, QueueObj => $QueueObj, results => \@results, %ARGS &> -</TD> -</TR> - -</TABLE> -<& /Elements/Submit &> -</form> - - - -<%INIT> -my $current_tab; -my $QueueObj = new RT::Queue($session{'CurrentUser'}); -$QueueObj->Load($id); -my ($title, @results, $Disabled, $EnabledChecked); -$EnabledChecked = "CHECKED"; - -if ($Create) { - $current_tab = 'Admin/Queues/Modify.html?Create=1'; - $title = loc("Create a queue"); -} else { - if ($id eq 'new') { - my ($val, $msg) = $QueueObj->Create(Name => $Name); - delete $session{'create_in_queues'}; - if ($val == 0 ) { - Abort("$msg"); - } - else { - push @results, $msg; - } - } - else { - $QueueObj->Load($id) || $QueueObj->Load($Name) || Abort("Couldn't load queue '$Name'"); - } - $title = loc('Editing Configuration for queue [_1]', $QueueObj->Name); - - $current_tab = 'Admin/Queues/Modify.html?id='.$QueueObj->id; -} -if ($QueueObj->Id()) { - delete $session{'create_in_queues'}; -my @attribs= qw(Description CorrespondAddress CommentAddress Name - InitialPriority FinalPriority DefaultDueIn); - - @results = UpdateRecordObject( AttributesRef => \@attribs, - Object => $QueueObj, - ARGSRef => \%ARGS); - - #we're asking about enabled on the web page but really care about disabled. - if ($Enabled == 1) { - $Disabled = 0; - } - else { - $Disabled = 1; - } - if ( ($SetEnabled) and ( $Disabled != $QueueObj->Disabled) ) { - my ($code, $msg) = $QueueObj->SetDisabled($Disabled); - push @results, loc('Enabled status [_1]', loc_fuzzy($msg)); - } - - if ($QueueObj->Disabled()) { - $EnabledChecked =""; - } -} -</%INIT> - - -<%ARGS> -$id => undef -$result => undef -$Name => undef -$Create => undef -$Description => undef -$CorrespondAddress => undef -$CommentAddress => undef -$InitialPriority => undef -$FinalPriority => undef -$DefaultDueIn => undef -$SetEnabled => undef -$Enabled => undef -</%ARGS> diff --git a/rt/html/Admin/Queues/People.html b/rt/html/Admin/Queues/People.html deleted file mode 100644 index e0a7345c0..000000000 --- a/rt/html/Admin/Queues/People.html +++ /dev/null @@ -1,186 +0,0 @@ -%# BEGIN LICENSE BLOCK -%# -%# Copyright (c) 1996-2003 Jesse Vincent <jesse@bestpractical.com> -%# -%# (Except where explictly superceded by other copyright notices) -%# -%# This work is made available to you under the terms of Version 2 of -%# the GNU General Public License. A copy of that license should have -%# been provided with this software, but in any event can be snarfed -%# from www.gnu.org. -%# -%# This work is distributed in the hope that it will be useful, but -%# WITHOUT ANY WARRANTY; without even the implied warranty of -%# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -%# General Public License for more details. -%# -%# Unless otherwise specified, all modifications, corrections or -%# extensions to this work which alter its source code become the -%# property of Best Practical Solutions, LLC when submitted for -%# inclusion in the work. -%# -%# -%# END LICENSE BLOCK -<& /Elements/Header, Title => loc('Modify people related to queue [_1]', $QueueObj->Name) &> -<& /Admin/Elements/QueueTabs, id => $id, - QueueObj => $QueueObj, - current_tab => $current_tab, - Title => loc('Modify people related to queue [_1]', $QueueObj->Name) &> - -<& /Elements/ListActions, actions => \@results &> - - -<FORM METHOD=POST ACTION="People.html"> -<INPUT TYPE=HIDDEN NAME=id VALUE="<%$QueueObj->Id%>"> - -<TABLE WIDTH=100%> -<TR> -<TD VALIGN=TOP > - -<h3><&|/l&>Current watchers</&></h3> - - -<&|/l&>Cc</&>: - -<& /Admin/Elements/EditQueueWatchers, QueueObj => $QueueObj, Watchers => $QueueObj->Cc &> - -<&|/l&>Administrative Cc</&>: - -<& /Admin/Elements/EditQueueWatchers, QueueObj => $QueueObj, Watchers => $QueueObj->AdminCc &> - - -</TD> -<TD VALIGN=TOP> -<h3><&|/l&>New watchers</&></h3> - -<&|/l&>Find people whose</&><BR> -<& /Elements/SelectUsers &> -<input type=submit name="OnlySearchForPeople" value="<&|/l&>Go!</&>"> -<BR> -<&|/l&>Find group whose</&><BR> -<& /Elements/SelectGroups &> -<input type=submit name="OnlySearchForGroup" value="<&|/l&>Go!</&>"> - -<p> -<&|/l&>Add new watchers</&>:<br> -<p> -<b><&|/l&>Users</&></b> -% if ($user_msg) { -<br> -<i><%$user_msg%></i> -% } elsif ($Users) { -<ul> -% while (my $u = $Users->Next ) { -<li><&/Elements/SelectWatcherType, Scope=>'queue', Name => -"Queue-AddWatcher-Principal-".$u->PrincipalId &> <%$u->Name%> -(<%$u->RealName%>) -% } -</ul> -% } - -<p> -<b><&|/l&>Groups</&></b> - -% if ($group_msg) { -<br> -<i><%$group_msg%></i> -% } elsif ($Groups) { -<ul> -% while (my $g = $Groups->Next ) { -<li><&/Elements/SelectWatcherType, Scope=>'queue', Name => -"Queue-AddWatcher-Principal-".$g->PrincipalId &> <%$g->Name%> -(<%$g->Description%>) -% } -</ul> -% } - -</TD> -</TR> -</TABLE> - - - - -<& /Elements/Submit, Label => loc('Save Changes'), Caption => loc("If you've updated anything above, be sure to"), Reset => 1 &> -</form> - -<%INIT> - -my $current_tab; -my ($field, @results, $User, $Users, $Groups, $watcher, $user_msg, $group_msg); - -# {{{ Load the queue -#If we get handed two ids, mason will make them an array. bleck. -# We want teh first one. Just because there's no other sensible way -# to deal - - - -my $QueueObj = new RT::Queue($session{'CurrentUser'}); -$QueueObj->Load($id) || Abort(loc("Couldn't load queue", $id)); -# }}} - -# {{{ Delete deletable watchers - -foreach my $key (keys %ARGS) { - my $id = $QueueObj->Id; - - if (($key =~ /^Queue-$id-DelWatcher-Type-(.*?)-Principal-(\d*)$/)) {; - my ($code, $msg) = $QueueObj->DeleteWatcher(Type => $1, - PrincipalId => $2); - push @results, $msg; - } -} -# }}} - -# {{{ Add new watchers -foreach my $key (keys %ARGS) { - #They're in this order because otherwise $1 gets clobbered :/ - if ( ($ARGS{$key} =~ /^(AdminCc|Cc)$/) and - ($key =~ /^Queue-AddWatcher-Principal-(\d*)$/) ) { - $RT::Logger->debug("Adding a watcher $1 to ".$ARGS{$key}."\n"); - my ($code, $msg) = $QueueObj->AddWatcher(Type => $ARGS{$key}, - PrincipalId => $1); - push @results, $msg; - } -} - -# }}} - - - -if (!length $ARGS{'UserString'}) { -$user_msg = loc("No principals selected."); - } -else { - $Users = new RT::Users($session{'CurrentUser'}); - $Users->Limit(FIELD => $ARGS{'UserField'}, - VALUE => $ARGS{'UserString'}, - OPERATOR => $ARGS{'UserOp'}); - } - -if (!length $ARGS{'GroupString'}) { -$group_msg = loc("No principals selected."); - } -else { -$Groups = new RT::Groups($session{'CurrentUser'}); -$Groups->Limit(FIELD => 'Domain', OPERATOR => '=', VALUE => 'UserDefined'); -$Groups->Limit(FIELD => $ARGS{'GroupField'}, - VALUE => $ARGS{'GroupString'}, - OPERATOR => $ARGS{'GroupOp'}); - } - -$current_tab = 'Admin/Queues/People.html?id='.$QueueObj->id; -</%INIT> - -<%ARGS> -$UserField => 'Name' -$UserOp => '=' -$UserString => undef -$GroupField => 'Name' -$GroupOp => '=' -$GroupString => undef -$Type => undef -$id => undef -</%ARGS> - diff --git a/rt/html/Admin/Queues/Scrip.html b/rt/html/Admin/Queues/Scrip.html deleted file mode 100644 index edbfcd66b..000000000 --- a/rt/html/Admin/Queues/Scrip.html +++ /dev/null @@ -1,67 +0,0 @@ -%# BEGIN LICENSE BLOCK -%# -%# Copyright (c) 1996-2003 Jesse Vincent <jesse@bestpractical.com> -%# -%# (Except where explictly superceded by other copyright notices) -%# -%# This work is made available to you under the terms of Version 2 of -%# the GNU General Public License. A copy of that license should have -%# been provided with this software, but in any event can be snarfed -%# from www.gnu.org. -%# -%# This work is distributed in the hope that it will be useful, but -%# WITHOUT ANY WARRANTY; without even the implied warranty of -%# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -%# General Public License for more details. -%# -%# Unless otherwise specified, all modifications, corrections or -%# extensions to this work which alter its source code become the -%# property of Best Practical Solutions, LLC when submitted for -%# inclusion in the work. -%# -%# -%# END LICENSE BLOCK -<& /Admin/Elements/Header, Title => $title &> -<& /Admin/Elements/QueueTabs, id => $QueueObj->Id, - QueueObj => $QueueObj, - current_tab => 'Admin/Queues/Scrips.html?id='.$QueueObj->id, - current_subtab => $current_subtab, - subtabs => $subtabs, - Title => $title &> - -<& /Admin/Elements/EditScrip, title => $title, %ARGS &> -<%init> -my $QueueObj = new RT::Queue($session{'CurrentUser'}); -$QueueObj->Load($Queue); - -my ($title, $current_subtab); -my $subtabs = { - A => { title => loc('Select scrip'), - path => "Admin/Queues/Scrips.html?id=".$QueueObj->id, - }, - B => { title => loc('New scrip'), - path => "Admin/Queues/Scrip.html?create=1&Queue=".$QueueObj->id, - separator => 1, - }, - }; - -unless($QueueObj->id) { - Abort(loc("Queue [_1] not found",$id)); -} -if ($id) { - $current_subtab = "Admin/Queues/Scrip.html?id=".$id."&Queue=".$QueueObj->id; - $title = loc("Modify a scrip for queue [_1]", $QueueObj->Name); - $subtabs->{"C"} = { title => loc("Scrip #[_1]",$QueueObj->id), - path => "Admin/Queues/Scrip.html?id=$id&Queue=".$QueueObj->id }; -} else { - $current_subtab = "Admin/Queues/Scrip.html?create=1&Queue=".$QueueObj->id; - $title = loc("Create a scrip for queue [_1]", $QueueObj->Name); -} - - -</%init> - -<%ARGS> -$id => undef -$Queue => undef -</%ARGS> diff --git a/rt/html/Admin/Queues/Scrips.html b/rt/html/Admin/Queues/Scrips.html deleted file mode 100644 index 60b28314f..000000000 --- a/rt/html/Admin/Queues/Scrips.html +++ /dev/null @@ -1,63 +0,0 @@ -%# BEGIN LICENSE BLOCK -%# -%# Copyright (c) 1996-2003 Jesse Vincent <jesse@bestpractical.com> -%# -%# (Except where explictly superceded by other copyright notices) -%# -%# This work is made available to you under the terms of Version 2 of -%# the GNU General Public License. A copy of that license should have -%# been provided with this software, but in any event can be snarfed -%# from www.gnu.org. -%# -%# This work is distributed in the hope that it will be useful, but -%# WITHOUT ANY WARRANTY; without even the implied warranty of -%# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -%# General Public License for more details. -%# -%# Unless otherwise specified, all modifications, corrections or -%# extensions to this work which alter its source code become the -%# property of Best Practical Solutions, LLC when submitted for -%# inclusion in the work. -%# -%# -%# END LICENSE BLOCK -<& /Admin/Elements/Header, Title => $title &> -<& /Admin/Elements/QueueTabs, id => $QueueObj->id, - QueueObj => $QueueObj, - current_tab => 'Admin/Queues/Scrips.html?id='.$id, - current_subtab => 'Admin/Queues/Scrips.html?id='.$id, - subtabs => $subtabs, - Title => $title &> - -% if (!$QueueObj->Disabled) { # Global scrips does not apply to disabled queues -<h2><&|/l&>Scrips which apply to all queues</&></h2> -<& /Admin/Elements/ListGlobalScrips &> -<BR> -% } -<& /Admin/Elements/EditScrips, title => $title, %ARGS &> -<%init> -my $QueueObj = new RT::Queue($session{'CurrentUser'}); -$QueueObj->Load($id); - -my $title; - -if ($QueueObj->id) { - $title = loc("Modify scrips for queue [_1]", $QueueObj->Name); -} else { - Abort(loc("Queue [_1] not found",$id)); -} - -my $subtabs = { - A => { title => loc('Select scrip'), - path => "Admin/Queues/Scrips.html?id=".$id, - }, - B => { title => loc('New scrip'), - path => "Admin/Queues/Scrip.html?create=1&Queue=".$id, - separator => 1, - } - }; -</%init> - -<%ARGS> -$id => undef #some identifier that a Queue could -</%ARGS> diff --git a/rt/html/Admin/Queues/Template.html b/rt/html/Admin/Queues/Template.html deleted file mode 100644 index 994de6108..000000000 --- a/rt/html/Admin/Queues/Template.html +++ /dev/null @@ -1,101 +0,0 @@ -%# BEGIN LICENSE BLOCK -%# -%# Copyright (c) 1996-2003 Jesse Vincent <jesse@bestpractical.com> -%# -%# (Except where explictly superceded by other copyright notices) -%# -%# This work is made available to you under the terms of Version 2 of -%# the GNU General Public License. A copy of that license should have -%# been provided with this software, but in any event can be snarfed -%# from www.gnu.org. -%# -%# This work is distributed in the hope that it will be useful, but -%# WITHOUT ANY WARRANTY; without even the implied warranty of -%# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -%# General Public License for more details. -%# -%# Unless otherwise specified, all modifications, corrections or -%# extensions to this work which alter its source code become the -%# property of Best Practical Solutions, LLC when submitted for -%# inclusion in the work. -%# -%# -%# END LICENSE BLOCK -<& /Admin/Elements/Header, Title => $title &> -<& /Admin/Elements/QueueTabs, id => $Queue, - QueueObj => $TemplateObj->QueueObj, - current_tab => 'Admin/Queues/Templates.html?id='.$Queue, - current_subtab => $current_subtab, - subtabs => $subtabs, - Title => $title &> -<& /Elements/ListActions, actions => \@results &> - -<FORM METHOD=POST ACTION="Template.html"> -%if ($Create ) { -<INPUT TYPE=HIDDEN NAME="Template" VALUE="new"> -% } else { -<INPUT TYPE=HIDDEN NAME="Template" VALUE="<%$TemplateObj->Id%>"> -% } - -%# hang onto the queue id -<INPUT TYPE=HIDDEN name="Queue" value="<%$Queue%>"> -<& /Admin/Elements/ModifyTemplate, Name => $TemplateObj->Name, Description => -$TemplateObj->Description, Content => $TemplateObj->Content &> -<& /Elements/Submit, Caption => loc("Be sure to save your changes"), Reset => 1 &> -</FORM> - - -<%INIT> - -my $TemplateObj = new RT::Template($session{'CurrentUser'}); -my ($title, @results, $current_subtab); - -my $subtabs = { - A => { title => loc('Select template'), - path => "Admin/Queues/Templates.html?id=$Queue" - }, - B => { title => loc('New template'), - path => "Admin/Queues/Template.html?Create=1&Queue=$Queue", - separator => 1, - } - }; - -if ($Create) { - $title = loc("Create a template"); - $current_subtab = "Admin/Queues/Template.html?create=1&Queue=".$Queue; -} - -else { - if ($Template eq 'new') { - my ($val, $msg) = $TemplateObj->Create(Queue => $Queue, Name => $Name); - Abort(loc("Could not create template: [_1]", $msg)) unless ($val); - push @results, $msg; - } - else { - $TemplateObj->Load($Template) || Abort(loc('No Template')); - } - $title = loc('Modify template [_1]', loc($TemplateObj->Name())); - - -} -if ($TemplateObj->Id()) { - $Queue = $TemplateObj->Queue; - - my @attribs = qw( Description Content Queue Name); - my @aresults = UpdateRecordObject( AttributesRef => \@attribs, - Object => $TemplateObj, - ARGSRef => \%ARGS); - $current_subtab = "Admin/Queues/Template.html?Queue=$Queue&Template=".$TemplateObj->Id(); - $subtabs->{"C"} = { title => loc('Template #[_1]', $TemplateObj->Id()), - path => "Admin/Queues/Template.html?Queue=$Queue&Template=".$TemplateObj->Id(), - }; - push @results, @aresults; -} - -</%INIT> -<%ARGS> -$Queue => undef -$Template => undef -$Create => undef -$Name => undef -</%ARGS> diff --git a/rt/html/Admin/Queues/Templates.html b/rt/html/Admin/Queues/Templates.html deleted file mode 100644 index 98bdf24c0..000000000 --- a/rt/html/Admin/Queues/Templates.html +++ /dev/null @@ -1,57 +0,0 @@ -%# BEGIN LICENSE BLOCK -%# -%# Copyright (c) 1996-2003 Jesse Vincent <jesse@bestpractical.com> -%# -%# (Except where explictly superceded by other copyright notices) -%# -%# This work is made available to you under the terms of Version 2 of -%# the GNU General Public License. A copy of that license should have -%# been provided with this software, but in any event can be snarfed -%# from www.gnu.org. -%# -%# This work is distributed in the hope that it will be useful, but -%# WITHOUT ANY WARRANTY; without even the implied warranty of -%# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -%# General Public License for more details. -%# -%# Unless otherwise specified, all modifications, corrections or -%# extensions to this work which alter its source code become the -%# property of Best Practical Solutions, LLC when submitted for -%# inclusion in the work. -%# -%# -%# END LICENSE BLOCK -<& /Admin/Elements/Header, Title => $title &> -<& /Admin/Elements/QueueTabs, id => $QueueObj->id, - current_tab => 'Admin/Queues/Templates.html?id='.$id, - current_subtab => 'Admin/Queues/Templates.html?id='.$id, - QueueObj => $QueueObj, - subtabs => $subtabs, - Title => $title &> - -<& /Admin/Elements/EditTemplates, title => $title, %ARGS &> - -<%INIT> -my $QueueObj = new RT::Queue($session{'CurrentUser'}); -$QueueObj->Load($id); - -my ($title, $current_subtab); - -if ($QueueObj->id) { - $title = loc("Edit Templates for queue [_1]", $QueueObj->Name); -} else { - Abort(loc("Queue [_1] not found",$id)); -} -my $subtabs = { - A => { title => loc('Select template'), - path => "Admin/Queues/Templates.html?id=".$id, - }, - B => { title => loc('New template'), - path => "Admin/Queues/Template.html?Create=1&Queue=".$id, - } - }; - -</%INIT> -<%ARGS> -$id => undef #some identifier that a Queue could -</%ARGS> diff --git a/rt/html/Admin/Queues/UserRights.html b/rt/html/Admin/Queues/UserRights.html deleted file mode 100644 index aeb55c70b..000000000 --- a/rt/html/Admin/Queues/UserRights.html +++ /dev/null @@ -1,90 +0,0 @@ -%# BEGIN LICENSE BLOCK -%# -%# Copyright (c) 1996-2003 Jesse Vincent <jesse@bestpractical.com> -%# -%# (Except where explictly superceded by other copyright notices) -%# -%# This work is made available to you under the terms of Version 2 of -%# the GNU General Public License. A copy of that license should have -%# been provided with this software, but in any event can be snarfed -%# from www.gnu.org. -%# -%# This work is distributed in the hope that it will be useful, but -%# WITHOUT ANY WARRANTY; without even the implied warranty of -%# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -%# General Public License for more details. -%# -%# Unless otherwise specified, all modifications, corrections or -%# extensions to this work which alter its source code become the -%# property of Best Practical Solutions, LLC when submitted for -%# inclusion in the work. -%# -%# -%# END LICENSE BLOCK -<& /Admin/Elements/Header, Title => loc('Modify user rights for queue [_1]', $QueueObj->Name) &> -<& /Admin/Elements/QueueTabs, id => $id, - QueueObj => $QueueObj, - current_tab => $current_tab, - Title => loc('Modify user rights for queue [_1]', $QueueObj->Name) &> -<& /Elements/ListActions, actions => \@results &> - - <FORM METHOD=POST ACTION="UserRights.html"> - <INPUT TYPE=HIDDEN NAME=id VALUE="<% $QueueObj->id %>"> - - -<TABLE> -<& /Elements/Callback, QueueObj => $QueueObj, results => \@results, %ARGS &> -% while (my $Member = $Users->Next()) { -% my $UserObj = $Member->MemberObj->Object(); -% my $group = RT::Group->new($session{'CurrentUser'}); -% $group->LoadACLEquivalenceGroup($Member->MemberObj); - <TR ALIGN=RIGHT> - <TD VALIGN=TOP> - <% $UserObj->Name %> - </TD> - <TD> - <& /Admin/Elements/SelectRights, PrincipalId=> $group->PrincipalId, - Object => $QueueObj &> - </TD> - </TR> -% } - </TABLE> - - <& /Elements/Submit, Caption => loc("Be sure to save your changes"), Reset => 1 &> - - </FORM> - -<%INIT> - - #Update the acls. - my @results = ProcessACLChanges(\%ARGS); - -# {{{ Deal with setting up the display of current rights. - - - -if (!defined $id) { - Abort(loc("No Queue defined")); -} - -my $QueueObj = RT::Queue->new($session{'CurrentUser'}); -$QueueObj->Load($id) || Abort(loc("Couldn't load queue [_1]",$id)); - -# Find out which users we want to display ACL selects for -my $Privileged = RT::Group->new($session{'CurrentUser'}); -$Privileged->LoadSystemInternalGroup('Privileged'); -my $Users = $Privileged->MembersObj(); - - - -# }}} -my $current_tab; -$current_tab = 'Admin/Queues/UserRights.html?id='.$QueueObj->id; -</%INIT> - -<%ARGS> -$id => undef -$UserString => undef -$UserOp => undef -$UserField => undef -</%ARGS> diff --git a/rt/html/Admin/Queues/index.html b/rt/html/Admin/Queues/index.html deleted file mode 100644 index 78a1d5d2d..000000000 --- a/rt/html/Admin/Queues/index.html +++ /dev/null @@ -1,61 +0,0 @@ -%# BEGIN LICENSE BLOCK -%# -%# Copyright (c) 1996-2003 Jesse Vincent <jesse@bestpractical.com> -%# -%# (Except where explictly superceded by other copyright notices) -%# -%# This work is made available to you under the terms of Version 2 of -%# the GNU General Public License. A copy of that license should have -%# been provided with this software, but in any event can be snarfed -%# from www.gnu.org. -%# -%# This work is distributed in the hope that it will be useful, but -%# WITHOUT ANY WARRANTY; without even the implied warranty of -%# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -%# General Public License for more details. -%# -%# Unless otherwise specified, all modifications, corrections or -%# extensions to this work which alter its source code become the -%# property of Best Practical Solutions, LLC when submitted for -%# inclusion in the work. -%# -%# -%# END LICENSE BLOCK -<& /Admin/Elements/Header, Title => loc("Admin queues") &> -<& /Admin/Elements/QueueTabs, current_tab => 'Admin/Queues/', - current_subtab => 'Admin/Queues/', - Title => loc("Admin queues") &> - - - -<%$caption%>:<BR> -<UL> -%if ($queues->Count == 0) { -<LI> <i><&|/l&>No queues matching search criteria found.</&></i> -% } -%while ( $queue = $queues->Next) { -<LI><A HREF="Modify.html?id=<%$queue->id%>"><%$queue->Name%></a></LI> -%} -</UL> -<BR> -<FORM METHOD=POST ACTION="<% $RT::WebPath %>/Admin/Queues/index.html"> -<input type="checkbox" name="FindDisabledQueues"> <&|/l&>Include disabled queues in listing.</&> -<div align=right><input type=submit value="<&|/l&>Go!</&>"></div> -</FORM> - -<%INIT> -my ($queue, $caption); -my $queues = new RT::Queues($session{'CurrentUser'}); -$queues->UnLimit(); - -if ($FindDisabledQueues) { - $caption = loc("All Queues"); - $queues->{'find_disabled_rows'} = 1; -} else { - $caption = loc("Enabled Queues"); -} - -</%INIT> -<%ARGS> -$FindDisabledQueues => 0 -</%ARGS> diff --git a/rt/html/Admin/Users/Modify.html b/rt/html/Admin/Users/Modify.html deleted file mode 100644 index b424ae961..000000000 --- a/rt/html/Admin/Users/Modify.html +++ /dev/null @@ -1,349 +0,0 @@ -%# BEGIN LICENSE BLOCK -%# -%# Copyright (c) 1996-2003 Jesse Vincent <jesse@bestpractical.com> -%# -%# (Except where explictly superceded by other copyright notices) -%# -%# This work is made available to you under the terms of Version 2 of -%# the GNU General Public License. A copy of that license should have -%# been provided with this software, but in any event can be snarfed -%# from www.gnu.org. -%# -%# This work is distributed in the hope that it will be useful, but -%# WITHOUT ANY WARRANTY; without even the implied warranty of -%# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -%# General Public License for more details. -%# -%# Unless otherwise specified, all modifications, corrections or -%# extensions to this work which alter its source code become the -%# property of Best Practical Solutions, LLC when submitted for -%# inclusion in the work. -%# -%# -%# END LICENSE BLOCK -<& /Admin/Elements/Header, Title => $title &> -<& /Admin/Elements/UserTabs, - id => $id, - UserObj => $UserObj, - current_subtab => $current_tab, - Title => $title &> - -<& /Elements/ListActions, actions => \@results &> - -<FORM ACTION="<%$RT::WebPath%>/Admin/Users/Modify.html" METHOD=POST> -%if ($Create) { -<INPUT TYPE=HIDDEN NAME=id VALUE="new"> -% } else { -<INPUT TYPE=HIDDEN NAME=id VALUE="<%$UserObj->Id%>"> -% } -<TABLE WIDTH=100% BORDER=0> -<TR> - -<TD VALIGN=TOP ROWSPAN=2> -<& /Elements/TitleBoxStart, title => loc('Identity') &> - -<TABLE> -<TR><TD ALIGN="RIGHT"> -<&|/l&>Username</&>: -</TD><TD> -<input name="Name" value="<%$UserObj->Name%>"> <b><&|/l&>(required)</&></b> -</TD></TR> -<TR><TD ALIGN="RIGHT"> -<&|/l&>Email</&>: -</TD><TD> -<input name="EmailAddress" value="<%$UserObj->EmailAddress%>"> -</TD></TR> -<TR><TD ALIGN="RIGHT"> -<&|/l&>Real Name</&>: -</TD><TD> -<input name="RealName" value="<%$UserObj->RealName%>"> -</TD></TR> -<TR><TD ALIGN="RIGHT"> -<&|/l&>Nickname</&>: -</TD><TD> -<input name="NickName" value="<%$UserObj->NickName%>"> -</TD></TR> -<TR><TD ALIGN="RIGHT"> -<&|/l&>Unix login</&>: -</TD><TD> -<input name="Gecos" value="<%$UserObj->Gecos%>"> -</TD></TR> -<TR><TD ALIGN="RIGHT"> -<&|/l&>Extra info</&>: -</TD><TD> -<textarea name="FreeformContactInfo" cols=20 rows=5><%$UserObj->FreeformContactInfo%></TEXTAREA> -</TD></TR> -</TABLE> -<& /Elements/TitleBoxEnd &> -<br> -<& /Elements/TitleBoxStart, title => loc('Access control') &> -<INPUT TYPE=HIDDEN NAME="SetEnabled" VALUE="1"> -<INPUT TYPE=CHECKBOX NAME="Enabled" VALUE="1" <%$EnabledChecked%>> -<&|/l&>Let this user access RT</&><BR> - - -<INPUT TYPE=HIDDEN NAME="SetPrivileged" VALUE="1"> -<INPUT TYPE=CHECKBOX NAME="Privileged" VALUE="1" <%$PrivilegedChecked%>> <&|/l&>Let this user be granted rights</&><BR> - -% unless ($RT::WebExternalAuth and !$RT::WebFallbackToInternalAuth) { -<TABLE> -<TR> -<TD ALIGN=RIGHT> -<&|/l&>New Password</&>: -</TD> -<TD ALIGN=LEFT> -<input type=password name="Pass1"> -</TD> -</TR> -<TR><TD ALIGN=RIGHT> -<&|/l&>Retype Password</&>: -</TD> -<TD> -<input type=password name="Pass2"> -</TD> -</TR> -</TABLE> -% } -<& /Elements/TitleBoxEnd &> -</TD> -</TR> -<TR> - -<TD VALIGN=TOP> -<& /Elements/TitleBoxStart, title => loc('Location') &> -<TABLE> -<TR><TD ALIGN="RIGHT"> -<&|/l&>Organization</&>: -</TD><TD> -<input name="Organization" value="<%$UserObj->Organization%>"> -</TD></TR> -<TR><TD ALIGN="RIGHT"> -<&|/l&>Address1</&>: -</TD><TD> -<input name="Address1" value="<%$UserObj->Address1%>"> -</TD></TR> -<TR><TD ALIGN="RIGHT"> -<&|/l&>Address2</&>: -</TD><TD> -<input name="Address2" value="<%$UserObj->Address2%>"> -</TD></TR> -<TR><TD ALIGN="RIGHT"> -<&|/l&>City</&>: -</TD><TD> -<input name="City" value="<%$UserObj->City%>" size=14> - -</TD></TR> -<TR><TD ALIGN="RIGHT"> -<&|/l&>State</&>: -</TD><TD> -<input name="State" value="<%$UserObj->State%>" size=3> - -</TD></TR> -<TR><TD ALIGN="RIGHT"> -<&|/l&>Zip</&>: -</TD><TD> -<input name="Zip" value="<%$UserObj->Zip%>" size=9> -</TD></TR> -<TR><TD ALIGN="RIGHT"> -<&|/l&>Country</&>: -</TD><TD> -<input name="Country" value="<%$UserObj->Country%>"> -</TD></TR> -</TABLE> -<& /Elements/TitleBoxEnd &> -<br> -<& /Elements/TitleBoxStart, title => loc('Phone numbers') &> -<TABLE> -<TR><TD ALIGN="RIGHT"> -<&|/l&>Residence</&>: -</TD><TD> -<input name="HomePhone" value="<%$UserObj->HomePhone%>" size=13><br> -</TD></TR> -<TR><TD ALIGN="RIGHT"> -<&|/l&>Work</&>: -</TD><TD> -<input name="WorkPhone" value="<%$UserObj->WorkPhone%>" size=13><br> -</TD></TR> -<TR><TD ALIGN="RIGHT"> -<&|/l&>Mobile</&>: -</TD><TD> -<input name="MobilePhone" value="<%$UserObj->MobilePhone%>" size=13><br> -</TD></TR> -<TR><TD ALIGN="RIGHT"> -<&|/l&>Pager</&>: -</TD><TD> -<input name="PagerPhone" value="<%$UserObj->PagerPhone%>" size=13><br> -<& /Elements/TitleBoxEnd &> -</TD> - -<TR> -</TR> -</TABLE> -<TR> -<TD colspan="2"> -<& /Elements/TitleBoxStart, title => loc('Comments about this user') &> -<TEXTAREA name="Comments" COLS=80 ROWS=5 WRAP=VIRTUAL><%$UserObj->Comments%> -</TEXTAREA> -<& /Elements/TitleBoxEnd &> -%if ($UserObj->Privileged) { -<BR> -<& /Elements/TitleBoxStart, title => loc('Signature') &> -<TEXTAREA COLS=80 ROWS=5 name="Signature" WRAP=HARD> -<%$UserObj->Signature%></TEXTAREA> -<& /Elements/TitleBoxEnd &> -% } - -</TD> -</TR> -</TABLE> - -<& /Elements/Submit &> -</form> - -<%INIT> - -my $current_tab; -my $UserObj = new RT::User($session{'CurrentUser'}); -my ($title, $PrivilegedChecked, $EnabledChecked, $Disabled, $result, @results); - -my ($val, $msg); - -if ($Create) { - $current_tab = 'Admin/Users/Modify.html?Create=1'; - $title = loc("Create a new user"); -} -else { - - $current_tab = 'Admin/Users/Modify.html?id='.$id; - if ($id eq 'new') { - ($val, $msg) = $UserObj->Create( Name => $Name, - EmailAddress => $ARGS{'EmailAddress'} - ); - if ($val) { - push @results, $msg; - } else { - push @results, loc('User could not be created: [_1]', $msg); - } - - # set the id, so the the menu will have the right info - $id = $UserObj->Id; - - } else { - $UserObj->Load($id) || $UserObj->Load($Name) || Abort("Couldn't load user '$Name'"); - $val = $UserObj->Id(); - } - - if ($val) { - $title = loc("Modify the user [_1]", $UserObj->Name); - } - - # If the create failed - else { - $title = loc("Create a new user"); - $Create = 1; - } - - - -} - - - - -# If we have a user to modify, lets try. -if ($UserObj->Id) { - - my @fields = qw(Name Comments Signature EmailAddress FreeformContactInfo - Organization RealName NickName Lang EmailEncoding WebEncoding - ExternalContactInfoId ContactInfoSystem Gecos ExternalAuthId - AuthSystem HomePhone WorkPhone MobilePhone PagerPhone Address1 - Address2 City State Zip Country - ); - - my @fieldresults = UpdateRecordObject ( AttributesRef => \@fields, - Object => $UserObj, - ARGSRef => \%ARGS ); - push (@results,@fieldresults); - - -# {{{ Deal with special fields: Privileged, Enabled and Password -if ( ($SetPrivileged) and ( $Privileged != $UserObj->Privileged) ) { -my ($code, $msg) = $UserObj->SetPrivileged($Privileged); - push @results, loc('Privileged status: [_1]', loc_fuzzy($msg)); -} - -#we're asking about enabled on the web page but really care about disabled. -if ($Enabled == 1) { - $Disabled = 0; -} -else { - $Disabled = 1; -} -if ( ($SetEnabled) and ( $Disabled != $UserObj->Disabled) ) { - my ($code, $msg) = $UserObj->SetDisabled($Disabled); - push @results, loc('Enabled status [_1]', loc_fuzzy($msg)); -} - - -#TODO: make this report errors properly -if ((defined $Pass1) and ($Pass1 ne '') and ($Pass1 eq $Pass2) and (!$UserObj->IsPassword($Pass1))) { - my ($code, $msg); - ($code, $msg) = $UserObj->SetPassword($Pass1); - push @results, loc('Password: [_1]', loc_fuzzy($msg)); -} elsif ( $Pass1 && ($Pass1 ne $Pass2)) { - push @results, loc("Passwords do not match."); -} - -# }}} -} - - -# {{{ Do some setup for the ui -unless ($UserObj->Disabled()) { - $EnabledChecked ="CHECKED"; -} - -if ($UserObj->Privileged()) { - $PrivilegedChecked = "CHECKED"; -} - -# }}} -</%INIT> - - -<%ARGS> -$id => undef -$Name => undef -$Comments => undef -$Signature => undef -$EmailAddress => undef -$FreeformContactInfo => undef -$Organization => undef -$RealName => undef -$NickName => undef -$Privileged => undef -$SetPrivileged => undef -$Enabled => undef -$SetEnabled => undef -$Lang => undef -$EmailEncoding => undef -$WebEncoding => undef -$ExternalContactInfoId => undef -$ContactInfoSystem => undef -$Gecos => undef -$ExternalAuthId => undef -$AuthSystem => undef -$HomePhone => undef -$WorkPhone => undef -$MobilePhone => undef -$PagerPhone => undef -$Address1 => undef -$Address2 => undef -$City => undef -$State => undef -$Zip => undef -$Country => undef -$Pass1 => undef -$Pass2=> undef -$Create=> undef -</%ARGS> diff --git a/rt/html/Admin/Users/Prefs.html b/rt/html/Admin/Users/Prefs.html deleted file mode 100644 index 0bba9fadd..000000000 --- a/rt/html/Admin/Users/Prefs.html +++ /dev/null @@ -1,122 +0,0 @@ -%# BEGIN LICENSE BLOCK -%# -%# Copyright (c) 1996-2003 Jesse Vincent <jesse@bestpractical.com> -%# -%# (Except where explictly superceded by other copyright notices) -%# -%# This work is made available to you under the terms of Version 2 of -%# the GNU General Public License. A copy of that license should have -%# been provided with this software, but in any event can be snarfed -%# from www.gnu.org. -%# -%# This work is distributed in the hope that it will be useful, but -%# WITHOUT ANY WARRANTY; without even the implied warranty of -%# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -%# General Public License for more details. -%# -%# Unless otherwise specified, all modifications, corrections or -%# extensions to this work which alter its source code become the -%# property of Best Practical Solutions, LLC when submitted for -%# inclusion in the work. -%# -%# -%# END LICENSE BLOCK -<& /Elements/Header, Title => loc("User view") &> - -<& /Elements/ViewUser, User=>$u &> - -<h2 class="title"><%loc("User view")%></h2> - -%if ($session{CurrentUser} && ($session{CurrentUser}->Id == $id)) { - <& /Elements/TitleBoxStart, title => loc('Signature') &> -<form method=post> -<input type="hidden" name="id" value=<%$id%>> -<TEXTAREA COLS=72 ROWS=4 WRAP=HARD NAME="Signature"><% $u->Signature %></TEXTAREA><br><br> -<input type="submit" value="<&|/l&>Update signature</&>"> -</form> - <& /Elements/TitleBoxEnd &> - <form method=post> - <&|/l&>Open tickets (from listing) in another window</&>: <input type="checkbox" name="NewWindowOption" <%exists $session{NewWindowOption} && "CHECKED"%>><br> - <&|/l&>Open tickets (from listing) in a new window</&>: <input type="checkbox" name="AlwaysNewWindowOption" <%exists $session{AlwaysNewWindowOption} && "CHECKED"%>><br> - <input type="submit" name="NewWindowSetting" value="<&|/l&>New window setting</&>"> - </form> -%} - - <& /Elements/TitleBoxStart, title => loc('Email') &> -<form method=post> -<input type="hidden" name="id" value="<%$id%>"> -<input name="Email" value="<% $u->EmailAddress %>"><input type="submit" value="<&|/l&>Update email</&>"> -</form> - <& /Elements/TitleBoxEnd &> - <& /Elements/TitleBoxStart, title => loc('Real Name') &> -<form method=post> -<input type="hidden" name="id" value="<%$id%>"> -<input name="RealName" value="<% $u->RealName %>"><input type="submit" value="<&|/l&>Update name</&>"> -</form> - <& /Elements/TitleBoxEnd &> - - <& /Elements/TitleBoxStart, title => loc('User ID') &> -<form method=post> -<input type="hidden" name="id" value="<%$id%>"> -<input name="Name" value="<% $u->Name %>"><input type="submit" value="<&|/l&>Update ID</&>"> -</form> - <& /Elements/TitleBoxEnd &> - -%# TODO: alternative email addresses + merging users - -<%ARGS> -$id => $session{CurrentUser} ? $session{CurrentUser}->Id : 0 -$Signature => undef -$Email => undef -$RealName => undef -$Name => undef -</%ARGS> - -<%INIT> -require RT::User; -my $u=RT::User->new($session{CurrentUser}); -$u->Load($id) || die loc("Couldn't load that user ([_1])", $id); -if ($Signature) { -my ($val, $msg)=$u->SetSignature($Signature); -$RT::Logger->log(level=>($val ? 'info' : 'error'), message=>$msg); -} - -if ($Email) { -my ($val, $msg)=$u->SetEmailAddress($Email); -$RT::Logger->log(level=>($val ? 'info' : 'error'), message=>$msg); -} - -if ($RealName) { -my ($val, $msg)=$u->SetRealName($RealName); -$RT::Logger->log(level=>($val ? 'info' : 'error'), message=>$msg); -} - -if ($Name) { -my ($val, $msg)=$u->SetName($Name); -$RT::Logger->log(level=>($val ? 'info' : 'error'), message=>$msg); -} - -if ($ARGS{NewWindowSetting}) { -if ($ARGS{NewWindowOption}) { -$session{NewWindowOption}=1; -} else { -delete $session{NewWindowOption}; -} -if ($ARGS{AlwaysNewWindowOption}) { -$session{NewWindowOption}=1; -$session{AlwaysNewWindowOption}=1; -} else { -delete $session{AlwaysNewWindowOption}; -} -} - -</%INIT> - - - - - - - - - diff --git a/rt/html/Admin/Users/index.html b/rt/html/Admin/Users/index.html deleted file mode 100644 index 7dc9af6c3..000000000 --- a/rt/html/Admin/Users/index.html +++ /dev/null @@ -1,81 +0,0 @@ -%# BEGIN LICENSE BLOCK -%# -%# Copyright (c) 1996-2003 Jesse Vincent <jesse@bestpractical.com> -%# -%# (Except where explictly superceded by other copyright notices) -%# -%# This work is made available to you under the terms of Version 2 of -%# the GNU General Public License. A copy of that license should have -%# been provided with this software, but in any event can be snarfed -%# from www.gnu.org. -%# -%# This work is distributed in the hope that it will be useful, but -%# WITHOUT ANY WARRANTY; without even the implied warranty of -%# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -%# General Public License for more details. -%# -%# Unless otherwise specified, all modifications, corrections or -%# extensions to this work which alter its source code become the -%# property of Best Practical Solutions, LLC when submitted for -%# inclusion in the work. -%# -%# -%# END LICENSE BLOCK -<& /Admin/Elements/Header, Title => loc('Select a user') &> -<& /Admin/Elements/UserTabs, current_tab => 'Admin/Users/', - current_subtab => 'Admin/Users/', - Title => loc('Select a user') &> - - - - -<%$caption%>:<BR> -<UL> -%if ($users->Count == 0) { -<LI> <i><&|/l&>No users matching search criteria found.</&></i> -% } -%while ( $user = $users->Next) { -<LI><A HREF="Modify.html?id=<%$user->id%>"><%$user->Name || loc('(no name listed)')%></a></LI> -%} - -</UL> -<br><br> -<FORM METHOD=POST ACTION="<% $RT::WebPath %>/Admin/Users/index.html"> - -<&|/l&>Find people whose</&> <& /Elements/SelectUsers &><BR> -<input type="checkbox" name="FindDisabledUsers"> <&|/l&>Include disabled users in search.</&> -<BR> -<div align=right><input type=submit value="<&|/l&>Go!</&>"></div> -</FORM> - -<%INIT> -my ($user, $caption); -my $users = new RT::Users($session{'CurrentUser'}); - -if ($FindDisabledUsers) { - $users->{'find_disabled_rows'} = 1; -} - -unless (defined $UserString) { - $users->LimitToPrivileged(); - $caption = loc("Privileged users"); -} -else { - $caption = loc("Users matching search criteria"); - - if ($UserString) { - $users->Limit( FIELD => $UserField, - OPERATOR => $UserOp, - VALUE => $UserString); - -} -} -</%INIT> -<%ARGS> -$UserString => undef -$UserOp => '=' -$UserField => 'Name' -$IdLike => undef -$EmailLike => undef -$FindDisabledUsers => 0 -</%ARGS> diff --git a/rt/html/Admin/index.html b/rt/html/Admin/index.html deleted file mode 100644 index 522ade876..000000000 --- a/rt/html/Admin/index.html +++ /dev/null @@ -1,40 +0,0 @@ -%# BEGIN LICENSE BLOCK -%# -%# Copyright (c) 1996-2003 Jesse Vincent <jesse@bestpractical.com> -%# -%# (Except where explictly superceded by other copyright notices) -%# -%# This work is made available to you under the terms of Version 2 of -%# the GNU General Public License. A copy of that license should have -%# been provided with this software, but in any event can be snarfed -%# from www.gnu.org. -%# -%# This work is distributed in the hope that it will be useful, but -%# WITHOUT ANY WARRANTY; without even the implied warranty of -%# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -%# General Public License for more details. -%# -%# Unless otherwise specified, all modifications, corrections or -%# extensions to this work which alter its source code become the -%# property of Best Practical Solutions, LLC when submitted for -%# inclusion in the work. -%# -%# -%# END LICENSE BLOCK -<& /Admin/Elements/Header, Title => loc('RT Administration') &> -<& /Admin/Elements/Tabs, Title => loc('RT Administration') &> - -<ul> -<li><font size="+2"><a href="Users/"><&|/l&>Users</&></a></font><br> -<&|/l&>Manage users and passwords</&> -</li> -<li><font size="+2"><a href="Groups/"><&|/l&>Groups</&></a></font><br> -<&|/l&>Manage groups and group membership</&> -</li> -<li><font size="+2"><a href="Queues/"><&|/l&>Queues</&></a></font><br> -<&|/l&>Manage queues and queue-specific properties</&> -</li> -<li><font size="+2"><a href="Global/"><&|/l&>Global</&></a></font><br> -<&|/l&>Manage properties and configuration which apply to all queues</&> -</li> -</ul> |