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