& /Admin/Elements/Header, Title => 'Edit keywords' &> <& /Admin/Elements/SystemTabs &> <& /Elements/ListActions, actions => \@actions &> <& /Elements/TitleBoxStart, title => $description &>
<%init> my (@actions, $description); my $KeywordSelects = new RT::KeywordSelects ($session{'CurrentUser'}); unless ($KeywordSelects->LimitToGlobals()) { Abort("Couldn't load KeywordSelects."); } $description = "Modify global Keyword selections"; if (($Keyword) && ($Keyword ne '' )){ my $NewKeywordSelect = new RT::KeywordSelect($session{'CurrentUser'}); my $retval = $NewKeywordSelect->Create ( Keyword => $Keyword, ObjectField => 'Queue', ObjectType => 'Ticket', ObjectValue => 0, Name => $Name, Single => $Single, Depth => $Depth, ); if (defined $retval) { push @actions, "KeywordSelect added across all queues"; } else { push @actions, "KeywordSelect could not be added to queue"; } } # {{{ deal with modifying and deleting existing scrips my ($key); foreach $key (keys %ARGS) { # {{{ if we're trying to delete the keywordselect if ($key =~ /^DeleteKeywordSelect-(\d+)/) { my $id = $1; my $keywordselect = new RT::KeywordSelect($session{'CurrentUser'}); $keywordselect->Load($id); $keywordselect->Delete(); } # }}} } # }}} %init> <%ARGS> $Keyword => undef $Single => undef $Depth => undef $Name => undef %ARGS>