diff options
Diffstat (limited to 'app/views/admin/users/_form.html.haml')
-rw-r--r-- | app/views/admin/users/_form.html.haml | 30 |
1 files changed, 18 insertions, 12 deletions
diff --git a/app/views/admin/users/_form.html.haml b/app/views/admin/users/_form.html.haml index 9bde50f8947..fdf37965091 100644 --- a/app/views/admin/users/_form.html.haml +++ b/app/views/admin/users/_form.html.haml @@ -24,19 +24,25 @@ = f.text_field :email, required: true, autocomplete: "off" %span.help-inline * required - %fieldset - %legend Password - .clearfix - = f.label :password - .input= f.password_field :password, disabled: f.object.force_random_password - .clearfix - = f.label :password_confirmation - .input= f.password_field :password_confirmation, disabled: f.object.force_random_password - -if f.object.new_record? + - if @admin_user.new_record? + %fieldset + %legend Password + .clearfix + = f.label :password + .input + %strong + A temporary password will be generated and sent to user. + %br + User will be forced to change it after first sign in + - else + %fieldset + %legend Password + .clearfix + = f.label :password + .input= f.password_field :password, disabled: f.object.force_random_password .clearfix - = f.label :force_random_password do - %span Generate random password - .input= f.check_box :force_random_password, {}, true, nil + = f.label :password_confirmation + .input= f.password_field :password_confirmation, disabled: f.object.force_random_password %fieldset %legend Access |