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:
plegall
2013-12-20 14:02:23 +00:00
parent e1c6ac2379
commit c108fdd6b4
+21 -9
View File
@@ -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">';