X-Git-Url: http://git.freeside.biz/gitweb/?p=freeside.git;a=blobdiff_plain;f=rt%2Fwebrt%2FAdmin%2FGlobal%2FScrips.html;fp=rt%2Fwebrt%2FAdmin%2FGlobal%2FScrips.html;h=0000000000000000000000000000000000000000;hp=e55f8b3de6a9136c053888fd89ced6864911de07;hb=ded0451e9582df33cae6099a2fb72b4ea25076cf;hpb=0ebeec96313dd7edfca340f01f8fbbbac1f4aa1d diff --git a/rt/webrt/Admin/Global/Scrips.html b/rt/webrt/Admin/Global/Scrips.html deleted file mode 100755 index e55f8b3de..000000000 --- a/rt/webrt/Admin/Global/Scrips.html +++ /dev/null @@ -1,95 +0,0 @@ -<& /Admin/Elements/Header, Title => 'Edit scrips' &> -<& /Admin/Elements/SystemTabs &> - -<& /Elements/ListActions, actions => \@actions &> - -<& /Elements/TitleBoxStart, title => "Modify global scrips" &> - -
- -% if ($Scrips->Count > 0 ) { - - - - - -% while (my $scrip = $Scrips->Next ) { - - - - -% } - -
Delete - -
- - -<% $scrip->ConditionObj->Name %> -<% $scrip->ActionObj->Name %> -with template <% $scrip->TemplateObj->Name %> -
- -% } -Add a scrip which will apply to all queues: - - -<& /Elements/TitleBoxEnd &> -<& /Elements/Submit &> -
-<%init> -my (@actions, $description); - -my $Scrips = new RT::Scrips ($session{'CurrentUser'}); -$Scrips->LimitToGlobal(); - - - - -if ($NewScripAction and $NewScripCondition) { - my $NewScrip = new RT::Scrip($session{'CurrentUser'}); - - my ($retval, $msg) = $NewScrip->Create ( ScripAction => $NewScripAction, - ScripCondition => $NewScripCondition, - Stage => 'TransactionCreate', - Queue => 0, - Template => $NewScripTemplate); - if (defined $retval) { - push @actions, $msg; - } - else { - push @actions, $msg; - } -} - -# {{{ deal with modifying and deleting existing scrips -my ($key ); -foreach $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, "Scrip deleted"; - } - else { - push @actions, $msg; - } - } - # }}} -} -# }}} - - -<%ARGS> -$NewScripCondition => undef -$NewScripAction => undef -$NewScripTemplate => undef -