% layout 'mainlayout'; % my $uses_cram = config->{session}{secure} eq 'cram';

JWebmail – <%= ucfirst l 'login' %>

% if (my $msg = flash('message') || stash('warning')) {

%= $msg

% } %= form_for login => (name => 'login1') => (method => 'post') => (class => 'pure-form pure-form-aligned jwm-round') => begin
%= label_for userid => ucfirst l 'userid' %= text_field 'userid' => '' => (required => '')
%= label_for password => ucfirst l 'password' %= password_field 'password' => (required => '')
% if ($uses_cram) { %= hidden_field challenge => rand % }
%= submit_button ucfirst l('login') => (class => 'pure-button pure-button-primary') => (name => 'submit_button') => $uses_cram ? (disabled => undef) : ()
% end
% if ($uses_cram) { %= javascript '/src/login_cram.js' % } %= javascript begin if (!document.login1.userid.value) { document.login1.userid.focus(); } else { document.login1.password.focus(); } % end