Merge ~deadlight/maas:user-prefs into ~deadlight/maas:vanilla
- Git
- lp:~deadlight/maas
- user-prefs
- Merge into vanilla
Proposed by
Karl Williams
Status: | Merged |
---|---|
Merge reported by: | Karl Williams |
Merged at revision: | 7cacef53e8d8cd97c05ce5ee7bd3f6ea261ff507 |
Proposed branch: | ~deadlight/maas:user-prefs |
Merge into: | ~deadlight/maas:vanilla |
Diff against target: |
512 lines (+211/-175) 8 files modified
src/maasserver/static/js/prefs.js (+15/-17) src/maasserver/static/partials/ssh-keys.html (+65/-88) src/maasserver/static/scss/_maas.scss (+1/-1) src/maasserver/static/scss/_patterns_table-expanding.scss (+21/-0) src/maasserver/static/scss/build.scss (+2/-0) src/maasserver/templates/maasserver/prefs.html (+76/-48) src/maasserver/templates/maasserver/prefs_add_sslkey.html (+18/-12) src/maasserver/templates/maasserver/prefs_confirm_delete_sslkey.html (+13/-9) |
Related bugs: |
Reviewer | Review Type | Date Requested | Status |
---|---|---|---|
Anthony Dillon (community) | Approve | ||
Review via email: mp+335822@code.launchpad.net |
Commit message
Description of the change
- Updated the user prefs page
- Standardised differences in similar template fragments
- Made minor changes to the page's JS to fit the new styling
-
To post a comment you must log in.
~deadlight/maas:user-prefs
updated
- 7f40f8d... by deadlight <email address hidden>
-
Update SSL deletion confirmation page and restructured SSH key dropdown as a list
~deadlight/maas:user-prefs
updated
- 8ae78d3... by deadlight <email address hidden>
-
Update SSH key tooltips and style with grid
Revision history for this message
Karl Williams (deadlight) wrote : | # |
Ant: ready for re-review
Revision history for this message
Anthony Dillon (ya-bo-ng) wrote : | # |
Small button replacements.
review:
Needs Fixing
~deadlight/maas:user-prefs
updated
- 7cacef5... by deadlight <email address hidden>
-
Update save buttons
Preview Diff
[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1 | diff --git a/src/maasserver/static/js/prefs.js b/src/maasserver/static/js/prefs.js |
2 | index 082db27..9816655 100644 |
3 | --- a/src/maasserver/static/js/prefs.js |
4 | +++ b/src/maasserver/static/js/prefs.js |
5 | @@ -27,7 +27,7 @@ TokenWidget.ATTRS = { |
6 | nb_tokens: { |
7 | readOnly: true, |
8 | getter: function() { |
9 | - return this.get('srcNode').all('.bundle').size(); |
10 | + return this.get('srcNode').all('.js-bundle').size(); |
11 | } |
12 | } |
13 | }; |
14 | @@ -42,8 +42,7 @@ Y.extend(TokenWidget, Y.Widget, { |
15 | this.create_link = Y.Node.create('<a />') |
16 | .set('href', '#') |
17 | .set('id','create_token') |
18 | - .addClass('button--secondary') |
19 | - .addClass('button--inline') |
20 | + .addClass('p-button--neutral') |
21 | .addClass('u-float--right') |
22 | .set('text', "Generate MAAS key"); |
23 | this.status_node = Y.Node.create('<div />') |
24 | @@ -63,7 +62,7 @@ Y.extend(TokenWidget, Y.Widget, { |
25 | |
26 | bindDeleteRow: function(row) { |
27 | var self = this; |
28 | - var delete_link = row.one('a.delete-link'); |
29 | + var delete_link = row.one('a.js-delete-link'); |
30 | delete_link.on('click', function(e) { |
31 | e.preventDefault(); |
32 | if (self.confirm("Are you sure you want to delete this key?")) { |
33 | @@ -78,7 +77,7 @@ Y.extend(TokenWidget, Y.Widget, { |
34 | e.preventDefault(); |
35 | self.requestKeys(); |
36 | }); |
37 | - Y.each(this.get('srcNode').all('.bundle'), function(row) { |
38 | + Y.each(this.get('srcNode').all('.js-bundle'), function(row) { |
39 | self.bindDeleteRow(row); |
40 | }); |
41 | }, |
42 | @@ -150,18 +149,17 @@ Y.extend(TokenWidget, Y.Widget, { |
43 | addToken: function(token, token_key) { |
44 | var list = this.get('srcNode').one('ul'); |
45 | var row = Y.Node.create('<li />') |
46 | - .addClass('bundle') |
47 | - .append(Y.Node.create('<a />') |
48 | - .set('href', '#') |
49 | - .addClass('delete-link') |
50 | - .addClass('right') |
51 | - .addClass('icon') |
52 | - .addClass('icon--delete')) |
53 | - .append(Y.Node.create('<input />') |
54 | - .set('type', 'text') |
55 | - .addClass('disabled') |
56 | - .set('id', token_key) |
57 | - .set('value', token)); |
58 | + .addClass('js-bundle') |
59 | + .addClass('u-equal-height') |
60 | + .append(Y.Node.create('<div />') |
61 | + .addClass('col-8') |
62 | + .addClass('p-code-snippet') |
63 | + .append(Y.Node.create('<input />') |
64 | + .set('type', 'text') |
65 | + .addClass('p-code-snippet__input') |
66 | + .set('id', token_key) |
67 | + .set('value', token))) |
68 | + .append(Y.Node.create('<div class="col-1 u-vertically-center"><a class="p-tooltip p-tooltip--top-center js-delete-link"><i class="p-icon--delete"></i><span class="p-tooltip__message" role="tooltip">Delete API key</span></a></div>')) |
69 | list.append(row); |
70 | this.bindDeleteRow(row); |
71 | }, |
72 | diff --git a/src/maasserver/static/partials/ssh-keys.html b/src/maasserver/static/partials/ssh-keys.html |
73 | index 771a1cd..0ddeb6c 100644 |
74 | --- a/src/maasserver/static/partials/ssh-keys.html |
75 | +++ b/src/maasserver/static/partials/ssh-keys.html |
76 | @@ -1,94 +1,71 @@ |
77 | -<div class="table"> |
78 | - <header class="table__head"> |
79 | - <div class="table__row"> |
80 | - <div class="table__header table-col--25">Source</div> |
81 | - <div class="table__header table-col--35">ID</div> |
82 | - <div class="table__header table-col--30">Number of keys</div> |
83 | - <div class="table__header table-col--10"></div> |
84 | - </div> |
85 | - </header> |
86 | - <div class="table__body"> |
87 | - <div class="table__row" data-ng-repeat="group in groupedKeys | orderBy:['source', 'authId']" |
88 | - data-ng-class="{ 'is-active': group.id === openRow }"> |
89 | - <div class="table__data table-col--25" aria-label="Source">{$ sourceTitles[group.source] $}</div> |
90 | - <div data-ng-if="group.source !== 'upload'"> |
91 | - <div class="table__data table-col--35" aria-label="ID">{$ group.authId $}</div> |
92 | - <div class="table__data table-col--30" aria-label="Number of keys">{$ group.keys.length $} |
93 | - <button class="icon icon--open tooltip u-margin--top-tiny u-padding--left-large" aria-label="Open" |
94 | - data-ng-click="open(group, 'view')" |
95 | - data-ng-if="group.source !== 'upload' && openRow !== group.id">Open</button> |
96 | - <button class="icon icon--close tooltip u-margin--top-tiny u-padding--left-large" aria-label="Close" |
97 | - data-ng-click="close()" |
98 | - data-ng-if="group.source !== 'upload' && openRow === group.id">Close</button> |
99 | - </div> |
100 | +<div class="row"> |
101 | + <div class="col-12"> |
102 | + <table class="p-table-expanding"> |
103 | + <thead> |
104 | + <tr> |
105 | + <th class="col-4">Source</th> |
106 | + <th class="col-4">ID</th> |
107 | + <th class="col-3">Number of keys</th> |
108 | + <td class="col-1"> </td> |
109 | + </tr> |
110 | + </thead> |
111 | + <tbody> |
112 | + <tr data-ng-repeat="group in groupedKeys | orderBy:['source', 'authId']" data-ng-class="{ 'is-active': group.id === openRow }"> |
113 | + <td aria-label="Source" class="col-4">{$ sourceTitles[group.source] $}</td> |
114 | + <td data-ng-if="group.source === 'upload'" data-ng-bind-html="trustAsHtml(group.keys[0].display)" colspan="2" class="col-7"> </td> |
115 | + <td data-ng-if="group.source !== 'upload'" aria-label="ID" class="col-4">{$ group.authId $}</td> |
116 | + <td data-ng-if="group.source !== 'upload'" aria-label="Number of keys" class="col-3"> |
117 | + {$ group.keys.length $} |
118 | + <a class="p-tooltip p-tooltip--top-right" data-ng-click="open(group, 'view')" aria-label="View keys" data-ng-if="group.source !== 'upload' && (openRow !== group.id || rowMode === 'delete')"><i class="p-icon--plus"></i><span class="p-tooltip__message" role="tooltip">View keys</span></a> |
119 | + |
120 | + <a class="p-tooltip p-tooltip--top-right" data-ng-click="close()" aria-label="Hide keys" data-ng-if="group.source !== 'upload' && openRow === group.id && rowMode === 'view'"><i class="p-icon--minus"></i><span class="p-tooltip__message" role="tooltip">Hide keys</span></a> |
121 | + </td> |
122 | + <td class="u-align--right" class="col-1"> |
123 | + <a class="p-tooltip p-tooltip--top-right js-delete-link" data-ng-click="open(group, 'delete')"><i class="p-icon--delete"></i><span class="p-tooltip__message" role="tooltip">Delete SSH key</span></a> |
124 | + </td> |
125 | + <td class="p-table-expanding__panel col-12 u-no-margin--left" data-ng-class="{ 'u-hide': group.id !== openRow || rowMode !== 'view' }"> |
126 | + <ul class="p-list"> |
127 | + <li data-ng-repeat="key in group.keys" data-ng-bind-html="trustAsHtml(key.display)"></li> |
128 | + </ul> |
129 | + </td> |
130 | + <td class="p-table-expanding__panel col-12 u-no-margin--left" data-ng-class="{ 'u-hide': group.id !== openRow || rowMode !== 'delete' }"> |
131 | + <div class="col-8"> |
132 | + <span data-ng-if="group.source !== 'upload'"><span class="p-icon p-icon--warning"></span> Are you sure you want to remove this key source?</span> |
133 | + <span data-ng-if="group.source === 'upload'"><span class="p-icon p-icon--warning"></span> Are you sure you want to remove this key?</span> |
134 | + </div> |
135 | + <div class="col-4 u-align--right"> |
136 | + <button class="p-button--base" data-ng-click="close()">Cancel</button> |
137 | + <button class="p-button--negative" data-ng-click="confirmDelete(group)">Remove</button> |
138 | + </div> |
139 | + </td> |
140 | + </tr> |
141 | + </tbody> |
142 | + </table> |
143 | + </div> |
144 | +</div> |
145 | +<div class="row"> |
146 | + <div class="col-10"> |
147 | + <form class="p-form p-form--inline"> |
148 | + <div class="p-form__group"> |
149 | + <label class="p-form__label" for="source">Source</label> |
150 | + <select class="p-form__control" id="source" data-ng-model="add.source" data-ng-disabled="add.saving"> |
151 | + <option value="lp">Launchpad</option> |
152 | + <option value="gh">Github</option> |
153 | + <option value="upload">Upload</option> |
154 | + </select> |
155 | </div> |
156 | - <div data-ng-if="group.source === 'upload'"> |
157 | - <div class="table__data table-col--65" data-ng-bind-html="trustAsHtml(group.keys[0].display)"></div> |
158 | + <div class="p-form__group" data-ng-if="add.source !== 'upload'"> |
159 | + <label class="p-form__label" for="authId">ID</label> |
160 | + <input type="text" id="authId" name="authId" placeholder="User ID" data-ng-model="add.authId" data-ng-disabled="add.saving" class="p-form__control"> |
161 | </div> |
162 | - <div class="table__data table-col--10 u-align--right"> |
163 | - <button class="icon icon--delete tooltip" aria-label="Delete" |
164 | - data-ng-click="open(group, 'delete')">Delete</button> |
165 | + <div class="p-form__group" data-ng-if="add.source === 'upload'"> |
166 | + <label class="p-form__label" for="key">Public key</label> |
167 | + <textarea id="key" name="key" placeholder="Begins with 'ssh-rsa', 'ssh-dss', 'ssh-ed25519', 'ecdsa-sha2-nistp256', 'ecdsa-sha2-nistp384', or 'ecdsa-sha2-nistp521'" data-ng-model="add.key" data-ng-disabled="add.saving" class="p-form__control"></textarea> |
168 | </div> |
169 | - <div class="table__dropdown"> |
170 | - <div class="table__row u-border--none" |
171 | - data-ng-class="{ 'is-active': rowMode === 'view' }"> |
172 | - <div class="u-margin--bottom u-border u-border--solid u-padding--small"> |
173 | - <p data-ng-repeat="key in group.keys" data-ng-bind-html="trustAsHtml(key.display)"></p> |
174 | - </div> |
175 | - </div> |
176 | - <div class="table__row" |
177 | - data-ng-class="{ 'is-active': rowMode === 'delete' }"> |
178 | - <div class="table__data u-float--left u-margin--top-tiny" data-ng-if="group.source !== 'upload'"> |
179 | - <p><span class="icon icon--warning u-margin--right-small"></span>Are you sure you want to remove this key source?</p> |
180 | - </div> |
181 | - <div class="table__data u-float--left u-margin--top-tiny" data-ng-if="group.source === 'upload'"> |
182 | - <p><span class="icon icon--warning u-margin--right-small"></span>Are you sure you want to remove this key?</p> |
183 | - </div> |
184 | - <div class="table__data u-float--right"> |
185 | - <button class="button--base button--inline" data-ng-click="close()">Cancel</button> |
186 | - <button class="button--destructive button--inline" data-ng-click="confirmDelete(group)">Remove</button> |
187 | - </div> |
188 | - </div> |
189 | + <div class="p-form__group"> |
190 | + <button type="submit" class="p-button--positive" data-ng-disabled="!canImportKeys()" data-ng-click="importKeys()">Import</button> |
191 | </div> |
192 | - </div> |
193 | - <div class="table__dropdown-row is-active"> |
194 | - <form class="form form--inline"> |
195 | - <div class="table__data table-col u-float--left"> |
196 | - <div class="form__group"> |
197 | - <label class="form__group-label" for="source">Source</label> |
198 | - <div class="form__group-input"> |
199 | - <select id="source" data-ng-model="add.source" data-ng-disabled="add.saving"> |
200 | - <option value="lp">Launchpad</option> |
201 | - <option value="gh">Github</option> |
202 | - <option value="upload">Upload</option> |
203 | - </select> |
204 | - </div> |
205 | - </div> |
206 | - <div class="form__group" data-ng-if="add.source !== 'upload'"> |
207 | - <label class="form__group-label" for="authId">ID</label> |
208 | - <div class="form__group-input"> |
209 | - <input type="text" id="authId" name="authId" placeholder="User ID" |
210 | - data-ng-model="add.authId" data-ng-disabled="add.saving"> |
211 | - </div> |
212 | - </div> |
213 | - <div class="form__group" data-ng-if="add.source === 'upload'"> |
214 | - <label class="form__group-label" for="key">Public key</label> |
215 | - <div class="form__group-input"> |
216 | - <textarea id="key" name="key" style="width: 300px;" placeholder="Begins with 'ssh-rsa', 'ssh-dss', 'ssh-ed25519', 'ecdsa-sha2-nistp256', 'ecdsa-sha2-nistp384', or 'ecdsa-sha2-nistp521'" |
217 | - data-ng-model="add.key" data-ng-disabled="add.saving" |
218 | - style="min-height: 100px;"></textarea> |
219 | - </div> |
220 | - </div> |
221 | - <ul class="form__error errors" data-ng-if="add.error"> |
222 | - <li class="form__error-item">{$ add.error $}</li> |
223 | - </ul> |
224 | - </div> |
225 | - <div class="table__data u-float--right"> |
226 | - <button type="submit" class="button--secondary button--inline" |
227 | - data-ng-disabled="!canImportKeys()" |
228 | - data-ng-click="importKeys()">Import</button> |
229 | - </div> |
230 | - </form> |
231 | - </div> |
232 | + <p data-ng-if="add.error" class="p-form-validation__message"><strong>Error:</strong> {$ add.error $}</p> |
233 | + </form> |
234 | </div> |
235 | </div> |
236 | diff --git a/src/maasserver/static/scss/_maas.scss b/src/maasserver/static/scss/_maas.scss |
237 | index b4b27ba..d5407bf 100644 |
238 | --- a/src/maasserver/static/scss/_maas.scss |
239 | +++ b/src/maasserver/static/scss/_maas.scss |
240 | @@ -37,7 +37,7 @@ |
241 | |
242 | // XXX Can be remove when this Vanilla issue is resolved |
243 | // https://github.com/vanilla-framework/vanilla-framework/issues/1505 |
244 | - [class^="p-icon--"], |
245 | + [class^="p-icon--"], |
246 | [class*=" p-icon--"] { |
247 | overflow: hidden; |
248 | } |
249 | diff --git a/src/maasserver/static/scss/_patterns_table-expanding.scss b/src/maasserver/static/scss/_patterns_table-expanding.scss |
250 | new file mode 100644 |
251 | index 0000000..a460e17 |
252 | --- /dev/null |
253 | +++ b/src/maasserver/static/scss/_patterns_table-expanding.scss |
254 | @@ -0,0 +1,21 @@ |
255 | +@mixin maas-table-expanding { |
256 | + .p-table-expanding { |
257 | + &__panel { |
258 | + position: relative; |
259 | + top: -1px; |
260 | + background-color: $color-x-light; |
261 | + } |
262 | + |
263 | + td { |
264 | + display: table-cell; |
265 | + |
266 | + &[colspan='2'] { |
267 | + flex: 2; |
268 | + } |
269 | + } |
270 | + |
271 | + tr.is-active { |
272 | + background-color: $color-x-light; |
273 | + } |
274 | + } |
275 | +} |
276 | diff --git a/src/maasserver/static/scss/build.scss b/src/maasserver/static/scss/build.scss |
277 | index 0430a3a..dcb04ab 100644 |
278 | --- a/src/maasserver/static/scss/build.scss |
279 | +++ b/src/maasserver/static/scss/build.scss |
280 | @@ -13,6 +13,7 @@ |
281 | @import 'patterns_page-header'; |
282 | @import 'patterns_tabs'; |
283 | @import 'patterns_onoffswitch'; |
284 | +@import 'patterns_table-expanding'; |
285 | |
286 | // Include local patterns |
287 | @include maas; |
288 | @@ -22,3 +23,4 @@ |
289 | @include maas-page-header; |
290 | @include maas-tabs; |
291 | @include maas-onoffswitch; |
292 | +@include maas-table-expanding; |
293 | diff --git a/src/maasserver/templates/maasserver/prefs.html b/src/maasserver/templates/maasserver/prefs.html |
294 | index 14d1830..bca9da4 100644 |
295 | --- a/src/maasserver/templates/maasserver/prefs.html |
296 | +++ b/src/maasserver/templates/maasserver/prefs.html |
297 | @@ -20,68 +20,96 @@ |
298 | |
299 | {% block content %} |
300 | <div id="prefs" class="accounts"> |
301 | - <div id="keys" class="eight-col"> |
302 | - <h2>Keys</h2> |
303 | - <section class="eight-col"> |
304 | - <h3>MAAS keys</h3> |
305 | - <div id="api" class="api eight-col"> |
306 | - <p>You'll need a separate API key for each Juju environment.</p> |
307 | - <ul class="no-bullets"> |
308 | - {% for token in user.userprofile.get_authorisation_tokens %} |
309 | - <li class="bundle"> |
310 | - <a href="#" class="delete-link icon icon--delete right"></a> |
311 | - <input type="text" value="{{ token.consumer.key }}:{{ token.key }}:{{ token.secret }}" id="{{ token.key }}" class="disabled" /> |
312 | - </li> |
313 | - {% endfor %} |
314 | - </ul> |
315 | - <p id="token_creation_placeholder" /> |
316 | + <section id="keys"> |
317 | + <div class="p-strip is-bordered"> |
318 | + <div class="row"> |
319 | + <div class="col-8"> |
320 | + <h2>Keys</h2> |
321 | + </div> |
322 | + </div> |
323 | + <div class="row"> |
324 | + <div class="col-9"> |
325 | + <h3>MAAS keys</h3> |
326 | + <div id="api"> |
327 | + <p>You'll need a separate API key for each Juju environment.</p> |
328 | + <ul class="p-list"> |
329 | + {% for token in user.userprofile.get_authorisation_tokens %} |
330 | + <li class="u-equal-height js-bundle"> |
331 | + <div class="col-8 p-code-snippet"> |
332 | + <input type="text" value="{{ token.consumer.key }}:{{ token.key }}:{{ token.secret }}" id="{{ token.key }}" class="p-code-snippet__input" /> |
333 | + </div> |
334 | + <div class="col-1 u-vertically-center"> |
335 | + <a class="p-tooltip p-tooltip--top-center js-delete-link"><i class="p-icon--delete"></i><span class="p-tooltip__message" role="tooltip">Delete API key</span></a> |
336 | + </div> |
337 | + </li> |
338 | + {% endfor %} |
339 | + </ul> |
340 | + <div id="token_creation_placeholder"></div> |
341 | + </div> |
342 | + </div> |
343 | + </div> |
344 | + </div> |
345 | + <div class="p-strip is-bordered"> |
346 | + <div class="row"> |
347 | + <div id="ssh-keys" class="col-8" data-ng-controller="PreferencesController"> |
348 | + <h3>SSH keys</h3> |
349 | + <span class="u-text--loading" data-ng-if="loading"><i class="p-icon--spinner"></i> Loading...</span> |
350 | + </div> |
351 | </div> |
352 | - </section> |
353 | - <section id="ssh-keys" class="ssh-keys eight-col u-border--bottom" data-ng-controller="PreferencesController"> |
354 | - <h3>SSH keys</h3> |
355 | - <span class="u-text--loading" data-ng-if="loading"><i class="p-icon--spinner u-animation--spin"></i> Loading...</span> |
356 | <maas-ssh-keys data-ng-if="!loading"></maas-ssh-keys> |
357 | - </section> |
358 | - <section id="ssl-keys" class="eight-col u-border--bottom"> |
359 | - <h3>SSL keys</h3> |
360 | - <div class="eight-col"> |
361 | - <ul class="no-bullets"> |
362 | - {% for key in user.sslkey_set.all %} |
363 | - <li> |
364 | - <a href="{% url 'prefs-delete-sslkey' key.id %}" class="icon right"> |
365 | - <img title="Delete SSL key" class="left" src="{{ STATIC_URL }}img/delete.png" /> |
366 | - </a> |
367 | - {{ key.display_html }} |
368 | - </li> |
369 | - {% empty %} No SSL key configured. {% endfor %} |
370 | - </ul> |
371 | - <a href="{% url 'prefs-add-sslkey' %}" id="add_ssl_key" class="button--secondary button--inline u-float--right">Add SSL key</a> |
372 | + </div> |
373 | + <div class="p-strip is-bordered"> |
374 | + <div class="row"> |
375 | + <div class="col-9" id="ssl-keys"> |
376 | + <h3>SSL keys</h3> |
377 | + <ul class="p-list"> |
378 | + {% for key in user.sslkey_set.all %} |
379 | + <li class="u-equal-height js-bundle row"> |
380 | + <div class="col-8 p-code-snippet"> |
381 | + <input type="text" value="{{ key.display_html }}" class="p-code-snippet__input" /> |
382 | + </div> |
383 | + <div class="col-1 u-vertically-center"> |
384 | + <a class="p-tooltip p-tooltip--top-center js-delete-link" href="{% url 'prefs-delete-sslkey' key.id %}"><i class="p-icon--delete"></i><span class="p-tooltip__message" role="tooltip">Delete SSL key</span></a> |
385 | + </div> |
386 | + </li> |
387 | + {% empty %} No SSL key configured. {% endfor %} |
388 | + </ul> |
389 | + <div> |
390 | + <a href="{% url 'prefs-add-sslkey' %}" id="add_ssl_key" class="p-button--neutral u-float--right">Add SSL key</a> |
391 | + </div> |
392 | + </div> |
393 | </div> |
394 | - </section> |
395 | - <section id="profile" class="eight-col u-border--bottom"> |
396 | - <h3>User details</h3> |
397 | - <div class="eight-col"> |
398 | + </div> |
399 | + </section> |
400 | + |
401 | + <section id="profile" class="p-strip is-bordered"> |
402 | + <div class="row"> |
403 | + <div class="col-8"> |
404 | + <h2>User details</h2> |
405 | <form method="post" action="{% url 'prefs' %}">{% csrf_token %} |
406 | - <ul> |
407 | + <ul class="p-list"> |
408 | {% for field in profile_form %} {% include "maasserver/form_field.html" %} {% endfor %} |
409 | </ul> |
410 | <input type="hidden" name="profile_submit" value="1" /> |
411 | - <button type="submit" class="button--positive button--inline u-float--right">Save details</button> |
412 | + <button type="submit" class="p-button--positive u-float--right">Save details</button> |
413 | </form> |
414 | </div> |
415 | - </section> |
416 | - <section id="password" class="eight-col"> |
417 | - <h3>Password</h3> |
418 | - <div class="eight-col"> |
419 | + </div> |
420 | + </section> |
421 | + |
422 | + <section id="password" class="p-strip"> |
423 | + <div class="row"> |
424 | + <div class="col-8"> |
425 | + <h2>Password</h2> |
426 | <form method="post" action="{% url 'prefs' %}">{% csrf_token %} |
427 | - <ul> |
428 | + <ul class="p-list"> |
429 | {% for field in password_form %} {% include "maasserver/form_field.html" %} {% endfor %} |
430 | </ul> |
431 | <input type="hidden" name="password_submit" value="1" /> |
432 | - <button type="submit" class="button--positive button--inline u-float--right">Save password</button> |
433 | + <button type="submit" class="p-button--positive u-float--right">Save password</button> |
434 | </form> |
435 | </div> |
436 | - </section> |
437 | - </div> |
438 | + </div> |
439 | + </section> |
440 | </div> |
441 | {% endblock %} |
442 | diff --git a/src/maasserver/templates/maasserver/prefs_add_sslkey.html b/src/maasserver/templates/maasserver/prefs_add_sslkey.html |
443 | index 84f17cd..fd754e4 100644 |
444 | --- a/src/maasserver/templates/maasserver/prefs_add_sslkey.html |
445 | +++ b/src/maasserver/templates/maasserver/prefs_add_sslkey.html |
446 | @@ -4,16 +4,22 @@ |
447 | {% block page-title %}Add SSL key{% endblock %} |
448 | |
449 | {% block content %} |
450 | -<div class="eight-col"> |
451 | - <form method="post"> |
452 | - {% csrf_token %} |
453 | - <ul> |
454 | - {% for field in form %} {% include "maasserver/form_field.html" %} {% endfor %} |
455 | - </ul> |
456 | - <div class=" u-float--right"> |
457 | - <button class="button--base button--inline" href="{% url 'prefs' %}">Cancel</button> |
458 | - <button type="submit" class="button--positive button--inline">Add key</button> |
459 | - </div> |
460 | - </form> |
461 | -</div> |
462 | +<section class="p-strip"> |
463 | + <div class="row"> |
464 | + <div class="col-8"> |
465 | + <form method="post" class="p-form"> |
466 | + {% csrf_token %} |
467 | + <ul class="p-form__group p-list"> |
468 | + {% for field in form %} |
469 | + {% include "maasserver/form_field.html" %} |
470 | + {% endfor %} |
471 | + </ul> |
472 | + <div class="p-form__group u-float--right"> |
473 | + <button class="p-button--base" href="{% url 'prefs' %}">Cancel</button> |
474 | + <button type="submit" class="p-button--positive">Add key</button> |
475 | + </div> |
476 | + </form> |
477 | + </div> |
478 | + </div> |
479 | +</section> |
480 | {% endblock %} |
481 | diff --git a/src/maasserver/templates/maasserver/prefs_confirm_delete_sslkey.html b/src/maasserver/templates/maasserver/prefs_confirm_delete_sslkey.html |
482 | index 55ee2d0..a8cbb2e 100644 |
483 | --- a/src/maasserver/templates/maasserver/prefs_confirm_delete_sslkey.html |
484 | +++ b/src/maasserver/templates/maasserver/prefs_confirm_delete_sslkey.html |
485 | @@ -4,14 +4,18 @@ |
486 | {% block page-title %}Delete SSL key{% endblock %} |
487 | |
488 | {% block content %} |
489 | -<div class="block auto-width"> |
490 | - <h2>Are you sure you want to delete the following key?<br /></h2> |
491 | - <p style="word-wrap: break-word; width: 700px;">{{ sslkey }}</p> |
492 | - <p>This action is permanent and can not be undone.</p> |
493 | - <form method="post">{% csrf_token %} |
494 | - <input type="hidden" name="post" value="yes" /> |
495 | - <input type="submit" value="Delete key" class="right" /> |
496 | - <a href="{% url 'prefs' %}">Cancel</a> |
497 | - </form> |
498 | +<div class="p-strip"> |
499 | + <div class="row"> |
500 | + <div class="col-8"> |
501 | + <h2>Are you sure you want to delete the following key?<br /></h2> |
502 | + <p><code>{{ sslkey }}</code></p> |
503 | + <p>This action is permanent and can not be undone.</p> |
504 | + <form method="post">{% csrf_token %} |
505 | + <input type="hidden" name="post" value="yes" /> |
506 | + <a href="{% url 'prefs' %}" class="p-button--neutral">Cancel</a> |
507 | + <input type="submit" value="Delete key" class="p-button--negative" /> |
508 | + </form> |
509 | + </div> |
510 | + </div> |
511 | </div> |
512 | {% endblock %} |
Few comments in the code.