From 3ef62a0570055da710328937e7f65dbb2c027c62 Mon Sep 17 00:00:00 2001 From: ivan Date: Mon, 12 Aug 2002 06:17:09 +0000 Subject: import rt 2.0.14 --- rt/webrt/Admin/Queues/Modify.html | 137 ++++++++++++++++++++++++++++++++++++++ 1 file changed, 137 insertions(+) create mode 100755 rt/webrt/Admin/Queues/Modify.html (limited to 'rt/webrt/Admin/Queues/Modify.html') diff --git a/rt/webrt/Admin/Queues/Modify.html b/rt/webrt/Admin/Queues/Modify.html new file mode 100755 index 000000000..7a200df92 --- /dev/null +++ b/rt/webrt/Admin/Queues/Modify.html @@ -0,0 +1,137 @@ +<& /Admin/Elements/Header, Title => 'Admin/Queue/Basics' &> +<& /Admin/Elements/QueueTabs, id => $QueueObj->id &> +<& /Elements/ListActions, actions => \@results &> + + + +<& /Elements/TitleBoxStart, title => $title &> + + +
+%if ($Create ) { + +% } else { + +% } + + + + + + + + + + + + + + + + + + + + + + +
+Queue Name: +
+Description:
+Correspondence Address: + + +
(If left blank, will default to <%$RT::CorrespondAddress%> +
+ +Comment Address: + +
(If left blank, will default to <%$RT::CommentAddress%> +
+Priority starts at: + + +Over time, priority moves toward: + +
+Requests should be due in: + + days. +
+ +> Enabled (Unchecking this box disables this queue)
+
+<& /Elements/TitleBoxEnd &> +<& /Elements/Submit &> +
+ + + +<%INIT> + +my $QueueObj = new RT::Queue($session{'CurrentUser'}); +my ($title, @results, $Disabled, $EnabledChecked); + +if ($Create) { + $title = "Create a queue"; +} + +else { + if ($id eq 'new') { + my ($val, $msg) = $QueueObj->Create(Name => $Name); + if ($val == 0 ) { + Abort("Could not create queue: $msg"); + } + else { + push @results, $msg; + } + } + else { + $QueueObj->Load($id) || $QueueObj->Load($Name) || Abort("Couldn't load queue '$Name'"); + } + $title = 'Editing Configuration for queue '.$QueueObj->Name; + +} +if ($QueueObj->Id()) { +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, 'Enabled status '. $msg; +} + +unless ($QueueObj->Disabled()) { + $EnabledChecked ="CHECKED"; +} + + + +<%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 + -- cgit v1.2.1