debian-mirror-gitlab/app/views/admin/users/_form.html.haml

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

83 lines
4 KiB
Text
Raw Normal View History

2014-09-02 18:07:02 +05:30
.user_new
2021-11-18 22:05:49 +05:30
= gitlab_ui_form_for [:admin, @user], html: { class: 'fieldset-form' } do |f|
2022-07-23 23:45:48 +05:30
= form_errors(@user, pajamas_alert: true)
2014-09-02 18:07:02 +05:30
2022-08-13 15:12:31 +05:30
.gl-border-b.gl-pb-3.gl-mb-6
.row
.col-lg-4
%h4.gl-mt-0
= _('Account')
.col-lg-8
.form-group.gl-form-group{ role: 'group' }
= f.label :name, _('Name'), class: 'gl-display-block col-form-label'
= f.text_field :name, required: true, autocomplete: 'off', class: 'form-control gl-form-input'
2014-09-02 18:07:02 +05:30
2022-08-13 15:12:31 +05:30
.form-group.gl-form-group{ role: 'group' }
= f.label :username, _('Username'), class: 'gl-display-block col-form-label'
= f.text_field :username, required: true, autocomplete: 'off', autocorrect: 'off', autocapitalize: 'off', spellcheck: false, class: 'form-control gl-form-input'
.form-group.gl-form-group{ role: 'group' }
= f.label :email, _('Email'), class: 'gl-display-block col-form-label'
= f.text_field :email, required: true, autocomplete: 'off', class: 'form-control gl-form-input'
.gl-border-b.gl-pb-3.gl-mb-6
.row
.col-lg-4
%h4.gl-mt-0
= _('Password')
.col-lg-8
- if @user.new_record?
= render Pajamas::AlertComponent.new(variant: :info, dismissible: false, alert_options: { class: 'gl-mb-5' }) do |c|
= c.body do
= s_('AdminUsers|Reset link will be generated and sent to the user. User will be forced to set the password on first sign in.')
- else
.form-group.gl-form-group{ role: 'group' }
= f.label :password, _('Password'), class: 'gl-display-block col-form-label'
= f.password_field :password, disabled: f.object.force_random_password, autocomplete: 'new-password', class: 'form-control gl-form-input js-password-complexity-validation'
= render_if_exists 'shared/password_requirements_list'
.form-group.gl-form-group{ role: 'group' }
= f.label :password_confirmation, _('Password confirmation'), class: 'gl-display-block col-form-label'
= f.password_field :password_confirmation, disabled: f.object.force_random_password, autocomplete: 'new-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
2022-08-13 15:12:31 +05:30
.gl-border-b.gl-pb-6.gl-mb-6
.row
.col-lg-4
%h4.gl-mt-0
= _('Profile')
.col-lg-8
.form-group.gl-form-group{ role: 'group' }
= f.label :avatar, s_('AdminUsers|Avatar'), class: 'gl-display-block col-form-label'
= f.file_field :avatar
.form-group.gl-form-group{ role: 'group' }
= f.label :skype, s_('AdminUsers|Skype'), class: 'gl-display-block col-form-label'
= f.text_field :skype, class: 'form-control gl-form-input'
.form-group.gl-form-group{ role: 'group' }
= f.label :linkedin, s_('AdminUsers|Linkedin'), class: 'gl-display-block col-form-label'
= f.text_field :linkedin, class: 'form-control gl-form-input'
.form-group.gl-form-group{ role: 'group' }
= f.label :twitter, _('Twitter'), class: 'gl-display-block col-form-label'
= f.text_field :twitter, class: 'form-control gl-form-input'
2014-09-02 18:07:02 +05:30
2022-08-13 15:12:31 +05:30
.form-group.gl-form-group{ role: 'group' }
= f.label :website_url, s_('AdminUsers|Website URL'), class: 'gl-display-block col-form-label'
= 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
2022-07-23 23:45:48 +05:30
%div
2014-09-02 18:07:02 +05:30
- if @user.new_record?
2021-06-08 01:23:25 +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-06-08 01:23:25 +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"