<& /Elements/Header, Title => loc('Modify recurrence for #[_1]', $TicketObj->Id) &> <& /Elements/Tabs &> <& /Elements/ListActions, actions => \@results &> % unless ( $skip ) { <&| /Widgets/TitleBox,title => loc('Modify recurrence for ticket # [_1]', $TicketObj->Id), class=> 'ticket-info-repeat' &> <& Elements/EditRecurrence, Ticket => $TicketObj, ARGSRef => $ARGSRef &> <& /Elements/Submit, Name => 'SubmitTicket', Label => loc('Save Changes'), FullWidth => 1 &> % } <%INIT> my $TicketObj = LoadTicket($id); my @results; my $skip; my $cf = RT::CustomField->new($session{CurrentUser}); $cf->Load('Original Ticket'); unless( $cf->id && ( $cf->can('IsAdded') ? ( $cf->IsAdded(0) || $cf->IsAdded($TicketObj->Queue) ) : ( $cf->IsApplied(0) || $cf->IsApplied($TicketObj->Queue)) ) ) { push @results, loc('RepeatTicket is not enabled in this Queue'); $skip = 1; } if ( $ARGS{SubmitTicket} ) { if ( $TicketObj->CurrentUserHasRight('ModifyTicket') ) { my ( $ret, $message ) = RT::Extension::RepeatTicket::SetRepeatAttribute( $TicketObj, %ARGS ); $ARGSRef = \%ARGS if not $ret; # Save params on failure push @results, $message; } else { push @results, loc('Permission Denied'); } } <%ARGS> $id => undef $ARGSRef => undef