##// END OF EJS Templates
UX: require confirmation of revoking permissions on...
marcink -
r4064:afe7c5e6 default
parent child Browse files
Show More
@@ -29,7 +29,7 b''
29 </td>
29 </td>
30 <td>
30 <td>
31 %if r2p.user.username !='default':
31 %if r2p.user.username !='default':
32 <span class="delete_icon action_button" onclick="ajaxActionRevoke(${r2p.user.user_id}, 'user', '${'id%s'%id(r2p.user.username)}')">
32 <span class="delete_icon action_button" onclick="ajaxActionRevoke(${r2p.user.user_id}, 'user', '${'id%s'%id(r2p.user.username)}', '${r2p.user.username}')">
33 ${_('revoke')}
33 ${_('revoke')}
34 </span>
34 </span>
35 %endif
35 %endif
@@ -54,7 +54,7 b''
54 %endif
54 %endif
55 </td>
55 </td>
56 <td>
56 <td>
57 <span class="delete_icon action_button" onclick="ajaxActionRevoke(${g2p.users_group.users_group_id}, 'user_group', '${'id%s'%id(g2p.users_group.users_group_name)}')">
57 <span class="delete_icon action_button" onclick="ajaxActionRevoke(${g2p.users_group.users_group_id}, 'user_group', '${'id%s'%id(g2p.users_group.users_group_name)}', '${g2p.users_group.users_group_name}')">
58 ${_('revoke')}
58 ${_('revoke')}
59 </span>
59 </span>
60 </td>
60 </td>
@@ -86,9 +86,12 b''
86 </tr>
86 </tr>
87 </table>
87 </table>
88 <script type="text/javascript">
88 <script type="text/javascript">
89 function ajaxActionRevoke(obj_id, obj_type, field_id) {
89 function ajaxActionRevoke(obj_id, obj_type, field_id, obj_name) {
90 url = "${h.url('delete_repo_perm_member',repo_name=c.repo_name)}";
90 url = "${h.url('delete_repo_perm_member',repo_name=c.repo_name)}";
91 ajaxActionRevokePermission(url, obj_id, obj_type, field_id);
91 var revoke_msg = _TM['Confirm to revoke permission for {0}: {1} ?'].format(obj_type.replace('_', ' '), obj_name);
92 if (confirm(revoke_msg)){
93 ajaxActionRevokePermission(url, obj_id, obj_type, field_id);
94 }
92 };
95 };
93
96
94 YUE.onDOMReady(function () {
97 YUE.onDOMReady(function () {
@@ -21,7 +21,7 b''
21 </td>
21 </td>
22 <td>
22 <td>
23 %if r2p.user.username !='default':
23 %if r2p.user.username !='default':
24 <span class="delete_icon action_button" onclick="ajaxActionRevoke(${r2p.user.user_id}, 'user', '${'id%s'%id(r2p.user.username)}')">
24 <span class="delete_icon action_button" onclick="ajaxActionRevoke(${r2p.user.user_id}, 'user', '${'id%s'%id(r2p.user.username)}', '${r2p.user.username}')">
25 ${_('revoke')}
25 ${_('revoke')}
26 </span>
26 </span>
27 %endif
27 %endif
@@ -51,7 +51,7 b''
51 <img class="perm-gravatar" src="${h.url('/images/icons/group.png')}"/>${g2p.users_group.users_group_name}
51 <img class="perm-gravatar" src="${h.url('/images/icons/group.png')}"/>${g2p.users_group.users_group_name}
52 </td>
52 </td>
53 <td>
53 <td>
54 <span class="delete_icon action_button" onclick="ajaxActionRevoke(${g2p.users_group.users_group_id}, 'user_group', '${'id%s'%id(g2p.users_group.users_group_name)}')">
54 <span class="delete_icon action_button" onclick="ajaxActionRevoke(${g2p.users_group.users_group_id}, 'user_group', '${'id%s'%id(g2p.users_group.users_group_name)}', '${g2p.users_group.users_group_name}')">
55 ${_('revoke')}
55 ${_('revoke')}
56 </span>
56 </span>
57 </td>
57 </td>
@@ -90,9 +90,12 b''
90 </tr>
90 </tr>
91 </table>
91 </table>
92 <script type="text/javascript">
92 <script type="text/javascript">
93 function ajaxActionRevoke(obj_id, obj_type, field_id) {
93 function ajaxActionRevoke(obj_id, obj_type, field_id, obj_name) {
94 url = "${h.url('delete_repo_group_perm_member', group_name=c.repos_group.group_name)}";
94 url = "${h.url('delete_repo_group_perm_member', group_name=c.repos_group.group_name)}";
95 ajaxActionRevokePermission(url, obj_id, obj_type, field_id, {recursive:YUD.get('recursive').checked});
95 var revoke_msg = _TM['Confirm to revoke permission for {0}: {1} ?'].format(obj_type.replace('_', ' '), obj_name);
96 if (confirm(revoke_msg)){
97 ajaxActionRevokePermission(url, obj_id, obj_type, field_id, {recursive:YUD.get('recursive').checked});
98 }
96 };
99 };
97
100
98 YUE.onDOMReady(function () {
101 YUE.onDOMReady(function () {
@@ -21,7 +21,7 b''
21 </td>
21 </td>
22 <td>
22 <td>
23 %if r2p.user.username !='default':
23 %if r2p.user.username !='default':
24 <span class="delete_icon action_button" onclick="ajaxActionRevoke(${r2p.user.user_id}, 'user', '${'id%s'%id(r2p.user.username)}')">
24 <span class="delete_icon action_button" onclick="ajaxActionRevoke(${r2p.user.user_id}, 'user', '${'id%s'%id(r2p.user.username)}', '${r2p.user.username}')">
25 ${_('revoke')}
25 ${_('revoke')}
26 </span>
26 </span>
27 %endif
27 %endif
@@ -51,7 +51,7 b''
51 <img class="perm-gravatar" src="${h.url('/images/icons/group.png')}"/>${g2p.user_group.users_group_name}
51 <img class="perm-gravatar" src="${h.url('/images/icons/group.png')}"/>${g2p.user_group.users_group_name}
52 </td>
52 </td>
53 <td>
53 <td>
54 <span class="delete_icon action_button" onclick="ajaxActionRevoke(${g2p.user_group.users_group_id}, 'user_group', '${'id%s'%id(g2p.user_group.users_group_name)}')">
54 <span class="delete_icon action_button" onclick="ajaxActionRevoke(${g2p.user_group.users_group_id}, 'user_group', '${'id%s'%id(g2p.user_group.users_group_name)}', '${g2p.user_group.users_group_name}')">
55 ${_('revoke')}
55 ${_('revoke')}
56 </span>
56 </span>
57 </td>
57 </td>
@@ -84,9 +84,12 b''
84 </tr>
84 </tr>
85 </table>
85 </table>
86 <script type="text/javascript">
86 <script type="text/javascript">
87 function ajaxActionRevoke(obj_id, obj_type, field_id) {
87 function ajaxActionRevoke(obj_id, obj_type, field_id, obj_name) {
88 url = "${h.url('delete_user_group_perm_member', id=c.users_group.users_group_id)}";
88 url = "${h.url('delete_user_group_perm_member', id=c.users_group.users_group_id)}";
89 ajaxActionRevokePermission(url, obj_id, obj_type, field_id);
89 var revoke_msg = _TM['Confirm to revoke permission for {0}: {1} ?'].format(obj_type.replace('_', ' '), obj_name);
90 if (confirm(revoke_msg)){
91 ajaxActionRevokePermission(url, obj_id, obj_type, field_id);
92 }
90 };
93 };
91
94
92 YUE.onDOMReady(function () {
95 YUE.onDOMReady(function () {
@@ -57,7 +57,8 b''
57 'Selection link': "${_('Selection link')}",
57 'Selection link': "${_('Selection link')}",
58 'Collapse diff': "${_('Collapse diff')}",
58 'Collapse diff': "${_('Collapse diff')}",
59 'Expand diff': "${_('Expand diff')}",
59 'Expand diff': "${_('Expand diff')}",
60 'Failed to revoke permission': "${_('Failed to revoke permission')}"
60 'Failed to revoke permission': "${_('Failed to revoke permission')}",
61 'Confirm to revoke permission for {0}: {1} ?': "${_('confirm to revoke permission for {0}: {1} ?')}",
61 };
62 };
62 var _TM = TRANSLATION_MAP;
63 var _TM = TRANSLATION_MAP;
63
64
General Comments 0
You need to be logged in to leave comments. Login now