summaryrefslogtreecommitdiffstats
path: root/template/en/default/account/prefs/account.html.tmpl
blob: 81eb61f60989f98e2bdde34b154dd5b0d84db98f (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
[%# 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:
  # email_change_date: string. The date the email change will be complete. (optional)
  # new_email:         string. The user's new email address whilst not confirmed. (optional)
  #%]

<table>
  [% IF user.authorizer.can_change_password
        || (user.authorizer.can_change_email && Param('allowemailchange'))
        ||  user.authorizer.can_change_login %]
    <tr>
      <td colspan="2">
        Please enter your current password to confirm any changes in this section.
      </td>
    </tr>
    <tr>
      <th><label for="old_password">Password:</label></th>
      <td>
        <input type="hidden" name="old_login" value="[% user.login FILTER html %]">
        <input type="password" name="old_password" id="old_password">
      </td>
    </tr>
  [% END %]

  [% IF user.authorizer.can_change_password %]
    <tr>
      <th><label for="new_password1">New password:</label></th>
      <td>
        <input type="password" name="new_password1" id="new_password1">
        <span class="bz_info">
          (Leave empty to keep current password)
        </span>
      </td>
    </tr>

    <tr>
      <th><label for="new_password2">Confirm new password:</label></th>
      <td>
        <input type="password" name="new_password2" id="new_password2">
      </td>
    </tr>
  [% END %]

  [% UNLESS Param('use_email_as_login') %]
    <tr>
      <th><label for="new_login">Your login name:</label></th>
      <td>
        [% IF user.authorizer.can_change_login %]
          <input size="35" name="new_login" id="new_login"
                 value="[% user.login FILTER html %]">
        [% ELSE %]
          [% user.login FILTER html %]
        [% END %]
      </td>
    </tr>
  [% END %]

  [% IF user.authorizer.can_change_email
        && Param('allowemailchange')
        && email_change_date %]
    [% IF new_email %]
      <tr>
        <th><label>Pending email address:</label></th>
        <td>[% new_email FILTER html %]</td>
      </tr>
      <tr>
        <th><label>Change request expires:</label></th>
        <td>[% email_change_date FILTER time %]</td>
      </tr>
    [% ELSE %]
      <tr>
        <th><label>Confirmed email address:</label></th>
        <td>[% user.email FILTER html %]</td>
      </tr>
      <tr>
        <th><label>Completion date:</label></th>
        <td>[% email_change_date FILTER time %]</td>
      </tr>
    [% END %]
  [% ELSE %]
    <tr>
      <th>
        <label for="new_email">
          Your email address[% "/login" IF Param('use_email_as_login') %]:
        </label>
      </th>
      <td>
        [% IF user.authorizer.can_change_email && Param('allowemailchange') %]
          <input size="35" name="new_email" id="new_email"
                 value="[% user.email FILTER html %]"
                 [%~ ' type="email"' IF Param('use_email_as_login') %]>
        [% ELSE %]
          [% user.email FILTER html %]
        [% END %]
      </td>
    </tr>
  [% END %]

  <tr>
    <td colspan="2"><hr></td>
  </tr>

  <tr>
    <th>
      <label for="realname">Your real name (optional, but encouraged):</label>
    </th>
    <td>
      <input size="35" name="realname" id="realname"
             value="[% user.name FILTER html %]">
    </td>
  </tr>

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

</table>