mirror of
https://github.com/Piwigo/Piwigo.git
synced 2026-08-07 17:23:04 +02:00
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
This commit is contained in:
@@ -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">';
|
||||
|
||||
Reference in New Issue
Block a user