Merge lp:~deadlight/canonical-identity-provider/my-account into lp:~deadlight/canonical-identity-provider/vanilla
- my-account
- Merge into vanilla
Proposed by
Karl Williams
Status: | Merged |
---|---|
Approved by: | Karl Williams |
Approved revision: | 1700 |
Merged at revision: | 1700 |
Proposed branch: | lp:~deadlight/canonical-identity-provider/my-account |
Merge into: | lp:~deadlight/canonical-identity-provider/vanilla |
Diff against target: |
681 lines (+300/-173) 17 files modified
src/identityprovider/forms.py (+2/-2) src/identityprovider/static_src/scss/styles.scss (+24/-0) src/webui/templates/account/edit.html (+111/-160) src/webui/templates/registration/email_sent.html (+2/-0) src/webui/templates/registration/forgot_password.html (+2/-0) src/webui/templates/registration/login.html (+2/-0) src/webui/templates/registration/logout.html (+2/-0) src/webui/templates/registration/new_account.html (+2/-0) src/webui/templates/registration/reset_password.html (+2/-0) src/webui/templates/static/faq.html (+1/-0) src/webui/templates/vanilla/_footer.html (+1/-1) src/webui/templates/vanilla/base.html (+11/-10) src/webui/templates/vanilla/common/missing_backup_device_warning.html (+19/-0) src/webui/templates/vanilla/common/printed_codes_nearly_exhausted_warning.html (+15/-0) src/webui/templates/vanilla/common/unverified_email_warning.html (+14/-0) src/webui/templates/vanilla/widgets/passwords.html (+40/-0) src/webui/templates/vanilla/widgets/personal-menu.html (+50/-0) |
To merge this branch: | bzr merge lp:~deadlight/canonical-identity-provider/my-account |
Related bugs: |
Reviewer | Review Type | Date Requested | Status |
---|---|---|---|
Anthony Dillon (community) | Approve | ||
Karl Williams | Pending | ||
Review via email: mp+371201@code.launchpad.net |
Commit message
Description of the change
Converted the My Account page to Vanilla Framework
QA:
- npm i
- ./node_
In container:
- source env/bin/activate
- make mail-debug
In container (new terminal)
- source env/bin/activate
- make start-db
- make run
- Visit http://[CONTAINER IP]:8000/ in your browser
- Create an account using the form
- See that you are prompted to confirm your account
- Look at the "mail-debug" terminal and copy the link to confirm your account
- QA the page visually and functionally
- Add auth devices and backup codes to see how the page changes
NOTE: The radio buttons on the auth device section do not yet work and are not visible
To post a comment you must log in.
Revision history for this message
Barry McGee (barry-mcgee) wrote : | # |
- 1699. By Karl Williams
-
Remove superfluous spaces
- 1700. By Karl Williams
-
Add border to left menu
Revision history for this message
Karl Williams (deadlight) : | # |
Preview Diff
[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1 | === modified file 'src/identityprovider/forms.py' | |||
2 | --- src/identityprovider/forms.py 2019-06-18 20:13:31 +0000 | |||
3 | +++ src/identityprovider/forms.py 2019-08-12 13:50:47 +0000 | |||
4 | @@ -290,8 +290,8 @@ | |||
5 | 290 | emails_url = reverse('account-emails') | 290 | emails_url = reverse('account-emails') |
6 | 291 | text = _( | 291 | text = _( |
7 | 292 | 'Only verified email addresses are listed. Click ' | 292 | 'Only verified email addresses are listed. Click ' |
10 | 293 | '<a href="%s">Manage email addresses</a> ' | 293 | '"Manage email addresses" ' |
11 | 294 | 'to add and verify email addresses.') % emails_url | 294 | 'to add and verify email addresses.') |
12 | 295 | 295 | ||
13 | 296 | # add and display a dropdown with the valid choices | 296 | # add and display a dropdown with the valid choices |
14 | 297 | self.fields['preferred_email'] = PreferredEmailField( | 297 | self.fields['preferred_email'] = PreferredEmailField( |
15 | 298 | 298 | ||
16 | === modified file 'src/identityprovider/static_src/scss/styles.scss' | |||
17 | --- src/identityprovider/static_src/scss/styles.scss 2019-08-05 13:10:19 +0000 | |||
18 | +++ src/identityprovider/static_src/scss/styles.scss 2019-08-12 13:50:47 +0000 | |||
19 | @@ -31,3 +31,27 @@ | |||
20 | 31 | display: none; | 31 | display: none; |
21 | 32 | } | 32 | } |
22 | 33 | } | 33 | } |
23 | 34 | |||
24 | 35 | //Side navigation for logged in users | ||
25 | 36 | .p-sidebar { | ||
26 | 37 | border-right: 1px solid $color-mid-light; | ||
27 | 38 | |||
28 | 39 | .is-active { | ||
29 | 40 | position: relative; | ||
30 | 41 | |||
31 | 42 | &::before { | ||
32 | 43 | background-color: $color-mid-light; | ||
33 | 44 | bottom: -$spv-inner--x-small; | ||
34 | 45 | content: ''; | ||
35 | 46 | left: -$sph-inner; | ||
36 | 47 | position: absolute; | ||
37 | 48 | top: -$spv-inner--x-small; | ||
38 | 49 | width: $bar-thickness; | ||
39 | 50 | } | ||
40 | 51 | } | ||
41 | 52 | } | ||
42 | 53 | |||
43 | 54 | // Fix for mixed buttons | ||
44 | 55 | [class^="p-button"] + [class^="p-button"] { | ||
45 | 56 | margin-left: $sph-inner; | ||
46 | 57 | } | ||
47 | 34 | 58 | ||
48 | === modified file 'src/webui/templates/account/edit.html' | |||
49 | --- src/webui/templates/account/edit.html 2018-07-31 15:57:21 +0000 | |||
50 | +++ src/webui/templates/account/edit.html 2019-08-12 13:50:47 +0000 | |||
51 | @@ -1,207 +1,158 @@ | |||
53 | 1 | {% extends "base.html" %} | 1 | {% extends "vanilla/base.html" %} |
54 | 2 | {% load i18n static url_with_token %} | 2 | {% load i18n static url_with_token %} |
55 | 3 | 3 | ||
56 | 4 | {% comment %} | 4 | {% comment %} |
58 | 5 | Copyright 2010 Canonical Ltd. This software is licensed under the | 5 | Copyright 2010-2019 Canonical Ltd. This software is licensed under the |
59 | 6 | GNU Affero General Public License version 3 (see the file LICENSE). | 6 | GNU Affero General Public License version 3 (see the file LICENSE). |
60 | 7 | {% endcomment %} | 7 | {% endcomment %} |
61 | 8 | 8 | ||
62 | 9 | {% block html_extra %}data-qa-id="edit_account"{% endblock %} | 9 | {% block html_extra %}data-qa-id="edit_account"{% endblock %} |
63 | 10 | 10 | ||
64 | 11 | {% block title %} | 11 | {% block title %} |
66 | 12 | {% blocktrans %}Personal details{% endblocktrans %} | 12 | {% blocktrans %}Personal details{% endblocktrans %} |
67 | 13 | {% endblock %} | 13 | {% endblock %} |
68 | 14 | 14 | ||
70 | 15 | {% block text_title %}<h1 class="u1-h-main">{% trans "Personal details" %}</h1>{% endblock %} | 15 | {% block text_title %}<h1>{% trans "My account" %}</h1>{% endblock %} |
71 | 16 | 16 | ||
72 | 17 | {% block extra_css %} | 17 | {% block extra_css %} |
73 | 18 | 18 | ||
75 | 19 | {% if last_authenticated_sites %} | 19 | {% if last_authenticated_sites %} |
76 | 20 | <style type="text/css"> | 20 | <style type="text/css"> |
78 | 21 | {% for site in last_authenticated_sites %} | 21 | {% for site in last_authenticated_sites %} |
79 | 22 | {% if rpconfig.logo_url %} | 22 | {% if rpconfig.logo_url %} |
81 | 23 | a[href='{{site.trust_root}}'] { | 23 | a[href='{{site.trust_root}}'] { |
82 | 24 | background-image: url('{{ rpconfig.logo_url }}'); | 24 | background-image: url('{{ rpconfig.logo_url }}'); |
83 | 25 | background-repeat: no-repeat; | 25 | background-repeat: no-repeat; |
84 | 26 | background-position: 0 0; | 26 | background-position: 0 0; |
85 | 27 | padding-left: 24px; | 27 | padding-left: 24px; |
86 | 28 | padding-top: 1px; | 28 | padding-top: 1px; |
88 | 29 | } | 29 | } |
89 | 30 | {% endif %} | 30 | {% endif %} |
91 | 31 | {% endfor %} | 31 | {% endfor %} |
92 | 32 | </style> | 32 | </style> |
94 | 33 | {% endif %} | 33 | {% endif %} |
95 | 34 | 34 | ||
96 | 35 | {% endblock %} | 35 | {% endblock %} |
97 | 36 | 36 | ||
98 | 37 | {% block content %} | 37 | {% block content %} |
113 | 38 | 38 | <section class="p-strip"> | |
114 | 39 | <div> | 39 | {% include "vanilla/common/unverified_email_warning.html" %} |
115 | 40 | {% include "common/unverified_email_warning.html" %} | 40 | {% include "vanilla/common/missing_backup_device_warning.html" %} |
116 | 41 | {% include "common/missing_backup_device_warning.html" %} | 41 | {% include "vanilla/common/printed_codes_nearly_exhausted_warning.html" %} |
117 | 42 | {% include "common/printed_codes_nearly_exhausted_warning.html" %} | 42 | <h2>Personal details</h2> |
118 | 43 | </div> | 43 | <form action="" method="post" class="edit-account-details" data-qa-id="edit_fieldsets"> |
119 | 44 | 44 | {% csrf_token %} | |
120 | 45 | <form action="" method="post" class="edit-account-details" data-qa-id="edit_fieldsets"> | 45 | <div data-qa-id="personal_details"></div> |
121 | 46 | {% csrf_token %} | 46 | |
122 | 47 | <fieldset class=""> | 47 | <div class="row"> |
123 | 48 | 48 | <div class="col-8"> | |
124 | 49 | <div data-qa-id="personal_details"></div> | 49 | <div class="p-form-validation{% if form.displayname.errors %} is-error{% endif %}"> |
111 | 50 | |||
112 | 51 | <div class="{% if form.displayname.errors %}haserrors {% endif %}name-input input-row"> | ||
125 | 52 | <label class="formLabel" for="id_displayname">{% trans "Full name:" %}</label> | 50 | <label class="formLabel" for="id_displayname">{% trans "Full name:" %}</label> |
126 | 53 | {{ form.displayname }} | 51 | {{ form.displayname }} |
127 | 54 | {% if form.displayname.errors %} | 52 | {% if form.displayname.errors %} |
131 | 55 | <span class="error"> | 53 | <p class="p-form-validation__message"> |
132 | 56 | {{ form.displayname.errors|first }} | 54 | <strong>Error:</strong> {{ form.displayname.errors|first }} |
133 | 57 | </span> | 55 | </p> |
134 | 58 | {% endif %} | 56 | {% endif %} |
136 | 59 | </div> | 57 | </div> |
137 | 60 | 58 | ||
140 | 61 | {% if form.username %} | 59 | {% if form.username %} |
141 | 62 | <div class="{% if form.username.errors %}haserrors {% endif %}username-input input-row"> | 60 | <div class="p-form-validation{% if form.username.errors %} is-error{% endif %}"> |
142 | 63 | <label class="formLabel" for="id_username">{% trans "Username:" %}</label> | 61 | <label class="formLabel" for="id_username">{% trans "Username:" %}</label> |
143 | 64 | {{ form.username }} | 62 | {{ form.username }} |
144 | 65 | {% if form.username.errors %} | 63 | {% if form.username.errors %} |
148 | 66 | <span class="error"> | 64 | <p class="p-form-validation__message"> |
149 | 67 | {{ form.username.errors|first }} | 65 | <strong>Error:</strong> {{ form.username.errors|first }} |
150 | 68 | </span> | 66 | </p> |
151 | 69 | {% endif %} | 67 | {% endif %} |
154 | 70 | </div> | 68 | </div> |
155 | 71 | {% endif %} | 69 | {% endif %} |
156 | 72 | 70 | ||
158 | 73 | <div class="{% if form.preferred_email.errors %}haserrors {% endif %}preferred-email-input input-row"> | 71 | <div class="p-form-validation {{% if form.preferred_email.errors %} is-error{% endif %}"> |
159 | 74 | <label class="formLabel tooltip" for="id_preferred_email"> | 72 | <label class="formLabel tooltip" for="id_preferred_email"> |
170 | 75 | {% trans "Preferred email address:" %} | 73 | {% trans "Preferred email address:" %} <span class="p-tooltip--right" aria-describedby="email-tooltip"><i class="p-icon--help"></i><span class="p-tooltip__message" role="tooltip" id="email-tooltip">{%spaceless%}{% blocktrans %}This email address is passed on to other sites <br>when requested as part of the login process.{% endblocktrans %}{{ form.preferred_email.help_text }}{% endspaceless %}</span></span> |
161 | 76 | |||
162 | 77 | <span class="description tooltip sprite help question-mark" | ||
163 | 78 | title="{%spaceless%} | ||
164 | 79 | {% blocktrans %}This email address is passed on to other sites when requested as part of the login process.{% endblocktrans %} | ||
165 | 80 | {{ form.preferred_email.help_text }} | ||
166 | 81 | {% endspaceless %}"> | ||
167 | 82 | ? | ||
168 | 83 | </span> | ||
169 | 84 | |||
171 | 85 | </label> | 74 | </label> |
172 | 86 | 75 | ||
173 | 87 | {% if form.preferred_email %} | 76 | {% if form.preferred_email %} |
180 | 88 | {% if form.preferred_email.errors %} | 77 | {% if form.preferred_email.errors %} |
181 | 89 | <span class="error"> | 78 | <p class="p-form-validation__message"> |
182 | 90 | {{ form.preferred_email.errors|first }} | 79 | <strong>Error: </strong>{{ form.preferred_email.errors|first }} |
183 | 91 | </span> | 80 | </p> |
184 | 92 | {% endif %} | 81 | {% endif %} |
185 | 93 | {{ form.preferred_email }} | 82 | {{ form.preferred_email }} |
186 | 94 | {% else %} | 83 | {% else %} |
240 | 95 | {# Manually added, it will be ignored by the django form #} | 84 | {# Manually added, it will be ignored by the django form #} |
241 | 96 | <input type="text" value="{{ unverified_email|default_if_none:'' }}" disabled="true" /> | 85 | <input type="text" value="{{ unverified_email|default_if_none:'' }}" disabled="true" /> |
242 | 97 | {% endif %} | 86 | {% endif %} |
243 | 98 | 87 | </div> | |
244 | 99 | </div> | 88 | |
245 | 100 | 89 | {% if not embedded %} | |
246 | 101 | {% if not embedded %} | 90 | <p class="manage-email-adresses"><a href="{% url_with_token 'account-emails' %}" data-qa-id="manage_email_addresses_link">{% trans "Manage email addresses" %}</a></p> |
247 | 102 | <p class="manage-email-adresses"><a href="{% url_with_token 'account-emails' %}" data-qa-id="manage_email_addresses_link">{% trans "Manage email addresses" %}</a></p> | 91 | {% endif %} |
248 | 103 | {% endif %} | 92 | </div> |
249 | 104 | 93 | </div> | |
250 | 105 | {% if not readonly %} | 94 | |
251 | 106 | {% include "widgets/passwords.html" with edit_account_labels=1 fields=form %} | 95 | {% if not readonly %} |
252 | 107 | {% endif %} | 96 | <div class="p-strip is-shallow"> |
253 | 108 | 97 | <hr> | |
254 | 109 | </fieldset> | 98 | </div> |
255 | 110 | 99 | ||
256 | 111 | {% if enable_device_prefs %} | 100 | <div class="row"> |
257 | 112 | <fieldset class="undecorated boxed device-prefs"> | 101 | <div class="col-8"> |
258 | 113 | <h4 class="legend" data-qa-id="authentication_devices">{% trans "Authentication devices" %}</h4> | 102 | {% include "widgets/passwords.html" with edit_account_labels=1 fields=form %} |
259 | 114 | <div class="{% if form.twofactor_required.errors %}haserrors {% endif %}twofactor-input input-row"> | 103 | </div> |
260 | 115 | {{ form.twofactor_required }} | 104 | </div> |
261 | 116 | {% if form.twofactor_required.errors %} | 105 | {% endif %} |
262 | 117 | <span class="error">{{ form.twofactor_required.errors|first }}</span> | 106 | |
263 | 118 | {% endif %} | 107 | {% if enable_device_prefs %} |
264 | 119 | </div> | 108 | <div class="p-strip is-shallow"> |
265 | 120 | <div class="{% if form.warn_about_backup_device.errors %}haserrors {% endif %}backupdevice-warn-input input-row"> | 109 | <hr> |
266 | 121 | {{ form.warn_about_backup_device }} | 110 | </div> |
267 | 122 | <label class="formLabel" for="id_warn_about_backup_device"> | 111 | <h4 class="legend" data-qa-id="authentication_devices">{% trans "Authentication devices" %}</h4> |
268 | 123 | {{ form.warn_about_backup_device.label }} | 112 | <div class="p-form-validation{% if form.twofactor_required.errors %} is-errors{% endif %}"> |
269 | 124 | </label> | 113 | {{ form.twofactor_required }} |
270 | 125 | {% if form.warn_about_backup_device.errors %} | 114 | {% if form.twofactor_required.errors %} |
271 | 126 | <span class="error">{{ form.warn_about_backup_device.errors|first }}</span> | 115 | <p class="p-form-validation__message"> |
272 | 127 | {% endif %} | 116 | <strong>Error:</strong> {{ form.twofactor_required.errors|first }} |
273 | 128 | </div> | 117 | </p> |
274 | 129 | </fieldset> | 118 | {% endif %} |
275 | 130 | {% endif %} | 119 | </div> |
276 | 131 | 120 | ||
277 | 132 | <p class="actions"> | 121 | <div class="p-form-validation{% if form.warn_about_backup_device.errors %} is-error{% endif %}"> |
278 | 133 | {% if not readonly %} | 122 | {{ form.warn_about_backup_device }} |
279 | 134 | <button type="submit" class="btn cta" name="update" data-qa-id="update_preferences"> | 123 | <label class="formLabel" for="id_warn_about_backup_device"> |
280 | 135 | <span>{% trans "Save changes" %}</span> | 124 | {{ form.warn_about_backup_device.label }} |
281 | 136 | </button> | 125 | </label> |
282 | 137 | {% endif %} | 126 | {% if form.warn_about_backup_device.errors %} |
283 | 138 | {% if token %} | 127 | <p class="p-form-validation__message"> |
284 | 139 | {% trans "or" %} | 128 | <strong>Error:</strong> {{ form.warn_about_backup_device.errors|first }} |
285 | 140 | <a id="exit" href="{% if require_username %}{% url 'server-decide' token %}?continue{% else %}.{% endif %}">{% trans "exit without updating" %}</a> | 129 | </p> |
286 | 141 | {% endif %} | 130 | {% endif %} |
287 | 142 | </p> | 131 | </div> |
288 | 143 | </form> | 132 | {% endif %} |
289 | 144 | 133 | ||
290 | 145 | <p><a href="/+delete" data-qa-id="delete_account_link">{% trans "Permanently delete account" %}</a></p> | 134 | <div class="p-strip is-shallow"> |
291 | 146 | 135 | <hr> | |
292 | 147 | {% include "widgets/last_auth_sites.html" %} | 136 | </div> |
293 | 137 | |||
294 | 138 | {% if not readonly %} | ||
295 | 139 | <button type="submit" class="p-button--positive" name="update" data-qa-id="update_preferences"> | ||
296 | 140 | <span>{% trans "Save changes" %}</span> | ||
297 | 141 | </button> | ||
298 | 142 | {% endif %} | ||
299 | 143 | {% if token %} | ||
300 | 144 | {% trans "or" %} | ||
301 | 145 | <p><a id="exit" href="{% if require_username %}{% url 'server-decide' token %}?continue{% else %}.{% endif %}">{% trans "exit without updating" %}</a></p> | ||
302 | 146 | {% endif %} | ||
303 | 147 | </form> | ||
304 | 148 | |||
305 | 149 | <p><a href="/+delete" data-qa-id="delete_account_link">{% trans "Permanently delete account" %}</a></p> | ||
306 | 150 | |||
307 | 151 | {% include "widgets/last_auth_sites.html" %} | ||
308 | 152 | </section> | ||
309 | 148 | 153 | ||
310 | 149 | {% endblock %} | 154 | {% endblock %} |
311 | 150 | 155 | ||
312 | 151 | {% block extra_js %} | 156 | {% block extra_js %} |
368 | 152 | 157 | {% include "registration/_password_meter.html" with pwd_selector="#id_password" pwd_confirm_selector="#id_passwordconfirm" %} | |
314 | 153 | {% include "registration/_password_meter.html" with pwd_selector="#id_password" pwd_confirm_selector="#id_passwordconfirm" %} | ||
315 | 154 | |||
316 | 155 | <script type="text/javascript"> | ||
317 | 156 | |||
318 | 157 | YUI({ | ||
319 | 158 | groups: { | ||
320 | 159 | |||
321 | 160 | u1: { | ||
322 | 161 | base: '{% static "identityprovider/js/u1/build/" %}', | ||
323 | 162 | combine: {{ combine|lower }}, | ||
324 | 163 | root: 'identityprovider/js/u1/build/', | ||
325 | 164 | modules: { | ||
326 | 165 | 'one-widget-tooltip': { | ||
327 | 166 | type: 'js', | ||
328 | 167 | path: 'one-widget-tooltip/one-widget-tooltip-min.js' | ||
329 | 168 | } | ||
330 | 169 | } | ||
331 | 170 | } | ||
332 | 171 | } | ||
333 | 172 | }).use('one-widget-tooltip', function(Y) { | ||
334 | 173 | |||
335 | 174 | tt = new Y.U1.Widget.Tooltip({ | ||
336 | 175 | triggerNodes:".tooltip", | ||
337 | 176 | delegate: ".tooltip", | ||
338 | 177 | shim:false, | ||
339 | 178 | hideDelay: 1500, | ||
340 | 179 | autoHideDelay: 100000, | ||
341 | 180 | zIndex:100, | ||
342 | 181 | compass: 'east', | ||
343 | 182 | content: '<p class="tooltip-title">{% trans "Preferred email address" %}</p>' + | ||
344 | 183 | '<p>{% blocktrans %}This email address is passed on to other sites when requested as part of the login process.{% endblocktrans %}</p>' + | ||
345 | 184 | '<p>{{ form.preferred_email.help_text|escapejs }}</p>', | ||
346 | 185 | escapeHTML: false | ||
347 | 186 | }); | ||
348 | 187 | |||
349 | 188 | // lighter version | ||
350 | 189 | tt.get('srcNode').addClass('tooltip-light'); | ||
351 | 190 | |||
352 | 191 | // users should be able to enter tooltip to click links | ||
353 | 192 | tt.on('mouseover', function () { | ||
354 | 193 | this._clearTimers(); | ||
355 | 194 | }, tt); | ||
356 | 195 | tt.on('mouseleave', function () { | ||
357 | 196 | this.hide(); | ||
358 | 197 | }, tt); | ||
359 | 198 | |||
360 | 199 | tt.render(); | ||
361 | 200 | |||
362 | 201 | |||
363 | 202 | }); | ||
364 | 203 | |||
365 | 204 | </script> | ||
366 | 205 | |||
367 | 206 | |||
369 | 207 | {% endblock %} | 158 | {% endblock %} |
370 | 208 | 159 | ||
371 | === modified file 'src/webui/templates/registration/email_sent.html' | |||
372 | --- src/webui/templates/registration/email_sent.html 2019-08-05 13:47:39 +0000 | |||
373 | +++ src/webui/templates/registration/email_sent.html 2019-08-12 13:50:47 +0000 | |||
374 | @@ -16,6 +16,8 @@ | |||
375 | 16 | <h1>{{ email_heading }}</h1> | 16 | <h1>{{ email_heading }}</h1> |
376 | 17 | {% endblock %} | 17 | {% endblock %} |
377 | 18 | 18 | ||
378 | 19 | {% block content_class %}{% endblock %} | ||
379 | 20 | |||
380 | 19 | {% block content %} | 21 | {% block content %} |
381 | 20 | <section class="p-strip"> | 22 | <section class="p-strip"> |
382 | 21 | <div class="row"> | 23 | <div class="row"> |
383 | 22 | 24 | ||
384 | === modified file 'src/webui/templates/registration/forgot_password.html' | |||
385 | --- src/webui/templates/registration/forgot_password.html 2019-07-30 13:29:30 +0000 | |||
386 | +++ src/webui/templates/registration/forgot_password.html 2019-08-12 13:50:47 +0000 | |||
387 | @@ -16,6 +16,8 @@ | |||
388 | 16 | 16 | ||
389 | 17 | {% block content_id %}auth{% endblock %} | 17 | {% block content_id %}auth{% endblock %} |
390 | 18 | 18 | ||
391 | 19 | {% block content_class %}{% endblock %} | ||
392 | 20 | |||
393 | 19 | {% block content %} | 21 | {% block content %} |
394 | 20 | <section class="p-strip"> | 22 | <section class="p-strip"> |
395 | 21 | <div class="row"> | 23 | <div class="row"> |
396 | 22 | 24 | ||
397 | === modified file 'src/webui/templates/registration/login.html' | |||
398 | --- src/webui/templates/registration/login.html 2019-07-26 13:31:34 +0000 | |||
399 | +++ src/webui/templates/registration/login.html 2019-08-12 13:50:47 +0000 | |||
400 | @@ -39,6 +39,8 @@ | |||
401 | 39 | {% endif %} | 39 | {% endif %} |
402 | 40 | {% endblock %} | 40 | {% endblock %} |
403 | 41 | 41 | ||
404 | 42 | {% block content_class %}{% endblock %} | ||
405 | 43 | |||
406 | 42 | {% block content %} | 44 | {% block content %} |
407 | 43 | 45 | ||
408 | 44 | <section class="p-strip"> | 46 | <section class="p-strip"> |
409 | 45 | 47 | ||
410 | === modified file 'src/webui/templates/registration/logout.html' | |||
411 | --- src/webui/templates/registration/logout.html 2019-07-22 09:32:22 +0000 | |||
412 | +++ src/webui/templates/registration/logout.html 2019-08-12 13:50:47 +0000 | |||
413 | @@ -14,6 +14,8 @@ | |||
414 | 14 | <h1>{% trans "You have been logged out" %}</h1> | 14 | <h1>{% trans "You have been logged out" %}</h1> |
415 | 15 | {% endblock %} | 15 | {% endblock %} |
416 | 16 | 16 | ||
417 | 17 | {% block content_class %}{% endblock %} | ||
418 | 18 | |||
419 | 17 | {% block content %} | 19 | {% block content %} |
420 | 18 | <section class="p-strip"> | 20 | <section class="p-strip"> |
421 | 19 | <div class="row"> | 21 | <div class="row"> |
422 | 20 | 22 | ||
423 | === modified file 'src/webui/templates/registration/new_account.html' | |||
424 | --- src/webui/templates/registration/new_account.html 2019-07-26 13:31:34 +0000 | |||
425 | +++ src/webui/templates/registration/new_account.html 2019-08-12 13:50:47 +0000 | |||
426 | @@ -27,6 +27,8 @@ | |||
427 | 27 | 27 | ||
428 | 28 | {% block content_id %}auth{% endblock %} | 28 | {% block content_id %}auth{% endblock %} |
429 | 29 | 29 | ||
430 | 30 | {% block content_class %}{% endblock %} | ||
431 | 31 | |||
432 | 30 | {% block content %} | 32 | {% block content %} |
433 | 31 | 33 | ||
434 | 32 | <section class="p-strip"> | 34 | <section class="p-strip"> |
435 | 33 | 35 | ||
436 | === modified file 'src/webui/templates/registration/reset_password.html' | |||
437 | --- src/webui/templates/registration/reset_password.html 2019-08-05 13:47:39 +0000 | |||
438 | +++ src/webui/templates/registration/reset_password.html 2019-08-12 13:50:47 +0000 | |||
439 | @@ -16,6 +16,8 @@ | |||
440 | 16 | 16 | ||
441 | 17 | {% block content_id %}auth{% endblock %} | 17 | {% block content_id %}auth{% endblock %} |
442 | 18 | 18 | ||
443 | 19 | {% block content_class %}{% endblock %} | ||
444 | 20 | |||
445 | 19 | {% block content %} | 21 | {% block content %} |
446 | 20 | <section class="p-strip"> | 22 | <section class="p-strip"> |
447 | 21 | <div class="row"> | 23 | <div class="row"> |
448 | 22 | 24 | ||
449 | === modified file 'src/webui/templates/static/faq.html' | |||
450 | --- src/webui/templates/static/faq.html 2019-08-05 13:29:33 +0000 | |||
451 | +++ src/webui/templates/static/faq.html 2019-08-12 13:50:47 +0000 | |||
452 | @@ -18,6 +18,7 @@ | |||
453 | 18 | <h1 class="main">{% trans "Frequently asked questions" %}</h1> | 18 | <h1 class="main">{% trans "Frequently asked questions" %}</h1> |
454 | 19 | {% endblock %} | 19 | {% endblock %} |
455 | 20 | 20 | ||
456 | 21 | {% block content_class %}{% endblock %} | ||
457 | 21 | {% block content %} | 22 | {% block content %} |
458 | 22 | {% url 'account-index' as home_url %} | 23 | {% url 'account-index' as home_url %} |
459 | 23 | {% url 'account-emails' as emails_url %} | 24 | {% url 'account-emails' as emails_url %} |
460 | 24 | 25 | ||
461 | === modified file 'src/webui/templates/vanilla/_footer.html' | |||
462 | --- src/webui/templates/vanilla/_footer.html 2019-07-22 09:32:22 +0000 | |||
463 | +++ src/webui/templates/vanilla/_footer.html 2019-08-12 13:50:47 +0000 | |||
464 | @@ -5,7 +5,7 @@ | |||
465 | 5 | GNU Affero General Public License version 3 (see the file LICENSE). | 5 | GNU Affero General Public License version 3 (see the file LICENSE). |
466 | 6 | {% endcomment %} | 6 | {% endcomment %} |
467 | 7 | 7 | ||
469 | 8 | <footer class="p-strip" data-qa-id="ubuntuone_footer"> | 8 | <footer class="p-strip u-no-padding--top" data-qa-id="ubuntuone_footer"> |
470 | 9 | <hr> | 9 | <hr> |
471 | 10 | <div class="row"> | 10 | <div class="row"> |
472 | 11 | <p>{% trans "Ubuntu One. One place to log in to everything on Ubuntu." %}</p> | 11 | <p>{% trans "Ubuntu One. One place to log in to everything on Ubuntu." %}</p> |
473 | 12 | 12 | ||
474 | === modified file 'src/webui/templates/vanilla/base.html' | |||
475 | --- src/webui/templates/vanilla/base.html 2019-07-26 13:31:34 +0000 | |||
476 | +++ src/webui/templates/vanilla/base.html 2019-08-12 13:50:47 +0000 | |||
477 | @@ -1,6 +1,5 @@ | |||
478 | 1 | {% load i18n static_url combo staticfiles %} | 1 | {% load i18n static_url combo staticfiles %} |
479 | 2 | <!DOCTYPE html> | 2 | <!DOCTYPE html> |
480 | 3 | |||
481 | 4 | <!--[if IE 7 ]><html class="ie7" lang="en" dir="ltr"><![endif]--> | 3 | <!--[if IE 7 ]><html class="ie7" lang="en" dir="ltr"><![endif]--> |
482 | 5 | <!--[if IE 8 ]><html class="ie8" lang="en" dir="ltr"><![endif]--> | 4 | <!--[if IE 8 ]><html class="ie8" lang="en" dir="ltr"><![endif]--> |
483 | 6 | <!--[if (gte IE 9)|!(IE)]><!--><html lang="en" dir="ltr" class="no-js" {% block html_extra %}{% endblock %}><!--<![endif]--> | 5 | <!--[if (gte IE 9)|!(IE)]><!--><html lang="en" dir="ltr" class="no-js" {% block html_extra %}{% endblock %}><!--<![endif]--> |
484 | @@ -42,13 +41,6 @@ | |||
485 | 42 | 41 | ||
486 | 43 | <div id="cont" role="main"> | 42 | <div id="cont" role="main"> |
487 | 44 | {% include "vanilla/_header.html" %} | 43 | {% include "vanilla/_header.html" %} |
488 | 45 | |||
489 | 46 | {% block menu %} | ||
490 | 47 | {% if user.is_authenticated %} | ||
491 | 48 | {% include "widgets/personal-menu.html" %} | ||
492 | 49 | {% endif %} | ||
493 | 50 | {% endblock %} | ||
494 | 51 | |||
495 | 52 | <div id="content"> | 44 | <div id="content"> |
496 | 53 | <section class="p-strip--dark p-cip-hero"> | 45 | <section class="p-strip--dark p-cip-hero"> |
497 | 54 | <div class="row"> | 46 | <div class="row"> |
498 | @@ -86,8 +78,17 @@ | |||
499 | 86 | {% endif %} | 78 | {% endif %} |
500 | 87 | {% endblock %} | 79 | {% endblock %} |
501 | 88 | 80 | ||
504 | 89 | <div id="{% block content_id %}box{% endblock %}"> | 81 | <div id="{% block content_id %}box{% endblock %}" class="row"> |
505 | 90 | {% block content %}{% endblock %} | 82 | {% block menu %} |
506 | 83 | {% if user.is_authenticated %} | ||
507 | 84 | <div class="col-4 p-sidebar"> | ||
508 | 85 | {% include "vanilla/widgets/personal-menu.html" %} | ||
509 | 86 | </div> | ||
510 | 87 | {% endif %} | ||
511 | 88 | {% endblock %} | ||
512 | 89 | <div class="{% block content_class %}col-8{% endblock %}"> | ||
513 | 90 | {% block content %}{% endblock %} | ||
514 | 91 | </div> | ||
515 | 91 | </div> | 92 | </div> |
516 | 92 | 93 | ||
517 | 93 | </div><!-- close #content --> | 94 | </div><!-- close #content --> |
518 | 94 | 95 | ||
519 | === added directory 'src/webui/templates/vanilla/common' | |||
520 | === added file 'src/webui/templates/vanilla/common/missing_backup_device_warning.html' | |||
521 | --- src/webui/templates/vanilla/common/missing_backup_device_warning.html 1970-01-01 00:00:00 +0000 | |||
522 | +++ src/webui/templates/vanilla/common/missing_backup_device_warning.html 2019-08-12 13:50:47 +0000 | |||
523 | @@ -0,0 +1,19 @@ | |||
524 | 1 | {% load i18n %} | ||
525 | 2 | |||
526 | 3 | {% if need_backup_device_warning %} | ||
527 | 4 | {% url 'device-addition' as add_device %} | ||
528 | 5 | <div id="missing_backup_device" class="p-notification--caution"> | ||
529 | 6 | <p class="p-notification__response"> | ||
530 | 7 | <span class="p-notification__status">{% blocktrans %}Warning:{% endblocktrans %}</span> | ||
531 | 8 | {% blocktrans %}We strongly recommend having two authentication devices, | ||
532 | 9 | a <strong>primary</strong> device and a <strong>secondary</strong> | ||
533 | 10 | or backup device. | ||
534 | 11 | <br><br> | ||
535 | 12 | Having two authentication devices means you can continue to access your | ||
536 | 13 | account with your secondary device should your primary device be lost or | ||
537 | 14 | stolen. | ||
538 | 15 | <br><br> | ||
539 | 16 | Click to <a href="{{ add_device }}">add a backup device</a>.{% endblocktrans %} | ||
540 | 17 | </p> | ||
541 | 18 | </div> | ||
542 | 19 | {% endif %} | ||
543 | 0 | 20 | ||
544 | === added file 'src/webui/templates/vanilla/common/printed_codes_nearly_exhausted_warning.html' | |||
545 | --- src/webui/templates/vanilla/common/printed_codes_nearly_exhausted_warning.html 1970-01-01 00:00:00 +0000 | |||
546 | +++ src/webui/templates/vanilla/common/printed_codes_nearly_exhausted_warning.html 2019-08-12 13:50:47 +0000 | |||
547 | @@ -0,0 +1,15 @@ | |||
548 | 1 | {% load i18n url_with_token %} | ||
549 | 2 | |||
550 | 3 | {% if paper_devices_needing_renewal %} | ||
551 | 4 | <div id="exhausted_warning" class="p-notification--caution"> | ||
552 | 5 | <p class="p-notification__response"> | ||
553 | 6 | <span class="p-notification__status">{% blocktrans %}Warning:{% endblocktrans %}</span> | ||
554 | 7 | {% blocktrans %}Your printed list of backup codes is nearly used up. | ||
555 | 8 | Please print a new list for the following devices.{% endblocktrans %} | ||
556 | 9 | <br><br> | ||
557 | 10 | {% for device in paper_devices_needing_renewal %} | ||
558 | 11 | {{ device.name }} <a href="{% url_with_token 'device-print' device_id=device.id %}" class="btn-sm"><span>{% trans 'Generate New Codes' %}</span></a> | ||
559 | 12 | {% endfor %} | ||
560 | 13 | </p> | ||
561 | 14 | </div> | ||
562 | 15 | {% endif %} | ||
563 | 0 | 16 | ||
564 | === added file 'src/webui/templates/vanilla/common/unverified_email_warning.html' | |||
565 | --- src/webui/templates/vanilla/common/unverified_email_warning.html 1970-01-01 00:00:00 +0000 | |||
566 | +++ src/webui/templates/vanilla/common/unverified_email_warning.html 2019-08-12 13:50:47 +0000 | |||
567 | @@ -0,0 +1,14 @@ | |||
568 | 1 | {% load i18n url_with_token %} | ||
569 | 2 | |||
570 | 3 | {% if need_verify_email_warning %} | ||
571 | 4 | {% url_with_token 'verify_email' email_address=unverified_email.email as verify_url %} | ||
572 | 5 | <div class="p-notification--caution"> | ||
573 | 6 | <p class="p-notification__response"> | ||
574 | 7 | <span class="p-notification__status">{% blocktrans %}Warning:{% endblocktrans %}</span> | ||
575 | 8 | {% blocktrans %} | ||
576 | 9 | You have not verified your email address {{ unverified_email }}. | ||
577 | 10 | Click to <a href="{{ verify_url }}">verify your email address</a>. | ||
578 | 11 | {% endblocktrans %} | ||
579 | 12 | </p> | ||
580 | 13 | </div> | ||
581 | 14 | {% endif %} | ||
582 | 0 | 15 | ||
583 | === added file 'src/webui/templates/vanilla/widgets/passwords.html' | |||
584 | --- src/webui/templates/vanilla/widgets/passwords.html 1970-01-01 00:00:00 +0000 | |||
585 | +++ src/webui/templates/vanilla/widgets/passwords.html 2019-08-12 13:50:47 +0000 | |||
586 | @@ -0,0 +1,40 @@ | |||
587 | 1 | {% load i18n %} | ||
588 | 2 | {% if fields.oldpassword %} | ||
589 | 3 | <p>{% trans "To edit any details on this page, you must confirm your current password." %}</p> | ||
590 | 4 | |||
591 | 5 | {% if edit_account_labels %} | ||
592 | 6 | <div class="p-form-validation{% if fields.oldpassword.errors or fields.non_field_errors %} is-error{% endif %}"> | ||
593 | 7 | <label for="id_oldpassword">{% trans "Current password" %}</label> | ||
594 | 8 | {{ fields.oldpassword }} | ||
595 | 9 | {% if fields.oldpassword.errors %} | ||
596 | 10 | <p class="p-form-validation__message"> | ||
597 | 11 | <strong>Error:</strong> {{ fields.oldpassword.errors|first }} | ||
598 | 12 | </p> | ||
599 | 13 | {% endif %} | ||
600 | 14 | </div> | ||
601 | 15 | {% endif %} | ||
602 | 16 | {% endif %} | ||
603 | 17 | |||
604 | 18 | {% if edit_account_labels %} | ||
605 | 19 | <div class="p-form-validation{% if fields.password.errors or fields.non_field_errors %} is-error{% endif %}"> | ||
606 | 20 | <label for="id_password">{% trans "Choose password" %}</label> | ||
607 | 21 | {{ fields.password }} | ||
608 | 22 | {% if fields.password.errors %} | ||
609 | 23 | <p class="p-form-validation__message"> | ||
610 | 24 | <strong>Error:</strong> {{ fields.password.errors|first }} | ||
611 | 25 | </p> | ||
612 | 26 | {% endif %} | ||
613 | 27 | </div> | ||
614 | 28 | {% endif %} | ||
615 | 29 | |||
616 | 30 | {% if edit_account_labels %} | ||
617 | 31 | <div class="p-form-validation{% if fields.passwordconfirm.errors or fields.non_field_errors %} is-error{% endif %}"> | ||
618 | 32 | <label for="id_passwordconfirm">{% trans "Re-type password" %}</label> | ||
619 | 33 | {{ fields.passwordconfirm }} | ||
620 | 34 | {% if fields.passwordconfirm.errors %} | ||
621 | 35 | <p class="p-form-validation__message"> | ||
622 | 36 | <strong>Error:</strong> {{ fields.passwordconfirm.errors|first }} | ||
623 | 37 | </p> | ||
624 | 38 | {% endif %} | ||
625 | 39 | </div> | ||
626 | 40 | {% endif %} | ||
627 | 0 | 41 | ||
628 | === added file 'src/webui/templates/vanilla/widgets/personal-menu.html' | |||
629 | --- src/webui/templates/vanilla/widgets/personal-menu.html 1970-01-01 00:00:00 +0000 | |||
630 | +++ src/webui/templates/vanilla/widgets/personal-menu.html 2019-08-12 13:50:47 +0000 | |||
631 | @@ -0,0 +1,50 @@ | |||
632 | 1 | {% comment %} | ||
633 | 2 | Copyright 2010-2019 Canonical Ltd. This software is licensed under | ||
634 | 3 | the GNU Affero General Public License version 3 (see the file | ||
635 | 4 | LICENSE). | ||
636 | 5 | {% endcomment %} | ||
637 | 6 | |||
638 | 7 | {% load gargoyle_tags %} | ||
639 | 8 | {% load i18n %} | ||
640 | 9 | {% load menu_item %} | ||
641 | 10 | {% load url_with_token %} | ||
642 | 11 | <div class="p-strip"> | ||
643 | 12 | <ul class="p-list"> | ||
644 | 13 | {% url_with_token 'account-index' as account_url %} | ||
645 | 14 | |||
646 | 15 | {% if current_section == 'account' %} | ||
647 | 16 | {% menu_item "account2" _("Personal details") account_url None "p-list__item is-active" %} | ||
648 | 17 | {% else %} | ||
649 | 18 | {% menu_item "account2" _("Personal details") account_url None "p-list__item" %} | ||
650 | 19 | {% endif %} | ||
651 | 20 | |||
652 | 21 | {% if not token and not readonly %} | ||
653 | 22 | {% ifswitch TWOFACTOR %} | ||
654 | 23 | {% url 'device-list' as device_url %} | ||
655 | 24 | {% if current_section == 'devices' %} | ||
656 | 25 | {% menu_item "devices" _("Authentication devices") device_url None "p-list__item is-active" %} | ||
657 | 26 | {% else %} | ||
658 | 27 | {% menu_item "devices" _("Authentication devices") device_url None "p-list__item" %} | ||
659 | 28 | {% endif %} | ||
660 | 29 | {% endifswitch %} | ||
661 | 30 | {% url 'applications' as applications_url %} | ||
662 | 31 | {% if current_section == 'applications' %} | ||
663 | 32 | {% menu_item "applications" _("Applications") applications_url None "p-list__item is-active" %} | ||
664 | 33 | {% else %} | ||
665 | 34 | {% menu_item "applications" _("Applications") applications_url None "p-list__item" %} | ||
666 | 35 | {% endif %} | ||
667 | 36 | {% ifswitch SSH_KEY_INTEGRATION %} | ||
668 | 37 | {% url 'ssh_keys' as ssh_url %} | ||
669 | 38 | {% menu_item "ssh_keys" _("SSH keys") ssh_url None "p-list__item" %} | ||
670 | 39 | {% endifswitch %} | ||
671 | 40 | {% url 'auth_log' as auth_log_url %} | ||
672 | 41 | {% if current_section == 'auth_log' %} | ||
673 | 42 | {% menu_item "auth_log" _("Account activity") auth_log_url None "p-list__item is-active" %} | ||
674 | 43 | {% menu_item "auth_log" _("Account activity") auth_log_url None "p-list__item is-active" %} | ||
675 | 44 | {% else %} | ||
676 | 45 | {% menu_item "auth_log" _("Account activity") auth_log_url None "p-list__item" %} | ||
677 | 46 | {% endif %} | ||
678 | 47 | {% endif %} | ||
679 | 48 | |||
680 | 49 | </ul> | ||
681 | 50 | </div> |
Some small comments when eye-balling code. No QA.