Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
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
  • Loading branch information
plegall committed Dec 20, 2013
1 parent e1c6ac2 commit c108fdd
Showing 1 changed file with 21 additions and 9 deletions.
30 changes: 21 additions & 9 deletions admin/themes/default/template/user_list.tpl
Expand Up @@ -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">';
Expand Down

0 comments on commit c108fdd

Please sign in to comment.