Show More
@@ -1,78 +1,78 b'' | |||
|
1 | 1 | <div class="panel panel-default"> |
|
2 | 2 | <div class="panel-heading"> |
|
3 | 3 | <h3 class="panel-title">${_('Custom IP Whitelist')}</h3> |
|
4 | 4 | </div> |
|
5 | 5 | <div class="panel-body"> |
|
6 | 6 | <div class="ips_wrap"> |
|
7 | 7 | <h5>${_('Current IP address')}: <code>${c.rhodecode_user.ip_addr}</code></h5> |
|
8 | 8 | <table class="rctable ip-whitelist"> |
|
9 | 9 | <tr> |
|
10 | 10 | <th>${_('IP Address')}</th> |
|
11 | 11 | <th>${_('IP Range')}</th> |
|
12 | 12 | <th>${_('Description')}</th> |
|
13 | 13 | <th></th> |
|
14 | 14 | </tr> |
|
15 | 15 | %if c.default_user_ip_map and c.inherit_default_ips: |
|
16 | 16 | %for ip in c.default_user_ip_map: |
|
17 | 17 | <tr> |
|
18 | 18 | <td class="td-ip"><div class="ip">${ip.ip_addr}</div></td> |
|
19 | 19 | <td class="td-iprange"><div class="ip">${h.ip_range(ip.ip_addr)}</div></td> |
|
20 | 20 | <td class="td-description">${h.literal(_('Inherited from %s') % h.link_to('*default*',h.route_path('admin_permissions_ips')))}</td> |
|
21 | 21 | <td></td> |
|
22 | 22 | </tr> |
|
23 | 23 | %endfor |
|
24 | 24 | %endif |
|
25 | 25 | |
|
26 | 26 | %if c.user_ip_map: |
|
27 | 27 | %for ip in c.user_ip_map: |
|
28 | 28 | <tr> |
|
29 | 29 | <td class="td-ip"><div class="ip">${ip.ip_addr}</div></td> |
|
30 | 30 | <td class="td-iprange"><div class="ip">${h.ip_range(ip.ip_addr)}</div></td> |
|
31 | 31 | <td class="td-description"><div class="ip">${ip.description}</div></td> |
|
32 | 32 | <td class="td-action"> |
|
33 | 33 | ${h.secure_form(h.route_path('edit_user_ips_delete', user_id=c.user.user_id), request=request)} |
|
34 | 34 | ${h.hidden('del_ip_id', ip.ip_id)} |
|
35 | 35 | ${h.submit('remove_', _('Delete'),id="remove_ip_%s" % ip.ip_id, |
|
36 | 36 | class_="btn btn-link btn-danger", onclick="return confirm('"+_('Confirm to delete this ip: %s') % ip.ip_addr+"');")} |
|
37 | 37 | ${h.end_form()} |
|
38 | 38 | </td> |
|
39 | 39 | </tr> |
|
40 | 40 | %endfor |
|
41 | 41 | %endif |
|
42 | 42 | %if not c.default_user_ip_map and not c.user_ip_map: |
|
43 | 43 | <tr> |
|
44 | 44 | <td><h2 class="ip">${_('All IP addresses are allowed')}</h2></td> |
|
45 | 45 | <td></td> |
|
46 | 46 | <td></td> |
|
47 | 47 | <td></td> |
|
48 | 48 | </tr> |
|
49 | 49 | %endif |
|
50 | 50 | </table> |
|
51 | 51 | </div> |
|
52 | 52 | |
|
53 | 53 | <div> |
|
54 | 54 | ${h.secure_form(h.route_path('edit_user_ips_add', user_id=c.user.user_id), request=request)} |
|
55 | 55 | <div class="form"> |
|
56 | 56 | <!-- fields --> |
|
57 | 57 | <div class="fields"> |
|
58 | 58 | <div class="field"> |
|
59 | 59 | <div class="label"> |
|
60 | 60 | <label for="new_ip">${_('New IP Address')}:</label> |
|
61 | 61 | </div> |
|
62 | 62 | <div class="input"> |
|
63 | 63 | ${h.text('new_ip')} ${h.text('description', placeholder=_('Description...'))} |
|
64 |
<span class="help-block">${_('Enter comma separated list of ip addresses like 1 |
|
|
65 |
' |
|
|
66 | 'To specify multiple address range use 127.0.0.1-127.0.0.10 syntax')}</span> | |
|
64 | <span class="help-block pre-formatting">${_('Enter comma separated list of ip addresses like 10.0.0.1,10.0.0.2.\n' | |
|
65 | 'Use a ip address with a mask 127.0.0.1/24, to create a network match pattern.\n' | |
|
66 | 'To specify multiple entries on an address range use 127.0.0.1-127.0.0.10 syntax')}</span> | |
|
67 | 67 | </div> |
|
68 | 68 | </div> |
|
69 | 69 | <div class="buttons"> |
|
70 | 70 | ${h.submit('save',_('Add'),class_="btn btn-small")} |
|
71 | 71 | ${h.reset('reset',_('Reset'),class_="btn btn-small")} |
|
72 | 72 | </div> |
|
73 | 73 | </div> |
|
74 | 74 | </div> |
|
75 | 75 | ${h.end_form()} |
|
76 | 76 | </div> |
|
77 | 77 | </div> |
|
78 | 78 | </div> |
General Comments 0
You need to be logged in to leave comments.
Login now