diff options
Diffstat (limited to 'app/views/admin/users')
-rw-r--r-- | app/views/admin/users/_access_levels.html.haml | 100 | ||||
-rw-r--r-- | app/views/admin/users/_admin_notes.html.haml | 15 | ||||
-rw-r--r-- | app/views/admin/users/_form.html.haml | 115 |
3 files changed, 115 insertions, 115 deletions
diff --git a/app/views/admin/users/_access_levels.html.haml b/app/views/admin/users/_access_levels.html.haml index cf951ae0265..b255354f2c1 100644 --- a/app/views/admin/users/_access_levels.html.haml +++ b/app/views/admin/users/_access_levels.html.haml @@ -1,52 +1,48 @@ -%fieldset - %legend.gl-border-bottom-0 - = s_('AdminUsers|Access') - .form-group.row - .col-12 - = f.label :projects_limit - = f.number_field :projects_limit, min: 0, max: Gitlab::Database::MAX_INT_VALUE, class: 'form-control gl-form-input' - - .form-group.row - .col-12.gl-pt-0 - = f.label :can_create_group - = f.gitlab_ui_checkbox_component :can_create_group, '' - - .form-group.row - .col-12.gl-pt-0 - = f.label :access_level - - editing_current_user = (current_user == @user) - - = f.gitlab_ui_radio_component :access_level, :regular, - s_('AdminUsers|Regular'), - radio_options: { disabled: editing_current_user }, - help_text: s_('AdminUsers|Regular users have access to their groups and projects.') - - = render_if_exists 'admin/users/auditor_access_level_radio', f: f, disabled: editing_current_user - - - help_text = s_('AdminUsers|The user has unlimited access to all groups, projects, users, and features.') - - help_text += ' ' + s_('AdminUsers|You cannot remove your own administrator access.') if editing_current_user - = f.gitlab_ui_radio_component :access_level, :admin, - s_('AdminUsers|Administrator'), - radio_options: { disabled: editing_current_user }, - help_text: help_text - - - .form-group.row - .col-12.gl-pt-0 - = f.label :external - .hidden{ data: user_internal_regex_data } - .col-12.gl-display-flex.gl-align-items-baseline - = f.gitlab_ui_checkbox_component :external, s_('AdminUsers|External users cannot see internal or private projects unless access is explicitly granted. Also, external users cannot create projects, groups, or personal snippets.') - %row.hidden#warning_external_automatically_set - = gl_badge_tag s_('AdminUsers|Automatically marked as default internal user'), variant: :warning - - .form-group.row - - @user.credit_card_validation || @user.build_credit_card_validation - = f.fields_for :credit_card_validation do |ff| - .col-12.gl-pt-0 - = ff.label s_('AdminUsers|Validate user account') - .col-12.gl-display-flex.gl-align-items-baseline - = ff.gitlab_ui_checkbox_component :credit_card_validated_at, - s_('AdminUsers|User is validated and can use free CI minutes on shared runners.'), - help_text: s_('AdminUsers|A user can validate themselves by inputting a credit/debit card, or an admin can manually validate a user.'), - checkbox_options: { checked: @user.credit_card_validated_at.present? } +.gl-border-b.gl-pb-3.gl-mb-6 + .row + .col-lg-4 + %h4.gl-mt-0 + = s_('AdminUsers|Access') + .col-lg-8 + .form-group.gl-form-group{ role: 'group' } + = f.label :projects_limit, class: 'gl-display-block col-form-label' + = f.number_field :projects_limit, min: 0, max: Gitlab::Database::MAX_INT_VALUE, class: 'form-control gl-form-input' + + .form-group.gl-form-group{ role: 'group' } + = f.gitlab_ui_checkbox_component :can_create_group, s_('AdminUsers|Can create group') + + %fieldset.form-group.gl-form-group + %legend.col-form-label.col-form-label + = s_('AdminUsers|Access level') + - editing_current_user = (current_user == @user) + + = f.gitlab_ui_radio_component :access_level, :regular, + s_('AdminUsers|Regular'), + radio_options: { disabled: editing_current_user }, + help_text: s_('AdminUsers|Regular users have access to their groups and projects.') + + = render_if_exists 'admin/users/auditor_access_level_radio', f: f, disabled: editing_current_user + + - help_text = s_('AdminUsers|The user has unlimited access to all groups, projects, users, and features.') + - help_text += ' ' + s_('AdminUsers|You cannot remove your own administrator access.') if editing_current_user + = f.gitlab_ui_radio_component :access_level, :admin, + s_('AdminUsers|Administrator'), + radio_options: { disabled: editing_current_user }, + help_text: help_text + + .form-group.gl-form-group{ role: 'group' } + = f.gitlab_ui_checkbox_component :external, + s_('AdminUsers|External'), + help_text: s_('AdminUsers|External users cannot see internal or private projects unless access is explicitly granted. Also, external users cannot create projects, groups, or personal snippets.') + .hidden{ data: user_internal_regex_data } + .gl-display-flex.gl-align-items-baseline + %row.hidden#warning_external_automatically_set + = gl_badge_tag s_('AdminUsers|Automatically marked as default internal user'), variant: :warning + + .form-group.gl-form-group{ role: 'group' } + - @user.credit_card_validation || @user.build_credit_card_validation + = f.fields_for :credit_card_validation do |ff| + = ff.gitlab_ui_checkbox_component :credit_card_validated_at, + s_('AdminUsers|Validate user account'), + help_text: s_('AdminUsers|A user can validate themselves by inputting a credit/debit card, or an admin can manually validate a user. Validated users can use free CI minutes on shared runners.'), + checkbox_options: { checked: @user.credit_card_validated_at.present? } diff --git a/app/views/admin/users/_admin_notes.html.haml b/app/views/admin/users/_admin_notes.html.haml index 10f654e0f71..dce008afb26 100644 --- a/app/views/admin/users/_admin_notes.html.haml +++ b/app/views/admin/users/_admin_notes.html.haml @@ -1,6 +1,9 @@ -%fieldset - %legend.gl-border-bottom-0= _('Admin notes') - .form-group.row - .col-12 - = f.label :note, s_('Admin|Note') - = f.text_area :note, class: 'form-control gl-form-input gl-form-textarea' +.gl-mb-3 + .row + .col-lg-4 + %h4.gl-mt-0 + = _('Admin notes') + .col-lg-8 + .form-group.gl-form-group{ role: 'group' } + = f.label :note, s_('Admin|Note') + = f.text_area :note, class: 'form-control gl-form-input gl-form-textarea' diff --git a/app/views/admin/users/_form.html.haml b/app/views/admin/users/_form.html.haml index 7995bc1b6f4..3aa29527f08 100644 --- a/app/views/admin/users/_form.html.haml +++ b/app/views/admin/users/_form.html.haml @@ -2,41 +2,41 @@ = gitlab_ui_form_for [:admin, @user], html: { class: 'fieldset-form' } do |f| = form_errors(@user, pajamas_alert: true) - %fieldset - %legend.gl-border-bottom-0= _('Account') - .form-group.row - .col-12 - = f.label "#{:name} (required)" - = f.text_field :name, required: true, autocomplete: 'off', class: 'form-control gl-form-input' - .form-group.row - .col-12 - = f.label "#{:username} (required)" - = f.text_field :username, required: true, autocomplete: 'off', autocorrect: 'off', autocapitalize: 'off', spellcheck: false, class: 'form-control gl-form-input' - .form-group.row - .col-12 - = f.label "#{:email} (required)" - = 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 + = _('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' - - if @user.new_record? - %fieldset - %legend.gl-border-bottom-0= _('Password') - .form-group.row - .col-12 - %strong - = _('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 } - - else - %fieldset - %legend.gl-border-bottom-0= _('Password') - .form-group.row - .col-12 - = f.label :password - .col-12 - = f.password_field :password, disabled: f.object.force_random_password, autocomplete: 'new-password', class: 'form-control gl-form-input' - .form-group.row - .col-12 - = f.label :password_confirmation - .col-12 - = f.password_field :password_confirmation, disabled: f.object.force_random_password, autocomplete: 'new-password', class: 'form-control gl-form-input' + .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' + .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' = render partial: 'access_levels', locals: { f: f } @@ -44,30 +44,31 @@ = render_if_exists 'admin/users/limits', f: f - %fieldset - %legend.gl-border-bottom-0= _('Profile') - .form-group.row - .col-12 - = f.label :avatar - .col-12 - = f.file_field :avatar + .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' - .form-group.row - .col-12 - = f.label :skype - = f.text_field :skype, class: 'form-control gl-form-input' - .form-group.row - .col-12 - = f.label :linkedin - = f.text_field :linkedin, class: 'form-control gl-form-input' - .form-group.row - .col-12 - = f.label :twitter - = f.text_field :twitter, class: 'form-control gl-form-input' - .form-group.row - .col-12 - = f.label :website_url - = f.text_field :website_url, class: 'form-control gl-form-input' + .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' = render 'admin/users/admin_notes', f: f |