aboutsummaryrefslogtreecommitdiffhomepage
path: root/tpl/default/loginform.html
blob: dcc29676c3eca43cbc3c81e353aa04e3644df6b9 (plain) (blame)
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
49
50
51
52
53
54
55
56
57
58
59
<!DOCTYPE html>
<html>
<head>
  {include="includes"}
</head>
<body>
{include="page.header"}
{if="!ban_canLogin($conf)"}
<div class="pure-g pure-alert pure-alert-error pure-alert-closable center">
  <div class="pure-u-2-24"></div>
  <div class="pure-u-20-24">
    {'You have been banned after too many failed login attempts. Try again later.'|t}
  </div>
  <div class="pure-u-2-24">
    <i class="fa fa-times pure-alert-close"></i>
  </div>
</div>
{else}
  <div class="pure-g">
    <div class="pure-u-lg-1-3 pure-u-1-8"></div>
    <div id="login-form" class="page-form page-form-light pure-u-lg-1-3 pure-u-3-4">
      <form method="post" name="loginform">
        <h2 class="window-title">{'Login'|t}</h2>
        <div>
          <input type="text" name="login" placeholder="{'Username'|t}"
             {if="!empty($username)"}value="{$username}"{/if} class="autofocus" tabindex="20">
        </div>
        <div>
          <input type="password" name="password" placeholder="{'Password'|t}" tabindex="21">
        </div>
        <div class="remember-me">
          <input type="checkbox" name="longlastingsession" id="longlastingsessionform"
             checked="checked" tabindex="22">
          <label for="longlastingsessionform">{'Remember me'|t}</label>
        </div>
        <div>
          <input type="submit" value="{'Login'|t}" class="bigbutton" tabindex="23">
        </div>
        <input type="hidden" name="token" value="{$token}">
        {if="$returnurl"}<input type="hidden" name="returnurl" value="{$returnurl}">{/if}
      </form>
    </div>
    <div class="pure-u-lg-1-3 pure-u-1-8"></div>
  </div>
{/if}

{include="page.footer"}
<script>
  {if="ban_canLogin($conf) && ! empty($username)"}
    // Focus password on load if the username is set.
    var passwords = document.getElementsByName('password');
    if (passwords.length == 2) {
        passwords[1].focus();
    }
  {/if}
</script>
</body>
</html>