Merge lp:~deadlight/canonical-identity-provider/my-account into lp:~deadlight/canonical-identity-provider/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
Reviewer Review Type Date Requested Status
Anthony Dillon (community) Approve
Karl Williams Pending
Review via email: mp+371201@code.launchpad.net

Description of the change

Converted the My Account page to Vanilla Framework

QA:

- npm i
- ./node_modules/gulp/bin/gulp.js sass

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 :

Some small comments when eye-balling code. No QA.

1699. By Karl Williams

Remove superfluous spaces

1700. By Karl Williams

Add border to left menu

Revision history for this message
Anthony Dillon (ya-bo-ng) wrote :

LGTM +1

review: Approve
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
=== modified file 'src/identityprovider/forms.py'
--- src/identityprovider/forms.py 2019-06-18 20:13:31 +0000
+++ src/identityprovider/forms.py 2019-08-12 13:50:47 +0000
@@ -290,8 +290,8 @@
290 emails_url = reverse('account-emails')290 emails_url = reverse('account-emails')
291 text = _(291 text = _(
292 'Only verified email addresses are listed. Click '292 'Only verified email addresses are listed. Click '
293 '<a href="%s">Manage email addresses</a> '293 '"Manage email addresses" '
294 'to add and verify email addresses.') % emails_url294 'to add and verify email addresses.')
295295
296 # add and display a dropdown with the valid choices296 # add and display a dropdown with the valid choices
297 self.fields['preferred_email'] = PreferredEmailField(297 self.fields['preferred_email'] = PreferredEmailField(
298298
=== modified file 'src/identityprovider/static_src/scss/styles.scss'
--- src/identityprovider/static_src/scss/styles.scss 2019-08-05 13:10:19 +0000
+++ src/identityprovider/static_src/scss/styles.scss 2019-08-12 13:50:47 +0000
@@ -31,3 +31,27 @@
31 display: none;31 display: none;
32 }32 }
33}33}
34
35//Side navigation for logged in users
36.p-sidebar {
37 border-right: 1px solid $color-mid-light;
38
39 .is-active {
40 position: relative;
41
42 &::before {
43 background-color: $color-mid-light;
44 bottom: -$spv-inner--x-small;
45 content: '';
46 left: -$sph-inner;
47 position: absolute;
48 top: -$spv-inner--x-small;
49 width: $bar-thickness;
50 }
51 }
52}
53
54// Fix for mixed buttons
55[class^="p-button"] + [class^="p-button"] {
56 margin-left: $sph-inner;
57}
3458
=== modified file 'src/webui/templates/account/edit.html'
--- src/webui/templates/account/edit.html 2018-07-31 15:57:21 +0000
+++ src/webui/templates/account/edit.html 2019-08-12 13:50:47 +0000
@@ -1,207 +1,158 @@
1{% extends "base.html" %}1{% extends "vanilla/base.html" %}
2{% load i18n static url_with_token %}2{% load i18n static url_with_token %}
33
4{% comment %}4{% comment %}
5Copyright 2010 Canonical Ltd. This software is licensed under the5Copyright 2010-2019 Canonical Ltd. This software is licensed under the
6GNU Affero General Public License version 3 (see the file LICENSE).6GNU Affero General Public License version 3 (see the file LICENSE).
7{% endcomment %}7{% endcomment %}
88
9{% block html_extra %}data-qa-id="edit_account"{% endblock %}9{% block html_extra %}data-qa-id="edit_account"{% endblock %}
1010
11{% block title %}11{% block title %}
12 {% blocktrans %}Personal details{% endblocktrans %}12 {% blocktrans %}Personal details{% endblocktrans %}
13{% endblock %}13{% endblock %}
1414
15{% block text_title %}<h1 class="u1-h-main">{% trans "Personal details" %}</h1>{% endblock %}15{% block text_title %}<h1>{% trans "My account" %}</h1>{% endblock %}
1616
17{% block extra_css %}17{% block extra_css %}
1818
19 {% if last_authenticated_sites %}19 {% if last_authenticated_sites %}
20 <style type="text/css">20 <style type="text/css">
21 {% for site in last_authenticated_sites %}21 {% for site in last_authenticated_sites %}
22 {% if rpconfig.logo_url %}22 {% if rpconfig.logo_url %}
23 a[href='{{site.trust_root}}'] {23 a[href='{{site.trust_root}}'] {
24 background-image: url('{{ rpconfig.logo_url }}');24 background-image: url('{{ rpconfig.logo_url }}');
25 background-repeat: no-repeat;25 background-repeat: no-repeat;
26 background-position: 0 0;26 background-position: 0 0;
27 padding-left: 24px;27 padding-left: 24px;
28 padding-top: 1px;28 padding-top: 1px;
29 }29 }
30 {% endif %}30 {% endif %}
31 {% endfor %}31 {% endfor %}
32 </style>32 </style>
33 {% endif %}33 {% endif %}
3434
35{% endblock %}35{% endblock %}
3636
37{% block content %}37{% block content %}
3838 <section class="p-strip">
39<div>39 {% include "vanilla/common/unverified_email_warning.html" %}
40{% include "common/unverified_email_warning.html" %}40 {% include "vanilla/common/missing_backup_device_warning.html" %}
41{% include "common/missing_backup_device_warning.html" %}41 {% include "vanilla/common/printed_codes_nearly_exhausted_warning.html" %}
42{% include "common/printed_codes_nearly_exhausted_warning.html" %}42 <h2>Personal details</h2>
43</div>43 <form action="" method="post" class="edit-account-details" data-qa-id="edit_fieldsets">
4444 {% csrf_token %}
45<form action="" method="post" class="edit-account-details" data-qa-id="edit_fieldsets">45 <div data-qa-id="personal_details"></div>
46 {% csrf_token %}46
47 <fieldset class="">47 <div class="row">
4848 <div class="col-8">
49 <div data-qa-id="personal_details"></div>49 <div class="p-form-validation{% if form.displayname.errors %} is-error{% endif %}">
50
51 <div class="{% if form.displayname.errors %}haserrors {% endif %}name-input input-row">
52 <label class="formLabel" for="id_displayname">{% trans "Full name:" %}</label>50 <label class="formLabel" for="id_displayname">{% trans "Full name:" %}</label>
53 {{ form.displayname }}51 {{ form.displayname }}
54 {% if form.displayname.errors %}52 {% if form.displayname.errors %}
55 <span class="error">53 <p class="p-form-validation__message">
56 {{ form.displayname.errors|first }}54 <strong>Error:</strong> {{ form.displayname.errors|first }}
57 </span>55 </p>
58 {% endif %}56 {% endif %}
59 </div>57 </div>
6058
61 {% if form.username %}59 {% if form.username %}
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 %}">
63 <label class="formLabel" for="id_username">{% trans "Username:" %}</label>61 <label class="formLabel" for="id_username">{% trans "Username:" %}</label>
64 {{ form.username }}62 {{ form.username }}
65 {% if form.username.errors %}63 {% if form.username.errors %}
66 <span class="error">64 <p class="p-form-validation__message">
67 {{ form.username.errors|first }}65 <strong>Error:</strong> {{ form.username.errors|first }}
68 </span>66 </p>
69 {% endif %}67 {% endif %}
70 </div>68 </div>
71 {% endif %}69 {% endif %}
7270
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 %}">
74 <label class="formLabel tooltip" for="id_preferred_email">72 <label class="formLabel tooltip" for="id_preferred_email">
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>
76
77 <span class="description tooltip sprite help question-mark"
78 title="{%spaceless%}
79 {% blocktrans %}This email address is passed on to other sites when requested as part of the login process.{% endblocktrans %}
80 {{ form.preferred_email.help_text }}
81 {% endspaceless %}">
82 ?
83 </span>
84
85 </label>74 </label>
8675
87 {% if form.preferred_email %}76 {% if form.preferred_email %}
88 {% if form.preferred_email.errors %}77 {% if form.preferred_email.errors %}
89 <span class="error">78 <p class="p-form-validation__message">
90 {{ form.preferred_email.errors|first }}79 <strong>Error: </strong>{{ form.preferred_email.errors|first }}
91 </span>80 </p>
92 {% endif %}81 {% endif %}
93 {{ form.preferred_email }}82 {{ form.preferred_email }}
94 {% else %}83 {% else %}
95 {# Manually added, it will be ignored by the django form #}84 {# Manually added, it will be ignored by the django form #}
96 <input type="text" value="{{ unverified_email|default_if_none:'' }}" disabled="true" />85 <input type="text" value="{{ unverified_email|default_if_none:'' }}" disabled="true" />
97 {% endif %}86 {% endif %}
9887 </div>
99 </div>88
10089 {% if not embedded %}
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>
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 %}
103 {% endif %}92 </div>
10493 </div>
105 {% if not readonly %}94
106 {% include "widgets/passwords.html" with edit_account_labels=1 fields=form %}95 {% if not readonly %}
107 {% endif %}96 <div class="p-strip is-shallow">
10897 <hr>
109 </fieldset>98 </div>
11099
111 {% if enable_device_prefs %}100 <div class="row">
112 <fieldset class="undecorated boxed device-prefs">101 <div class="col-8">
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 %}
114 <div class="{% if form.twofactor_required.errors %}haserrors {% endif %}twofactor-input input-row">103 </div>
115 {{ form.twofactor_required }}104 </div>
116 {% if form.twofactor_required.errors %}105 {% endif %}
117 <span class="error">{{ form.twofactor_required.errors|first }}</span>106
118 {% endif %}107 {% if enable_device_prefs %}
119 </div>108 <div class="p-strip is-shallow">
120 <div class="{% if form.warn_about_backup_device.errors %}haserrors {% endif %}backupdevice-warn-input input-row">109 <hr>
121 {{ form.warn_about_backup_device }}110 </div>
122 <label class="formLabel" for="id_warn_about_backup_device">111 <h4 class="legend" data-qa-id="authentication_devices">{% trans "Authentication devices" %}</h4>
123 {{ form.warn_about_backup_device.label }}112 <div class="p-form-validation{% if form.twofactor_required.errors %} is-errors{% endif %}">
124 </label>113 {{ form.twofactor_required }}
125 {% if form.warn_about_backup_device.errors %}114 {% if form.twofactor_required.errors %}
126 <span class="error">{{ form.warn_about_backup_device.errors|first }}</span>115 <p class="p-form-validation__message">
127 {% endif %}116 <strong>Error:</strong> {{ form.twofactor_required.errors|first }}
128 </div>117 </p>
129 </fieldset>118 {% endif %}
130 {% endif %}119 </div>
131120
132 <p class="actions">121 <div class="p-form-validation{% if form.warn_about_backup_device.errors %} is-error{% endif %}">
133 {% if not readonly %}122 {{ form.warn_about_backup_device }}
134 <button type="submit" class="btn cta" name="update" data-qa-id="update_preferences">123 <label class="formLabel" for="id_warn_about_backup_device">
135 <span>{% trans "Save changes" %}</span>124 {{ form.warn_about_backup_device.label }}
136 </button>125 </label>
137 {% endif %}126 {% if form.warn_about_backup_device.errors %}
138 {% if token %}127 <p class="p-form-validation__message">
139 {% trans "or" %}128 <strong>Error:</strong> {{ form.warn_about_backup_device.errors|first }}
140 <a id="exit" href="{% if require_username %}{% url 'server-decide' token %}?continue{% else %}.{% endif %}">{% trans "exit without updating" %}</a>129 </p>
141 {% endif %}130 {% endif %}
142 </p>131 </div>
143</form>132 {% endif %}
144133
145<p><a href="/+delete" data-qa-id="delete_account_link">{% trans "Permanently delete account" %}</a></p>134 <div class="p-strip is-shallow">
146135 <hr>
147{% include "widgets/last_auth_sites.html" %}136 </div>
137
138 {% if not readonly %}
139 <button type="submit" class="p-button--positive" name="update" data-qa-id="update_preferences">
140 <span>{% trans "Save changes" %}</span>
141 </button>
142 {% endif %}
143 {% if token %}
144 {% trans "or" %}
145 <p><a id="exit" href="{% if require_username %}{% url 'server-decide' token %}?continue{% else %}.{% endif %}">{% trans "exit without updating" %}</a></p>
146 {% endif %}
147 </form>
148
149 <p><a href="/+delete" data-qa-id="delete_account_link">{% trans "Permanently delete account" %}</a></p>
150
151 {% include "widgets/last_auth_sites.html" %}
152 </section>
148153
149{% endblock %}154{% endblock %}
150155
151{% block extra_js %}156{% block extra_js %}
152157 {% include "registration/_password_meter.html" with pwd_selector="#id_password" pwd_confirm_selector="#id_passwordconfirm" %}
153{% include "registration/_password_meter.html" with pwd_selector="#id_password" pwd_confirm_selector="#id_passwordconfirm" %}
154
155<script type="text/javascript">
156
157 YUI({
158 groups: {
159
160 u1: {
161 base: '{% static "identityprovider/js/u1/build/" %}',
162 combine: {{ combine|lower }},
163 root: 'identityprovider/js/u1/build/',
164 modules: {
165 'one-widget-tooltip': {
166 type: 'js',
167 path: 'one-widget-tooltip/one-widget-tooltip-min.js'
168 }
169 }
170 }
171 }
172 }).use('one-widget-tooltip', function(Y) {
173
174 tt = new Y.U1.Widget.Tooltip({
175 triggerNodes:".tooltip",
176 delegate: ".tooltip",
177 shim:false,
178 hideDelay: 1500,
179 autoHideDelay: 100000,
180 zIndex:100,
181 compass: 'east',
182 content: '<p class="tooltip-title">{% trans "Preferred email address" %}</p>' +
183 '<p>{% blocktrans %}This email address is passed on to other sites when requested as part of the login process.{% endblocktrans %}</p>' +
184 '<p>{{ form.preferred_email.help_text|escapejs }}</p>',
185 escapeHTML: false
186 });
187
188 // lighter version
189 tt.get('srcNode').addClass('tooltip-light');
190
191 // users should be able to enter tooltip to click links
192 tt.on('mouseover', function () {
193 this._clearTimers();
194 }, tt);
195 tt.on('mouseleave', function () {
196 this.hide();
197 }, tt);
198
199 tt.render();
200
201
202 });
203
204</script>
205
206
207{% endblock %}158{% endblock %}
208159
=== modified file 'src/webui/templates/registration/email_sent.html'
--- src/webui/templates/registration/email_sent.html 2019-08-05 13:47:39 +0000
+++ src/webui/templates/registration/email_sent.html 2019-08-12 13:50:47 +0000
@@ -16,6 +16,8 @@
16 <h1>{{ email_heading }}</h1>16 <h1>{{ email_heading }}</h1>
17{% endblock %}17{% endblock %}
1818
19{% block content_class %}{% endblock %}
20
19{% block content %}21{% block content %}
20<section class="p-strip">22<section class="p-strip">
21 <div class="row">23 <div class="row">
2224
=== modified file 'src/webui/templates/registration/forgot_password.html'
--- src/webui/templates/registration/forgot_password.html 2019-07-30 13:29:30 +0000
+++ src/webui/templates/registration/forgot_password.html 2019-08-12 13:50:47 +0000
@@ -16,6 +16,8 @@
1616
17{% block content_id %}auth{% endblock %}17{% block content_id %}auth{% endblock %}
1818
19{% block content_class %}{% endblock %}
20
19{% block content %}21{% block content %}
20<section class="p-strip">22<section class="p-strip">
21 <div class="row">23 <div class="row">
2224
=== modified file 'src/webui/templates/registration/login.html'
--- src/webui/templates/registration/login.html 2019-07-26 13:31:34 +0000
+++ src/webui/templates/registration/login.html 2019-08-12 13:50:47 +0000
@@ -39,6 +39,8 @@
39 {% endif %}39 {% endif %}
40{% endblock %}40{% endblock %}
4141
42{% block content_class %}{% endblock %}
43
42{% block content %}44{% block content %}
4345
44<section class="p-strip">46<section class="p-strip">
4547
=== modified file 'src/webui/templates/registration/logout.html'
--- src/webui/templates/registration/logout.html 2019-07-22 09:32:22 +0000
+++ src/webui/templates/registration/logout.html 2019-08-12 13:50:47 +0000
@@ -14,6 +14,8 @@
14 <h1>{% trans "You have been logged out" %}</h1>14 <h1>{% trans "You have been logged out" %}</h1>
15{% endblock %}15{% endblock %}
1616
17{% block content_class %}{% endblock %}
18
17{% block content %}19{% block content %}
18 <section class="p-strip">20 <section class="p-strip">
19 <div class="row">21 <div class="row">
2022
=== modified file 'src/webui/templates/registration/new_account.html'
--- src/webui/templates/registration/new_account.html 2019-07-26 13:31:34 +0000
+++ src/webui/templates/registration/new_account.html 2019-08-12 13:50:47 +0000
@@ -27,6 +27,8 @@
2727
28{% block content_id %}auth{% endblock %}28{% block content_id %}auth{% endblock %}
2929
30{% block content_class %}{% endblock %}
31
30{% block content %}32{% block content %}
3133
32<section class="p-strip">34<section class="p-strip">
3335
=== modified file 'src/webui/templates/registration/reset_password.html'
--- src/webui/templates/registration/reset_password.html 2019-08-05 13:47:39 +0000
+++ src/webui/templates/registration/reset_password.html 2019-08-12 13:50:47 +0000
@@ -16,6 +16,8 @@
1616
17{% block content_id %}auth{% endblock %}17{% block content_id %}auth{% endblock %}
1818
19{% block content_class %}{% endblock %}
20
19{% block content %}21{% block content %}
20<section class="p-strip">22<section class="p-strip">
21 <div class="row">23 <div class="row">
2224
=== modified file 'src/webui/templates/static/faq.html'
--- src/webui/templates/static/faq.html 2019-08-05 13:29:33 +0000
+++ src/webui/templates/static/faq.html 2019-08-12 13:50:47 +0000
@@ -18,6 +18,7 @@
18<h1 class="main">{% trans "Frequently asked questions" %}</h1>18<h1 class="main">{% trans "Frequently asked questions" %}</h1>
19{% endblock %}19{% endblock %}
2020
21{% block content_class %}{% endblock %}
21{% block content %}22{% block content %}
22{% url 'account-index' as home_url %}23{% url 'account-index' as home_url %}
23{% url 'account-emails' as emails_url %}24{% url 'account-emails' as emails_url %}
2425
=== modified file 'src/webui/templates/vanilla/_footer.html'
--- src/webui/templates/vanilla/_footer.html 2019-07-22 09:32:22 +0000
+++ src/webui/templates/vanilla/_footer.html 2019-08-12 13:50:47 +0000
@@ -5,7 +5,7 @@
5GNU Affero General Public License version 3 (see the file LICENSE).5GNU Affero General Public License version 3 (see the file LICENSE).
6{% endcomment %}6{% endcomment %}
77
8<footer class="p-strip" data-qa-id="ubuntuone_footer">8<footer class="p-strip u-no-padding--top" data-qa-id="ubuntuone_footer">
9 <hr>9 <hr>
10 <div class="row">10 <div class="row">
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>
1212
=== modified file 'src/webui/templates/vanilla/base.html'
--- src/webui/templates/vanilla/base.html 2019-07-26 13:31:34 +0000
+++ src/webui/templates/vanilla/base.html 2019-08-12 13:50:47 +0000
@@ -1,6 +1,5 @@
1{% load i18n static_url combo staticfiles %}1{% load i18n static_url combo staticfiles %}
2<!DOCTYPE html>2<!DOCTYPE html>
3
4<!--[if IE 7 ]><html class="ie7" lang="en" dir="ltr"><![endif]-->3<!--[if IE 7 ]><html class="ie7" lang="en" dir="ltr"><![endif]-->
5<!--[if IE 8 ]><html class="ie8" lang="en" dir="ltr"><![endif]-->4<!--[if IE 8 ]><html class="ie8" lang="en" dir="ltr"><![endif]-->
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]-->
@@ -42,13 +41,6 @@
4241
43 <div id="cont" role="main">42 <div id="cont" role="main">
44 {% include "vanilla/_header.html" %}43 {% include "vanilla/_header.html" %}
45
46 {% block menu %}
47 {% if user.is_authenticated %}
48 {% include "widgets/personal-menu.html" %}
49 {% endif %}
50 {% endblock %}
51
52 <div id="content">44 <div id="content">
53 <section class="p-strip--dark p-cip-hero">45 <section class="p-strip--dark p-cip-hero">
54 <div class="row">46 <div class="row">
@@ -86,8 +78,17 @@
86 {% endif %}78 {% endif %}
87 {% endblock %}79 {% endblock %}
8880
89 <div id="{% block content_id %}box{% endblock %}">81 <div id="{% block content_id %}box{% endblock %}" class="row">
90 {% block content %}{% endblock %}82 {% block menu %}
83 {% if user.is_authenticated %}
84 <div class="col-4 p-sidebar">
85 {% include "vanilla/widgets/personal-menu.html" %}
86 </div>
87 {% endif %}
88 {% endblock %}
89 <div class="{% block content_class %}col-8{% endblock %}">
90 {% block content %}{% endblock %}
91 </div>
91 </div>92 </div>
9293
93 </div><!-- close #content -->94 </div><!-- close #content -->
9495
=== added directory 'src/webui/templates/vanilla/common'
=== added file 'src/webui/templates/vanilla/common/missing_backup_device_warning.html'
--- src/webui/templates/vanilla/common/missing_backup_device_warning.html 1970-01-01 00:00:00 +0000
+++ src/webui/templates/vanilla/common/missing_backup_device_warning.html 2019-08-12 13:50:47 +0000
@@ -0,0 +1,19 @@
1{% load i18n %}
2
3{% if need_backup_device_warning %}
4{% url 'device-addition' as add_device %}
5<div id="missing_backup_device" class="p-notification--caution">
6 <p class="p-notification__response">
7 <span class="p-notification__status">{% blocktrans %}Warning:{% endblocktrans %}</span>
8 {% blocktrans %}We strongly recommend having two authentication devices,
9 a <strong>primary</strong> device and a <strong>secondary</strong>
10 or backup device.
11 <br><br>
12 Having two authentication devices means you can continue to access your
13 account with your secondary device should your primary device be lost or
14 stolen.
15 <br><br>
16 Click to <a href="{{ add_device }}">add a backup device</a>.{% endblocktrans %}
17 </p>
18</div>
19{% endif %}
020
=== added file 'src/webui/templates/vanilla/common/printed_codes_nearly_exhausted_warning.html'
--- src/webui/templates/vanilla/common/printed_codes_nearly_exhausted_warning.html 1970-01-01 00:00:00 +0000
+++ src/webui/templates/vanilla/common/printed_codes_nearly_exhausted_warning.html 2019-08-12 13:50:47 +0000
@@ -0,0 +1,15 @@
1{% load i18n url_with_token %}
2
3{% if paper_devices_needing_renewal %}
4<div id="exhausted_warning" class="p-notification--caution">
5 <p class="p-notification__response">
6 <span class="p-notification__status">{% blocktrans %}Warning:{% endblocktrans %}</span>
7 {% blocktrans %}Your printed list of backup codes is nearly used up.
8 Please print a new list for the following devices.{% endblocktrans %}
9 <br><br>
10 {% for device in paper_devices_needing_renewal %}
11 {{ device.name }} <a href="{% url_with_token 'device-print' device_id=device.id %}" class="btn-sm"><span>{% trans 'Generate New Codes' %}</span></a>
12 {% endfor %}
13 </p>
14</div>
15{% endif %}
016
=== added file 'src/webui/templates/vanilla/common/unverified_email_warning.html'
--- src/webui/templates/vanilla/common/unverified_email_warning.html 1970-01-01 00:00:00 +0000
+++ src/webui/templates/vanilla/common/unverified_email_warning.html 2019-08-12 13:50:47 +0000
@@ -0,0 +1,14 @@
1{% load i18n url_with_token %}
2
3{% if need_verify_email_warning %}
4{% url_with_token 'verify_email' email_address=unverified_email.email as verify_url %}
5<div class="p-notification--caution">
6 <p class="p-notification__response">
7 <span class="p-notification__status">{% blocktrans %}Warning:{% endblocktrans %}</span>
8 {% blocktrans %}
9 You have not verified your email address {{ unverified_email }}.
10 Click to <a href="{{ verify_url }}">verify your email address</a>.
11 {% endblocktrans %}
12 </p>
13</div>
14{% endif %}
015
=== added file 'src/webui/templates/vanilla/widgets/passwords.html'
--- src/webui/templates/vanilla/widgets/passwords.html 1970-01-01 00:00:00 +0000
+++ src/webui/templates/vanilla/widgets/passwords.html 2019-08-12 13:50:47 +0000
@@ -0,0 +1,40 @@
1{% load i18n %}
2{% if fields.oldpassword %}
3<p>{% trans "To edit any details on this page, you must confirm your current password." %}</p>
4
5{% if edit_account_labels %}
6<div class="p-form-validation{% if fields.oldpassword.errors or fields.non_field_errors %} is-error{% endif %}">
7 <label for="id_oldpassword">{% trans "Current password" %}</label>
8 {{ fields.oldpassword }}
9 {% if fields.oldpassword.errors %}
10 <p class="p-form-validation__message">
11 <strong>Error:</strong> {{ fields.oldpassword.errors|first }}
12 </p>
13 {% endif %}
14</div>
15{% endif %}
16{% endif %}
17
18{% if edit_account_labels %}
19<div class="p-form-validation{% if fields.password.errors or fields.non_field_errors %} is-error{% endif %}">
20 <label for="id_password">{% trans "Choose password" %}</label>
21 {{ fields.password }}
22 {% if fields.password.errors %}
23 <p class="p-form-validation__message">
24 <strong>Error:</strong> {{ fields.password.errors|first }}
25 </p>
26 {% endif %}
27</div>
28{% endif %}
29
30{% if edit_account_labels %}
31<div class="p-form-validation{% if fields.passwordconfirm.errors or fields.non_field_errors %} is-error{% endif %}">
32 <label for="id_passwordconfirm">{% trans "Re-type password" %}</label>
33 {{ fields.passwordconfirm }}
34 {% if fields.passwordconfirm.errors %}
35 <p class="p-form-validation__message">
36 <strong>Error:</strong> {{ fields.passwordconfirm.errors|first }}
37 </p>
38 {% endif %}
39</div>
40{% endif %}
041
=== added file 'src/webui/templates/vanilla/widgets/personal-menu.html'
--- src/webui/templates/vanilla/widgets/personal-menu.html 1970-01-01 00:00:00 +0000
+++ src/webui/templates/vanilla/widgets/personal-menu.html 2019-08-12 13:50:47 +0000
@@ -0,0 +1,50 @@
1{% comment %}
2Copyright 2010-2019 Canonical Ltd. This software is licensed under
3the GNU Affero General Public License version 3 (see the file
4LICENSE).
5{% endcomment %}
6
7{% load gargoyle_tags %}
8{% load i18n %}
9{% load menu_item %}
10{% load url_with_token %}
11<div class="p-strip">
12 <ul class="p-list">
13 {% url_with_token 'account-index' as account_url %}
14
15 {% if current_section == 'account' %}
16 {% menu_item "account2" _("Personal details") account_url None "p-list__item is-active" %}
17 {% else %}
18 {% menu_item "account2" _("Personal details") account_url None "p-list__item" %}
19 {% endif %}
20
21 {% if not token and not readonly %}
22 {% ifswitch TWOFACTOR %}
23 {% url 'device-list' as device_url %}
24 {% if current_section == 'devices' %}
25 {% menu_item "devices" _("Authentication devices") device_url None "p-list__item is-active" %}
26 {% else %}
27 {% menu_item "devices" _("Authentication devices") device_url None "p-list__item" %}
28 {% endif %}
29 {% endifswitch %}
30 {% url 'applications' as applications_url %}
31 {% if current_section == 'applications' %}
32 {% menu_item "applications" _("Applications") applications_url None "p-list__item is-active" %}
33 {% else %}
34 {% menu_item "applications" _("Applications") applications_url None "p-list__item" %}
35 {% endif %}
36 {% ifswitch SSH_KEY_INTEGRATION %}
37 {% url 'ssh_keys' as ssh_url %}
38 {% menu_item "ssh_keys" _("SSH keys") ssh_url None "p-list__item" %}
39 {% endifswitch %}
40 {% url 'auth_log' as auth_log_url %}
41 {% if current_section == 'auth_log' %}
42 {% menu_item "auth_log" _("Account activity") auth_log_url None "p-list__item is-active" %}
43 {% menu_item "auth_log" _("Account activity") auth_log_url None "p-list__item is-active" %}
44 {% else %}
45 {% menu_item "auth_log" _("Account activity") auth_log_url None "p-list__item" %}
46 {% endif %}
47 {% endif %}
48
49 </ul>
50</div>

Subscribers

People subscribed via source and target branches

to all changes: