2011-10-08 21:36:38 +00:00
|
|
|
.user_new
|
2018-04-12 20:11:22 +00:00
|
|
|
= form_for [:admin, @user], html: { class: 'fieldset-form' } do |f|
|
2016-04-05 01:25:38 +00:00
|
|
|
= form_errors(@user)
|
2011-10-08 21:36:38 +00:00
|
|
|
|
2012-11-27 06:31:15 +00:00
|
|
|
%fieldset
|
|
|
|
%legend Account
|
2018-04-12 20:11:22 +00:00
|
|
|
.form-group.row
|
2019-02-03 14:29:34 +00:00
|
|
|
.col-sm-2.col-form-label
|
|
|
|
= f.label :name
|
2013-12-30 23:27:02 +00:00
|
|
|
.col-sm-10
|
2016-04-14 18:32:33 +00:00
|
|
|
= f.text_field :name, required: true, autocomplete: 'off', class: 'form-control'
|
2012-11-27 06:31:15 +00:00
|
|
|
%span.help-inline * required
|
2018-04-12 20:11:22 +00:00
|
|
|
.form-group.row
|
2019-02-03 14:29:34 +00:00
|
|
|
.col-sm-2.col-form-label
|
|
|
|
= f.label :username
|
2013-12-30 23:27:02 +00:00
|
|
|
.col-sm-10
|
2016-04-14 18:32:33 +00:00
|
|
|
= f.text_field :username, required: true, autocomplete: 'off', autocorrect: 'off', autocapitalize: 'off', spellcheck: false, class: 'form-control'
|
2012-11-27 06:31:15 +00:00
|
|
|
%span.help-inline * required
|
2018-04-12 20:11:22 +00:00
|
|
|
.form-group.row
|
2019-02-03 14:29:34 +00:00
|
|
|
.col-sm-2.col-form-label
|
|
|
|
= f.label :email
|
2013-12-30 23:27:02 +00:00
|
|
|
.col-sm-10
|
2016-04-14 18:32:33 +00:00
|
|
|
= f.text_field :email, required: true, autocomplete: 'off', class: 'form-control'
|
2012-11-27 06:31:15 +00:00
|
|
|
%span.help-inline * required
|
2012-11-23 06:11:09 +00:00
|
|
|
|
2013-06-26 12:57:02 +00:00
|
|
|
- if @user.new_record?
|
2013-06-13 18:06:27 +00:00
|
|
|
%fieldset
|
|
|
|
%legend Password
|
2018-04-12 20:11:22 +00:00
|
|
|
.form-group.row
|
2019-02-03 14:29:34 +00:00
|
|
|
.col-sm-2.col-form-label
|
|
|
|
= f.label :password
|
2013-12-30 23:27:02 +00:00
|
|
|
.col-sm-10
|
2013-06-13 18:06:27 +00:00
|
|
|
%strong
|
2014-07-17 12:03:17 +00:00
|
|
|
Reset link will be generated and sent to the user.
|
2013-06-13 18:06:27 +00:00
|
|
|
%br
|
2014-07-17 12:03:17 +00:00
|
|
|
User will be forced to set the password on first sign in.
|
2013-06-13 18:06:27 +00:00
|
|
|
- else
|
|
|
|
%fieldset
|
|
|
|
%legend Password
|
2018-04-12 20:11:22 +00:00
|
|
|
.form-group.row
|
2019-02-03 14:29:34 +00:00
|
|
|
.col-sm-2.col-form-label
|
|
|
|
= f.label :password
|
|
|
|
.col-sm-10
|
|
|
|
= f.password_field :password, disabled: f.object.force_random_password, class: 'form-control'
|
2018-04-12 20:11:22 +00:00
|
|
|
.form-group.row
|
2019-02-03 14:29:34 +00:00
|
|
|
.col-sm-2.col-form-label
|
|
|
|
= f.label :password_confirmation
|
|
|
|
.col-sm-10
|
|
|
|
= f.password_field :password_confirmation, disabled: f.object.force_random_password, class: 'form-control'
|
2012-11-27 06:31:15 +00:00
|
|
|
|
2017-02-06 16:58:05 +00:00
|
|
|
= render partial: 'access_levels', locals: { f: f }
|
2016-03-10 21:08:11 +00:00
|
|
|
|
2019-05-21 02:00:57 +00:00
|
|
|
= render_if_exists 'admin/users/namespace_plan_fieldset', f: f
|
|
|
|
|
|
|
|
= render_if_exists 'admin/users/limits', f: f
|
|
|
|
|
2012-11-27 06:31:15 +00:00
|
|
|
%fieldset
|
|
|
|
%legend Profile
|
2018-04-12 20:11:22 +00:00
|
|
|
.form-group.row
|
2019-02-03 14:29:34 +00:00
|
|
|
.col-sm-2.col-form-label
|
|
|
|
= f.label :avatar
|
2014-06-03 10:05:06 +00:00
|
|
|
.col-sm-10
|
|
|
|
= f.file_field :avatar
|
|
|
|
|
2018-04-12 20:11:22 +00:00
|
|
|
.form-group.row
|
2019-02-03 14:29:34 +00:00
|
|
|
.col-sm-2.col-form-label
|
|
|
|
= f.label :skype
|
|
|
|
.col-sm-10
|
|
|
|
= f.text_field :skype, class: 'form-control'
|
2018-04-12 20:11:22 +00:00
|
|
|
.form-group.row
|
2019-02-03 14:29:34 +00:00
|
|
|
.col-sm-2.col-form-label
|
|
|
|
= f.label :linkedin
|
|
|
|
.col-sm-10
|
|
|
|
= f.text_field :linkedin, class: 'form-control'
|
2018-04-12 20:11:22 +00:00
|
|
|
.form-group.row
|
2019-02-03 14:29:34 +00:00
|
|
|
.col-sm-2.col-form-label
|
|
|
|
= f.label :twitter
|
|
|
|
.col-sm-10
|
|
|
|
= f.text_field :twitter, class: 'form-control'
|
2018-04-12 20:11:22 +00:00
|
|
|
.form-group.row
|
2019-02-03 14:29:34 +00:00
|
|
|
.col-sm-2.col-form-label
|
|
|
|
= f.label :website_url
|
|
|
|
.col-sm-10
|
|
|
|
= f.text_field :website_url, class: 'form-control'
|
2012-08-25 17:31:19 +00:00
|
|
|
|
2019-05-21 02:00:57 +00:00
|
|
|
= render_if_exists 'admin/users/admin_notes', f: f
|
|
|
|
|
2013-08-07 20:35:24 +00:00
|
|
|
.form-actions
|
2013-06-26 12:57:02 +00:00
|
|
|
- if @user.new_record?
|
2018-09-18 09:58:22 +00:00
|
|
|
= f.submit 'Create user', class: "btn btn-success"
|
2013-01-29 20:18:19 +00:00
|
|
|
= link_to 'Cancel', admin_users_path, class: "btn btn-cancel"
|
2012-04-18 01:34:14 +00:00
|
|
|
- else
|
2018-09-18 09:58:22 +00:00
|
|
|
= f.submit 'Save changes', class: "btn btn-success"
|
2013-06-26 12:57:02 +00:00
|
|
|
= link_to 'Cancel', admin_user_path(@user), class: "btn btn-cancel"
|