& /Admin/Elements/Header, Title => loc("AnnounceSimple") &> <& /Elements/Tabs &> <& /Elements/ListActions, actions => \@results &>
<%init> unless ($session{'CurrentUser'}->HasRight( Object=> RT->System, Right => 'SuperUser')) { Abort(loc('This feature is only available to system administrators.')); } my @results; if ( $ARGS{'save'} and length $announce ) { my $my_system = RT::System->new( $session{CurrentUser} ); my ($status, $msg) = $my_system->SetAttribute( Name => 'AnnounceSimple', Description => 'AnnounceSimple text', Content => $announce, ); push @results, loc("Unable to update Announce text: [_1]", $msg) unless $status; } elsif ( $ARGS{'delete'} ) { my ($status, $msg) = RT->System->DeleteAttribute('AnnounceSimple'); push @results, loc("Unable to delete Announce text: [_1]", $msg) unless $status; } my $attr = RT->System->FirstAttribute('AnnounceSimple'); $announce = $attr ? $attr->Content : ''; %init> <%args> $announce => '' %args>