diff --git a/src/IDF/Form/Admin/UserUpdate.php b/src/IDF/Form/Admin/UserUpdate.php index 458d721..6af03f2 100644 --- a/src/IDF/Form/Admin/UserUpdate.php +++ b/src/IDF/Form/Admin/UserUpdate.php @@ -93,6 +93,16 @@ class IDF_Form_Admin_UserUpdate extends Pluf_Form ), )); + if ($extra['request']->user->administrator) { + $this->fields['staff'] = new Pluf_Form_Field_Boolean( + array('required' => false, + 'label' => __('Staff'), + 'initial' => $this->user->staff, + 'widget' => 'Pluf_Form_Widget_CheckboxInput', + 'help_text' => __('If you give staff rights to a user, you really need to trust him.'), + )); + } + $attrs = ($extra['request']->user->id == $this->user->id) ? array('readonly' => 'readonly') : array(); $this->fields['active'] = new Pluf_Form_Field_Boolean( diff --git a/src/IDF/templates/idf/gadmin/users/update.html b/src/IDF/templates/idf/gadmin/users/update.html index 50af31f..2c431e2 100644 --- a/src/IDF/templates/idf/gadmin/users/update.html +++ b/src/IDF/templates/idf/gadmin/users/update.html @@ -51,7 +51,14 @@
{blocktrans}If you are changing the email address of the user, you need to ensure that you are providing a valid email address{/blocktrans}
+{if $user.administrator} +{blocktrans}If you give the user staff rights, the user will be +able to create new projects and update other non staff users. +{/blocktrans}
{/if} {/block}