~ubuntu-branches/ubuntu/raring/trac-accountmanager/raring

« back to all changes in this revision

Viewing changes to acct_mgr/templates/account_details.html

  • Committer: Package Import Robot
  • Author(s): Leo Costela
  • Date: 2012-06-30 20:40:10 UTC
  • mfrom: (1.1.4)
  • mto: This revision was merged to the branch mainline in revision 7.
  • Revision ID: package-import@ubuntu.com-20120630204010-xyoy9dnabof4jsbo
* new upstream checkout (closes: #654292)
* convert to dh short style and "--with python2"
* bump dh compat to 9
* update watch file for new version (0.3.2 based on setup.py; no 
  official release)
* move packaging to git (dump old out-of-sync history)
* debian/control: bump policy to 3.9.3 (no changes)

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
<!DOCTYPE html
 
2
    PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
 
3
    "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
 
4
<html xmlns="http://www.w3.org/1999/xhtml"
 
5
      xmlns:xi="http://www.w3.org/2001/XInclude"
 
6
      xmlns:py="http://genshi.edgewall.org/" 
 
7
      xmlns:i18n="http://genshi.edgewall.org/i18n"
 
8
      i18n:domain="acct_mgr">
 
9
  <xi:include href="admin.html" />
 
10
  <?python
 
11
    if _dgettext:
 
12
        dgettext = _dgettext ?>
 
13
  <head>
 
14
    <title>Account Details</title>
 
15
  </head>
 
16
 
 
17
  <body>
 
18
    <div id="account_details">
 
19
      <div id="header">
 
20
        <h2>Review User Account Details</h2>
 
21
        <py:choose>
 
22
          <p py:when="name" i18n:msg="name, user">
 
23
            for <b>${name}</b> (<em>${user}</em>)
 
24
          </p>
 
25
          <p py:otherwise="" i18n:msg="user">
 
26
            for <b>${user}</b>
 
27
          </p>
 
28
        </py:choose>
 
29
      </div>
 
30
 
 
31
      <form method="get" action="${url}">
 
32
      <fieldset>
 
33
        <legend>
 
34
          <label>Account Status</label>
 
35
        </legend>
 
36
        <py:choose>
 
37
          <div id="user_store" py:when="user_store">
 
38
            <p i18n:msg="order_num,store">
 
39
              Credentials for this user are stored in AuthStore number
 
40
              <em>${store_order_num}</em> (${user_store}).</p>
 
41
            <py:choose>
 
42
              <p class="hint" py:when="ignore_auth_case" i18n:msg="bool">
 
43
                Username matching is set to <b>not case-sensitive</b>.</p>
 
44
              <p class="hint" py:otherwise="" i18n:msg="bool">
 
45
                Username matching is set to <em>case-sensitive</em>.</p>
 
46
            </py:choose>
 
47
          </div>
 
48
          <div id="no_user_store" py:otherwise="">
 
49
            <p i18n:msg="">No store provides credentials for this user,
 
50
              so the user currently can't be authenticated and
 
51
              access to this <b>account is effectively blocked</b>,
 
52
              while account details may still be available.</p>
 
53
          </div>
 
54
        </py:choose>
 
55
 
 
56
        <hr py:if="pretty_lock_time or (lock_count > 0)" />
 
57
 
 
58
        <div id="user_locked" py:if="user_locked is True">
 
59
          <p>
 
60
            <py:choose>
 
61
              <span py:when="release_time" i18n:msg="time">
 
62
                <img src="${href.chrome('/acct_mgr/time-locked.png')}" />
 
63
                This account has been locked until ${release_time}<br />
 
64
                and even valid login attempts are rejected meanwhile.</span>
 
65
              <span py:otherwise="">
 
66
                <img src="${href.chrome('/acct_mgr/locked.png')}" />
 
67
                This account has been locked permanently.</span>
 
68
            </py:choose>
 
69
            <span class="buttons">
 
70
              <input type="submit" name="release"
 
71
                     alt="Release account lock"
 
72
                     title="Release account lock"
 
73
                     value="${dgettext('acct_mgr', 'Unlock')}" />
 
74
            </span>
 
75
          </p>
 
76
        </div>
 
77
 
 
78
        <py:choose>
 
79
          <div id="restricted" py:when="pretty_lock_time">
 
80
            <py:choose>
 
81
              <div py:when="lock_count > 0">
 
82
                <i18n:choose numeral="lock_count" params="count"
 
83
                             py:if="not _dgettext">
 
84
                  <p i18n:singular="">Lock condition has been met
 
85
                    ${lock_count} time by now.</p>
 
86
                  <p i18n:plural="">Lock condition has been met
 
87
                    ${lock_count} times by now.</p>
 
88
                </i18n:choose>
 
89
                <!--! i18n:choose doesn't play nicely with Trac releases
 
90
                  before Trac 0.12, so we provide an alternative message
 
91
                  that is excluded from extraction and translation. -->
 
92
                <p py:if="_dgettext" xml:lang="en">Lock condition has been met
 
93
                  ${lock_count} time(s) by now.</p>
 
94
                <p i18n:msg="time">
 
95
                  Therefore after another failed login attempt authentication
 
96
                  for this account would be retarded by ${pretty_lock_time}.
 
97
                </p>
 
98
              </div>
 
99
 
 
100
              <div py:otherwise="">
 
101
                <p>Lock condition has not been met yet.</p>
 
102
              </div>
 
103
            </py:choose>
 
104
          </div>
 
105
 
 
106
          <div id="unrestricted" py:otherwise="">
 
107
            <p py:if="not user_locked is True">
 
108
              No constraints are set for this account.</p>
 
109
          </div>
 
110
        </py:choose>
 
111
      </fieldset>
 
112
 
 
113
      <div id="verification" py:if="verification">
 
114
        <fieldset>
 
115
          <legend>
 
116
            <label>Verification</label>
 
117
          </legend>
 
118
          <py:choose>
 
119
            <div py:when="email">
 
120
              <p i18n:msg="email">
 
121
                Current email address: &lt;${email}&gt;</p>
 
122
              <py:choose>
 
123
                <p py:when="email_verified is True">
 
124
                  This address has been verified successfully.</p>
 
125
                <p py:when="not email_verified is None" i18n:msg="token">
 
126
                  Verification is pending
 
127
                  (<span class="hint">token: '${email_verified}' </span>).</p>
 
128
                <p py:otherwise="">
 
129
                  This address has not been verified yet.</p>
 
130
              </py:choose>
 
131
            </div>
 
132
            <div py:otherwise="">
 
133
              <p>No email address is registered for this account.</p>
 
134
            </div>
 
135
          </py:choose>
 
136
        </fieldset>
 
137
      </div>
 
138
 
 
139
      <fieldset>
 
140
        <legend>
 
141
          <label>Access History</label>
 
142
        </legend>
 
143
        <py:choose>
 
144
          <p py:when="last_visit" i18n:msg="time">
 
145
            Last login: ${last_visit}</p>
 
146
          <p py:otherwise="">The user has not logged in before.</p>
 
147
        </py:choose>
 
148
        <py:choose>
 
149
          <div id="failed_attempts" py:when="attempts_count > 0">
 
150
            <p i18n:msg="count">Total failed attempts: ${attempts_count}</p> 
 
151
            <p class="tableheader">
 
152
              Table: Last failed login attempts log view</p>
 
153
            <table class="listing" id="login_attempts">
 
154
              <thead>
 
155
                <tr>
 
156
                  <th>IP address</th>
 
157
                  <th>Log time</th>
 
158
                </tr>
 
159
              </thead>
 
160
              <tbody>
 
161
                <tr py:for="attempt in attempts">
 
162
                  <td>${attempt.ipnr}</td>
 
163
                  <td>${attempt.time}</td>
 
164
                </tr>
 
165
              </tbody>
 
166
            </table>
 
167
            <div class="buttons" py:if="not user_locked is True">
 
168
              <input type="submit" name="delete"
 
169
                     alt="Delete login failure log"
 
170
                     title="Delete login failure log"
 
171
                     value="${dgettext('acct_mgr', 'Delete Log')}" />
 
172
            </div>
 
173
          </div>
 
174
          <div id="no_failed_attempts" py:otherwise="">
 
175
            <p>There is currently no failed login attempt logged.</p>
 
176
          </div>
 
177
        </py:choose>
 
178
      </fieldset>
 
179
 
 
180
      <div class="buttons">
 
181
        <input type="hidden" name="user" value="${user}" />
 
182
        <input type="submit" name="list"
 
183
               value="${dgettext('acct_mgr', 'Back to accounts')}" />
 
184
        <input type="submit" name="update"
 
185
               value="${dgettext('acct_mgr', 'Update')}" />
 
186
      </div>
 
187
      </form>
 
188
    </div>
 
189
 
 
190
  </body>
 
191
</html>