diff options
author | plegall <plg@piwigo.org> | 2013-12-20 14:02:23 +0000 |
---|---|---|
committer | plegall <plg@piwigo.org> | 2013-12-20 14:02:23 +0000 |
commit | c108fdd6b4624d6a138fff1a2a80799da4c1011c (patch) | |
tree | 5d8f467df32ac02766eb5c8449661e514f9013da | |
parent | e1c6ac237982d63ce8744d8aca64b3bab9df781c (diff) |
feature 1668, user manager redesign: do not let the administrator try to
modify the status of protected users (pwg.users.setInfo will deactivate
status change for these users anyway)
git-svn-id: http://piwigo.org/svn/trunk@26052 68402e56-0260-453c-a942-63ccdbb3a9ee
Diffstat (limited to '')
-rw-r--r-- | admin/themes/default/template/user_list.tpl | 30 |
1 files changed, 21 insertions, 9 deletions
diff --git a/admin/themes/default/template/user_list.tpl b/admin/themes/default/template/user_list.tpl index 56d53bc5f..2ef8e32ce 100644 --- a/admin/themes/default/template/user_list.tpl +++ b/admin/themes/default/template/user_list.tpl @@ -232,15 +232,27 @@ jQuery(document).ready(function() { userDetails += '</div>'; userDetails += '<div class="userProperty"><strong>{/literal}{'Status'|translate}{literal}</strong>'; - userDetails += '<br><select name="status">'; - jQuery("#action select[name=status] option").each(function() { - var selected = ''; - if (user.status == jQuery(this).val()) { - selected = ' selected="selected"'; - } - userDetails += '<option value="'+jQuery(this).val()+'"'+selected+'>'+jQuery(this).html()+'</option>'; - }); - userDetails += '</select></div>'; + userDetails += '<br>'; + + if (protectedUsers.indexOf(parseInt(userId)) == -1) { + userDetails += '<select name="status">'; + jQuery("#action select[name=status] option").each(function() { + var selected = ''; + if (user.status == jQuery(this).val()) { + selected = ' selected="selected"'; + } + userDetails += '<option value="'+jQuery(this).val()+'"'+selected+'>'+jQuery(this).html()+'</option>'; + }); + userDetails += '</select>'; + } + else { + jQuery("#action select[name=status] option").each(function() { + if (user.status == jQuery(this).val()) { + userDetails += jQuery(this).html(); + } + }); + } + userDetails += '</div>'; userDetails += '<div class="userProperty"><strong>{/literal}{'Privacy level'|translate}{literal}</strong>'; userDetails += '<br><select name="level">'; |