%# 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, ReadOnly => $ReadOnly &>

% my $olw_link = ''; % my $tag = $session{CurrentUser}->LanguageHandle->language_tag; % $tag =~ s/-(\w+)$/_\U$1/; % my $ccw_link = qq();

- <&|/l, $olw_link.loc("OSSF License Wizard").'

' &>If you're not sure which free/open source software license you'd like to adopt, you might also like to utilize our [_1]. Please note that the suggestion provided by the Wizard is for your reference only.
- <&|/l, $ccw_link.loc('Creative Commons License Wizard').'
' &>If you're not sure which open content license you'd like to adopt, you might also like to utilize the [_1]. Please note that the suggestion provided by the wizard is for your reference only. % if ( $session{CurrentUser}->UserObj->HasRight( Right => 'SuperUser', Object => $QueueObj ) ) { Disabled ? '' : 'CHECKED' %>> <&|/l&>Enabled (Unchecking this box disables this queue) % } % if (!$ReadOnly) {
% } <& /Foundry/Elements/LicenseFunctions &> <%INIT> my @Error; my @ACL = $QueueObj->FunctionsACL($ProjectRole); if (!grep { $_ eq 'Basics' } @ACL) { # thou shalt not be here. redirect happily. $m->print( "
" ); return; } if ($ARGS{'Action-Submit'} or grep /AddMoreEntry-/, keys %ARGS) { $QueueObj->SetDisabled($Enabled ? 0 : 1) if $DoEnabled; my $id = $QueueObj->OriginObj->Id; # UnixName can not be modified. $ARGS{"Ticket-$id-CustomField-".RT::CustomField->NameToId('UnixName')."-Values"} = $QueueObj->OriginObj->CustomFieldValue('UnixName'); my ($ProjectName, $UnixName) = @ARGS{ map "Ticket-$id-CustomField-".RT::CustomField->NameToId($_, "NewProject")."-Values", qw( ProjectName UnixName ) }; my $CFs = $QueueObj->OriginObj->QueueObj->CustomFields; while (my $CF = $CFs->Next) { my $pattern = $CF->Attribute('Pattern') or next; push @Error, loc('Missing mandatory fields') . ': ' . loc($CF->DescriptionOrName) unless $ARGS{"Ticket-$id-CustomField-".$CF->Id."-Values"} =~ $pattern; } 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) { my $Entries = $m->comp('/Work/Tickets/Elements/ProcessEntryUpdates', TicketObj => $QueueObj->OriginObj, %ARGS); $ARGS{"Ticket-$id-CustomField-$_-Values"} = $Entries->{$_} foreach keys %{$Entries}; 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 $ProjectRole $DoEnabled => 0 $Enabled => 0 $ReadOnly => 0