%# Never call a man a fool; borrow from him. % return unless $QueueObj->OriginObj; % if (@Error) { % foreach my $error (@Error) {  * <% $error %>
% }

% }
<& /Work/Tickets/Elements/EditCustomFields, Ticket => $QueueObj->OriginObj, Loc => 1 &>
% if ( $session{CurrentUser}->UserObj->HasRight( Right => 'SuperUser', Object => $QueueObj ) ) { Disabled ? '' : 'CHECKED' %>> <&|/l&>Enabled (Unchecking this box disables this queue) % }
<%INIT> my @Error; if ($ARGS{'Action-Submit'}) { $QueueObj->SetDisabled($Enabled ? 0 : 1) if $DoEnabled; my $id = $QueueObj->OriginObj->Id; $ARGS{"Ticket-$id-CustomField-".RT::CustomField->NameToId('UnixName')."-Values"} = $QueueObj->OriginObj->CustomFieldValue('UnixName'); my ($ProjectName, $UnixName, $Rationale, $Description, $Platform, $License, $Language, $Audience ) = @ARGS{ map "Ticket-$id-CustomField-".RT::CustomField->NameToId($_, "NewProject")."-Values", qw( ProjectName UnixName Rationale PublicDescription Platform License ProgrammingLanguage IntendedAudience ) }; push @Error, loc('Missing mandatory fields') unless $ProjectName and $Description and $Platform and $License and $Language and $Audience; push @Error, loc( 'ID must be 3-15 characters of lower-case letters or digits, beginning with a letter' ) unless !$UnixName or $UnixName =~ /^[a-z][0-9a-z]{2,14}$/; push @Error, loc( 'Project Name must be at most 40 charaters' ) unless !$ProjectName or length($ProjectName) <= 40; if (!@Error) { ProcessTicketCustomFieldUpdates( ARGSRef => \%ARGS ); if ($ProjectName ne $QueueObj->Name) { $QueueObj->SetName($ProjectName); push @Error, loc("Project Name has been modified. Please reload page to see the change."); } } } <%ARGS> $QueueObj $DoEnabled => 0 $Enabled => 0