summaryrefslogtreecommitdiffstats
path: root/template/en/default/account/auth/login.html.tmpl
blob: ac0fbcb995f6233c852a59047a8c6f9c1312cb0c (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
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
[%# This Source Code Form is subject to the terms of the Mozilla Public
  # License, v. 2.0. If a copy of the MPL was not distributed with this
  # file, You can obtain one at http://mozilla.org/MPL/2.0/.
  #
  # This Source Code Form is "Incompatible With Secondary Licenses", as
  # defined by the Mozilla Public License, v. 2.0.
  #%]

[%# INTERFACE:
  # target: string. URL to go to after login.
  #%]

[% IF !target %]
 [% target = "index.cgi" %]
[% END %]

[% PROCESS global/header.html.tmpl
  title = "Log in to $terms.Bugzilla"
%]

[% USE Bugzilla %]

<h2 class="center">
  [% terms.Bugzilla %] needs a legitimate login and password to continue
</h2>

<form id="login_form" name="login" action="[% urlbase FILTER html %][% target FILTER html %]"
      method="POST" [% IF cgi_param("data") %] enctype="multipart/form-data"[% END %]>
  <table>
    <tr>
      <th>
        <label for="Bugzilla_login">
          [% IF login_not_email %]
            Login:
          [% ELSE %]
            Email&nbsp;Address:
          [% END %]
        </label>
      </th>
      <td>
        <input id="Bugzilla_login" name="Bugzilla_login"
               [%- ' type="email"' UNLESS login_not_email %] autofocus required>
      </td>
    </tr>

    <tr>
      <th><label for="Bugzilla_password">Password:</label></th>
      <td>
        <input type="password" id="Bugzilla_password" name="Bugzilla_password" required>
      </td>
    </tr>

    [% IF Param('rememberlogin') == 'defaulton' || 
          Param('rememberlogin') == 'defaultoff' %]
      <tr>
        <th>
          <input type="checkbox" id="Bugzilla_remember" name="Bugzilla_remember" value="on"
                 [%+ "checked" IF Param('rememberlogin') == "defaulton" %]>
        </th>
        <td>
          <label for="Bugzilla_remember">Remember my login</label>
        </td>
      </tr>
    [% END %]

    <tr>
      <th>
        <input type="checkbox" id="Bugzilla_restrictlogin" name="Bugzilla_restrictlogin"
               checked="checked">
      </th>
      <td>
        <label for="Bugzilla_restrictlogin">Restrict this session to this IP address
        (using this option improves security)</label>
      </td>
    </tr>

    <tr>
      <th>&nbsp;</th>
      <td>
        <input type="submit" name="GoAheadAndLogIn" value="Log In" id="log_in">
      </td>
    </tr>
  </table>

  [% PROCESS "global/hidden-fields.html.tmpl"
     exclude="^Bugzilla_(login|password|restrictlogin)$" %]

  <input type="hidden" name="Bugzilla_login_token"
         value="[% get_login_request_token() FILTER html %]">

  [% Hook.process('additional_methods') %]

  <div class="links">
    [% can_create_account = 0 %]
    [% IF Param("createemailregexp") && user.authorizer.user_can_create_account %]
      <span><a href="createaccount.cgi">Create a New Account</a></span>
      [% can_create_account = 1 %]
    [% END %]

    [% IF user.authorizer.can_change_password %]
      [% "|" IF can_create_account %]
      <span><a href="createaccount.cgi?request_new_password=1">Forgot Password</a></span>
    [% END %]
  </div>

  <hr>
  <div class="info">
    <p>
      Note: you should make sure cookies are enabled for this site. 
      Otherwise, you will be required to log in frequently.
    </p>

    [% IF can_create_account %]
      <p>
        [% IF Param("requirelogin") %]
          A user account is required because this Bugzilla
          installation is only accessible to authenticated users.
        [% ELSIF target.match("_bug\.cgi$") %]
          A user account is required to file a new [% terms.bug %] or to comment
          into existing ones so that you can be contacted if more information is
          needed.
        [% END %]
      </p>
    [% END %]
  </div>
</form>

[% PROCESS global/footer.html.tmpl %]