Show More
The requested changes are too big and content was truncated. Show full diff
|
1 | NO CONTENT: modified file | |
The requested commit or file is too big and content was truncated. Show full diff |
@@ -1,102 +1,106 b'' | |||
|
1 | 1 | <div class="panel panel-default"> |
|
2 | 2 | <div class="panel-heading"> |
|
3 | 3 | <h3 class="panel-title">${_('Authentication Tokens')}</h3> |
|
4 | 4 | </div> |
|
5 | 5 | <div class="panel-body"> |
|
6 | 6 | <p> |
|
7 | 7 | ${_('Built-in tokens can be used to authenticate with all possible options.')}<br/> |
|
8 | 8 | ${_('Each token can have a role. VCS tokens can be used together with the authtoken auth plugin for git/hg/svn operations.')} |
|
9 | 9 | </p> |
|
10 | 10 | <table class="rctable auth_tokens"> |
|
11 | 11 | <tr> |
|
12 | 12 | <td class="truncate-wrap td-authtoken"><div class="user_auth_tokens truncate autoexpand"><code>${c.user.api_key}</code></div></td> |
|
13 |
<td class="td- |
|
|
14 |
<span class=" |
|
|
13 | <td class="td-tags"> | |
|
14 | <span class="tag disabled">${_('Built-in')}</span> | |
|
15 | 15 | </td> |
|
16 |
<td class="td- |
|
|
17 | <span class="btn btn-mini btn-info disabled">all</span> | |
|
16 | <td class="td-tags"> | |
|
17 | % for token in c.user.builtin_token_roles: | |
|
18 | <span class="tag disabled"> | |
|
19 | ${token} | |
|
20 | </span> | |
|
21 | % endfor | |
|
18 | 22 | </td> |
|
19 | 23 | <td class="td-exp">${_('expires')}: ${_('never')}</td> |
|
20 | 24 | <td class="td-action"> |
|
21 | 25 | ${h.secure_form(url('my_account_auth_tokens'),method='delete')} |
|
22 | 26 | ${h.hidden('del_auth_token',c.user.api_key)} |
|
23 | 27 | ${h.hidden('del_auth_token_builtin',1)} |
|
24 | 28 | <button class="btn-link btn-danger" type="submit" |
|
25 | 29 | onclick="return confirm('${_('Confirm to reset this auth token: %s') % c.user.api_key}');"> |
|
26 | 30 | <i class="icon-refresh"></i> |
|
27 | 31 | ${_('Reset')} |
|
28 | 32 | </button> |
|
29 | 33 | ${h.end_form()} |
|
30 | 34 | </td> |
|
31 | 35 | </tr> |
|
32 | 36 | %if c.user_auth_tokens: |
|
33 | 37 | %for auth_token in c.user_auth_tokens: |
|
34 | 38 | <tr class="${'expired' if auth_token.expired else ''}"> |
|
35 | 39 | <td class="truncate-wrap td-authtoken"><div class="user_auth_tokens truncate autoexpand"><code>${auth_token.api_key}</code></div></td> |
|
36 | 40 | <td class="td-wrap">${auth_token.description}</td> |
|
37 |
<td class="td- |
|
|
38 |
<span class=" |
|
|
41 | <td class="td-tags"> | |
|
42 | <span class="tag disabled">${auth_token.role_humanized}</span> | |
|
39 | 43 | </td> |
|
40 | 44 | <td class="td-exp"> |
|
41 | 45 | %if auth_token.expires == -1: |
|
42 | 46 | ${_('expires')}: ${_('never')} |
|
43 | 47 | %else: |
|
44 | 48 | %if auth_token.expired: |
|
45 | 49 | ${_('expired')}: ${h.age_component(h.time_to_utcdatetime(auth_token.expires))} |
|
46 | 50 | %else: |
|
47 | 51 | ${_('expires')}: ${h.age_component(h.time_to_utcdatetime(auth_token.expires))} |
|
48 | 52 | %endif |
|
49 | 53 | %endif |
|
50 | 54 | </td> |
|
51 | 55 | <td class="td-action"> |
|
52 | 56 | ${h.secure_form(url('my_account_auth_tokens'),method='delete')} |
|
53 | 57 | ${h.hidden('del_auth_token',auth_token.api_key)} |
|
54 | 58 | <button class="btn btn-link btn-danger" type="submit" |
|
55 | 59 | onclick="return confirm('${_('Confirm to remove this auth token: %s') % auth_token.api_key}');"> |
|
56 | 60 | ${_('Delete')} |
|
57 | 61 | </button> |
|
58 | 62 | ${h.end_form()} |
|
59 | 63 | </td> |
|
60 | 64 | </tr> |
|
61 | 65 | %endfor |
|
62 | 66 | %else: |
|
63 | 67 | <tr><td><div class="ip">${_('No additional auth token specified')}</div></td></tr> |
|
64 | 68 | %endif |
|
65 | 69 | </table> |
|
66 | 70 | |
|
67 | 71 | <div class="user_auth_tokens"> |
|
68 | 72 | ${h.secure_form(url('my_account_auth_tokens'), method='post')} |
|
69 | 73 | <div class="form form-vertical"> |
|
70 | 74 | <!-- fields --> |
|
71 | 75 | <div class="fields"> |
|
72 | 76 | <div class="field"> |
|
73 | 77 | <div class="label"> |
|
74 | 78 | <label for="new_email">${_('New authentication token')}:</label> |
|
75 | 79 | </div> |
|
76 | 80 | <div class="input"> |
|
77 | 81 | ${h.text('description', placeholder=_('Description'))} |
|
78 | 82 | ${h.select('lifetime', '', c.lifetime_options)} |
|
79 | 83 | ${h.select('role', '', c.role_options)} |
|
80 | 84 | </div> |
|
81 | 85 | </div> |
|
82 | 86 | <div class="buttons"> |
|
83 | 87 | ${h.submit('save',_('Add'),class_="btn")} |
|
84 | 88 | ${h.reset('reset',_('Reset'),class_="btn")} |
|
85 | 89 | </div> |
|
86 | 90 | </div> |
|
87 | 91 | </div> |
|
88 | 92 | ${h.end_form()} |
|
89 | 93 | </div> |
|
90 | 94 | </div> |
|
91 | 95 | </div> |
|
92 | 96 | <script> |
|
93 | 97 | $(document).ready(function(){ |
|
94 | 98 | var select2Options = { |
|
95 | 99 | 'containerCssClass': "drop-menu", |
|
96 | 100 | 'dropdownCssClass': "drop-menu-dropdown", |
|
97 | 101 | 'dropdownAutoWidth': true |
|
98 | 102 | }; |
|
99 | 103 | $("#lifetime").select2(select2Options); |
|
100 | 104 | $("#role").select2(select2Options); |
|
101 | 105 | }); |
|
102 | 106 | </script> |
@@ -1,103 +1,107 b'' | |||
|
1 | 1 | <div class="panel panel-default"> |
|
2 | 2 | <div class="panel-heading"> |
|
3 | 3 | <h3 class="panel-title">${_('Authentication Access Tokens')}</h3> |
|
4 | 4 | </div> |
|
5 | 5 | <div class="panel-body"> |
|
6 | 6 | <div class="apikeys_wrap"> |
|
7 | 7 | <table class="rctable auth_tokens"> |
|
8 | 8 | <tr> |
|
9 | 9 | <td class="truncate-wrap td-authtoken"><div class="user_auth_tokens truncate autoexpand"><code>${c.user.api_key}</code></div></td> |
|
10 | 10 | <td class="td-tags"> |
|
11 | 11 | <span class="tag disabled">${_('Built-in')}</span> |
|
12 | 12 | </td> |
|
13 | 13 | <td class="td-tags"> |
|
14 | <span class="tag disabled">all</span> | |
|
14 | % for token in c.user.builtin_token_roles: | |
|
15 | <span class="tag disabled"> | |
|
16 | ${token} | |
|
17 | </span> | |
|
18 | % endfor | |
|
15 | 19 | </td> |
|
16 | 20 | <td class="td-exp">${_('expires')}: ${_('never')}</td> |
|
17 | 21 | <td class="td-action"> |
|
18 | 22 | ${h.secure_form(url('edit_user_auth_tokens', user_id=c.user.user_id),method='delete')} |
|
19 | 23 | ${h.hidden('del_auth_token',c.user.api_key)} |
|
20 | 24 | ${h.hidden('del_auth_token_builtin',1)} |
|
21 | 25 | <button class="btn btn-link btn-danger" type="submit" |
|
22 | 26 | onclick="return confirm('${_('Confirm to reset this auth token: %s') % c.user.api_key}');"> |
|
23 | 27 | ${_('Reset')} |
|
24 | 28 | </button> |
|
25 | 29 | ${h.end_form()} |
|
26 | 30 | </td> |
|
27 | 31 | </tr> |
|
28 | 32 | %if c.user_auth_tokens: |
|
29 | 33 | %for auth_token in c.user_auth_tokens: |
|
30 | 34 | <tr class="${'expired' if auth_token.expired else ''}"> |
|
31 | 35 | <td class="truncate-wrap td-authtoken"><div class="user_auth_tokens truncate autoexpand"><code>${auth_token.api_key}</code></div></td> |
|
32 | 36 | <td class="td-wrap">${auth_token.description}</td> |
|
33 | 37 | <td class="td-tags"> |
|
34 | 38 | <span class="tag">${auth_token.role_humanized}</span> |
|
35 | 39 | </td> |
|
36 | 40 | <td class="td-exp"> |
|
37 | 41 | %if auth_token.expires == -1: |
|
38 | 42 | ${_('expires')}: ${_('never')} |
|
39 | 43 | %else: |
|
40 | 44 | %if auth_token.expired: |
|
41 | 45 | ${_('expired')}: ${h.age_component(h.time_to_utcdatetime(auth_token.expires))} |
|
42 | 46 | %else: |
|
43 | 47 | ${_('expires')}: ${h.age_component(h.time_to_utcdatetime(auth_token.expires))} |
|
44 | 48 | %endif |
|
45 | 49 | %endif |
|
46 | 50 | </td> |
|
47 | 51 | <td> |
|
48 | 52 | ${h.secure_form(url('edit_user_auth_tokens', user_id=c.user.user_id),method='delete')} |
|
49 | 53 | ${h.hidden('del_auth_token',auth_token.api_key)} |
|
50 | 54 | <button class="btn btn-link btn-danger" type="submit" |
|
51 | 55 | onclick="return confirm('${_('Confirm to remove this auth token: %s') % auth_token.api_key}');"> |
|
52 | 56 | ${_('Delete')} |
|
53 | 57 | </button> |
|
54 | 58 | ${h.end_form()} |
|
55 | 59 | </td> |
|
56 | 60 | </tr> |
|
57 | 61 | %endfor |
|
58 | 62 | %else: |
|
59 | 63 | <tr><td><div class="ip">${_('No additional auth tokens specified')}</div></td></tr> |
|
60 | 64 | %endif |
|
61 | 65 | </table> |
|
62 | 66 | </div> |
|
63 | 67 | |
|
64 | 68 | <div class="user_auth_tokens"> |
|
65 | 69 | ${h.secure_form(url('edit_user_auth_tokens', user_id=c.user.user_id), method='put')} |
|
66 | 70 | <div class="form form-vertical"> |
|
67 | 71 | <!-- fields --> |
|
68 | 72 | <div class="fields"> |
|
69 | 73 | <div class="field"> |
|
70 | 74 | <div class="label"> |
|
71 | 75 | <label for="new_email">${_('New auth token')}:</label> |
|
72 | 76 | </div> |
|
73 | 77 | <div class="input"> |
|
74 | 78 | ${h.text('description', class_='medium', placeholder=_('Description'))} |
|
75 | 79 | ${h.select('lifetime', '', c.lifetime_options)} |
|
76 | 80 | ${h.select('role', '', c.role_options)} |
|
77 | 81 | </div> |
|
78 | 82 | </div> |
|
79 | 83 | <div class="buttons"> |
|
80 | 84 | ${h.submit('save',_('Add'),class_="btn btn-small")} |
|
81 | 85 | ${h.reset('reset',_('Reset'),class_="btn btn-small")} |
|
82 | 86 | </div> |
|
83 | 87 | </div> |
|
84 | 88 | </div> |
|
85 | 89 | ${h.end_form()} |
|
86 | 90 | </div> |
|
87 | 91 | </div> |
|
88 | 92 | </div> |
|
89 | 93 | |
|
90 | 94 | <script> |
|
91 | 95 | $(document).ready(function(){ |
|
92 | 96 | $("#lifetime").select2({ |
|
93 | 97 | 'containerCssClass': "drop-menu", |
|
94 | 98 | 'dropdownCssClass': "drop-menu-dropdown", |
|
95 | 99 | 'dropdownAutoWidth': true |
|
96 | 100 | }); |
|
97 | 101 | $("#role").select2({ |
|
98 | 102 | 'containerCssClass': "drop-menu", |
|
99 | 103 | 'dropdownCssClass': "drop-menu-dropdown", |
|
100 | 104 | 'dropdownAutoWidth': true |
|
101 | 105 | }); |
|
102 | 106 | }) |
|
103 | 107 | </script> |
General Comments 0
You need to be logged in to leave comments.
Login now