<& /Elements/Header, Title=>"Login" , &>
% if ($Error) { <& /Elements/TitleBoxStart, title => 'Error' &> <% $Error %> <& /Elements/TitleBoxEnd &> % } <& /Elements/TitleBoxStart, width=> "40%", titleright => "RT for $RT::rtname", title => 'Login' , contentbg=>"#cccccc" &>
Username:
Password:

% # The code below iterates through everything in the passed in arguments % # Preserving all the old parameters % # This would be easier, except mason is 'smart' and calls multiple values % # arrays rather than multiple hash keys % my $key; my $val; % foreach $key (keys %ARGS) { % if (($key ne 'user') and ($key ne 'pass')) { % if (ref($ARGS{$key}) =~ /ARRAY/) { % foreach $val (@{$ARGS{$key}}) { % } % } % else { % } % } %}
<&/Elements/TitleBoxEnd&> <%ARGS> $user => "" $pass => undef $goto => undef $Error => undef <%INIT>