%# 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' &>
% if ($ARGS{id}) {
% $m->scomp('/Work/Tickets/Display.html', Queue => 'NewProject', %ARGS);
<&|/l, $RT::Organization&>Your project has been submitted to the [_1] administrators. Within 72 hours, you will receive notification of their decision and further instructions.&>
<&|/l, $RT::Organization&>Thank you for choosing [_1]&>
<%INIT>
$m->abort if $RT::Guest;
if ($Step == 1 and $Action eq 'Disagree') {
$m->print("" . loc("Homepage") . '');
return;
}
my ($Name, $UnixName, $Rationale, $Description, $Platform, $License, $Language, $Audience)
= map { $_ } @ARGS{map "CustomField-$_-Values", qw(6 9 29 30 31 8 11 13)};
my @Error;
if ($ARGS{id}) {
push @Error, loc('Missing mandatory fields')
unless $Name and $UnixName and $Rationale 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 !$Name or length($Name) <= 40;
delete $ARGS{id} if @Error;
$Step = 2 if $ARGS{id};
}
%INIT>
<%ARGS>
$user => ""
$pass => undef
$goto => undef
$Error => undef
$Action => undef
$Step => 0
%ARGS>