blob: 706dc1cd56817001c7824d23040658411119d65d (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
|
% layout 'mainlayout';
% my $uses_cram = config->{session}{secure} eq 'cram';
<div id=login class="jwm-base">
<h1>
JWebmail – <%= ucfirst l 'login' %>
</h1>
% if (my $msg = flash('message') || stash('warning')) {
<p class="jwm-warning">
%= $msg
</p>
% }
%= form_for login => (name => 'login1') => (method => 'post') => (class => 'pure-form pure-form-aligned jwm-round') => begin
<fieldset>
<div class="pure-control-group">
%= label_for userid => ucfirst l 'userid'
%= text_field 'userid' => '' => (required => '')
</div>
<div class="pure-control-group">
%= label_for password => ucfirst l 'password'
%= password_field 'password' => (required => '')
</div>
% if ($uses_cram) {
%= hidden_field challenge => rand
% }
<div class="pure-controls">
%= submit_button ucfirst l('login') => (class => 'pure-button pure-button-primary') => (name => 'submit_button') => $uses_cram ? (disabled => undef) : ()
</div>
</fieldset>
% end
</div>
% 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
|