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