%# Ehrman's Commentary: %# (1) Things will get worse before they get better. %# (2) Who said things would get better? <& /Foundry/Elements/Header, Title => 'My Page', Method => 'Post' &>

<& /Foundry/Elements/Tabs, Text => 'Register Project' &>
<& ShowSteps, Step => $Step &> % if ($Step == 0) { % delete $session{NewProject}; <& /Foundry/Home/Elements/ShowTerm, Template => 'TermOfProject' &> % } else { % foreach my $error (@Error) { * <% $error %> % } % if ($ARGS{id}) { % if ($Step == 2) {

<&|/l&>In this step, you will choose free/open source software license, under which the code (including source code and object code) of your project will be licensed. If you'd like to multiple-license your project, please fill in the license you'd like to choose in the "other" column. If your project contains no code, please click on "project contains no code".

<&|/l&>In order to eliminate the possible legal disputes, please let us remind you that you attach a copy of the license that is chosen for the very version you're releasing when you release the project.

% my $olw_link = ''; <&|/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. <& EditCustomFields, %{ $DualCFs{$Step} } &> % } elsif ($Step == 3) {

<&|/l&>In this step, you will choose a open content license, under which the content (eg. the documentation of your code, graphs, pictures, etc.), other than the code, of your project will be licensed. If you'd like to multiple-license your project, please fill in the license you'd like to choose in the "other" column. If your project contains only code, please click on "project contains only code".

<&|/l&>In order to eliminate the possible legal disputes, please let us remind you that you attach a copy of the license that is chosen for the very version you're releasing when you release the project.

% my $ccw_link = q(); <&|/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. <& EditCustomFields, %{ $DualCFs{$Step} } &> % } else { % my $args = $session{NewProject}; % $args->{id} = 'new'; % $m->scomp('/Work/Tickets/Display.html', Status => 'new', Queue => 'NewProject', %$args);

<&|/l, $RT::Organization&>Your project has been submitted to the [_1] administrators. <&|/l&>Within 72 hours, you will receive notification of further instructions. <&|/l, $RT::Organization&>Thank you for choosing [_1].
% } % } else { <& /Work/Tickets/Create.html, SubmitText => 'Next Step', Queue => 'NewProject', NoUI => 1, Subject => 'New Project Registration', %ARGS, NoCF => { map +($_ => 1), qw( Notes Attachments License LicenseOSI LicenseOther ContentLicense ContentLicenseCC ContentLicenseOther ) }, Loc => 1 &> % } % }

<%INIT> $m->abort if $RT::Guest; if ($Step == 1 and $Action eq 'Disagree') { $m->print("" . loc("Homepage") . ''); return; } my @Error; my %DualCFs = ( 2 => { CF => ['License', 'LicenseOSI', 'LicenseOther'], Descr => ['Licensing your code as' ] }, 3 => { CF => ['ContentLicense', 'ContentLicenseCC', 'ContentLicenseOther'], Descr => ['Licensing your content as' ] }, ); if ($ARGS{id} and $Step == 1) { my ($ProjectName, $UnixName, $Rationale, $Description, $Platform, $Language, $Audience, $Topic) = @ARGS{ map "CustomField-".RT::CustomField->NameToId($_, 'NewProject')."-Values", qw( ProjectName UnixName Rationale PublicDescription Platform ProgrammingLanguage IntendedAudience Topic ) }; push @Error, loc('Missing mandatory fields') unless $ProjectName and $UnixName and $Rationale and $Description and $Platform and $Language and $Audience and $Topic; 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('ID must not be an existing subdomain name') if $UnixName =~ /^(?:www|mail|users|db|cvs|svn|lists|ftp|rt)$/; push @Error, loc('Project Name must be at most 40 charaters') unless !$ProjectName or length($ProjectName) <= 40; push @Error, loc('Public Description must be at most 255 charaters') unless !$Description or length($Description) <= 255; delete $ARGS{id} if @Error; $Step = 2 if $ARGS{id}; } if ($Step == 2 or $Step == 3) { if (my $val = $ARGS{ "CustomField-". RT::CustomField->NameToId($DualCFs{$Step}{CF}[0], 'NewProject'). "-Values" }) { if ($val !~ /\.\.\.$/ or $ARGS{ "CustomField-". RT::CustomField->NameToId($DualCFs{$Step}{CF}[1], 'NewProject'). "-Values" }) { my $args = $session{NewProject}; $args->{$_} = $ARGS{$_} for keys %ARGS; $session{NewProject} = $args; $Step++; } } else { my $args = $session{NewProject}; $args->{$_} = $ARGS{$_} for keys %ARGS; $session{NewProject} = $args; } } <%ARGS> $user => "" $pass => undef $goto => undef $Error => undef $Action => undef $Step => 0