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

<%= ucfirst l 'login' %>

JWebmail

% 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' => (class => 'label')
%= text_field 'userid' => '' => (required => undef) => (class => 'input')
%= label_for password => ucfirst l 'password' => (class => 'label')
%= password_field 'password' => (required => undef) => (class => 'input')
% if ($uses_cram) { %= hidden_field challenge => rand % }
%= submit_button ucfirst l('login') => (class => 'button is-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