diff options
Diffstat (limited to 'app/views/admin/users')
-rw-r--r-- | app/views/admin/users/_access_levels.html.haml | 19 | ||||
-rw-r--r-- | app/views/admin/users/_admin_notes.html.haml | 5 | ||||
-rw-r--r-- | app/views/admin/users/_form.html.haml | 58 | ||||
-rw-r--r-- | app/views/admin/users/_head.html.haml | 4 | ||||
-rw-r--r-- | app/views/admin/users/_users.html.haml | 2 | ||||
-rw-r--r-- | app/views/admin/users/edit.html.haml | 3 | ||||
-rw-r--r-- | app/views/admin/users/new.html.haml | 3 |
7 files changed, 38 insertions, 56 deletions
diff --git a/app/views/admin/users/_access_levels.html.haml b/app/views/admin/users/_access_levels.html.haml index 51e6af56377..cf951ae0265 100644 --- a/app/views/admin/users/_access_levels.html.haml +++ b/app/views/admin/users/_access_levels.html.haml @@ -1,22 +1,19 @@ %fieldset - %legend + %legend.gl-border-bottom-0 = s_('AdminUsers|Access') .form-group.row - .col-sm-2.col-form-label + .col-12 = f.label :projects_limit - .col-sm-10 = f.number_field :projects_limit, min: 0, max: Gitlab::Database::MAX_INT_VALUE, class: 'form-control gl-form-input' .form-group.row - .col-sm-2.col-form-label.gl-pt-0 + .col-12.gl-pt-0 = f.label :can_create_group - .col-sm-10 = f.gitlab_ui_checkbox_component :can_create_group, '' .form-group.row - .col-sm-2.col-form-label.gl-pt-0 + .col-12.gl-pt-0 = f.label :access_level - .col-sm-10 - editing_current_user = (current_user == @user) = f.gitlab_ui_radio_component :access_level, :regular, @@ -35,10 +32,10 @@ .form-group.row - .col-sm-2.col-form-label.gl-pt-0 + .col-12.gl-pt-0 = f.label :external .hidden{ data: user_internal_regex_data } - .col-sm-10.gl-display-flex.gl-align-items-baseline + .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 @@ -46,9 +43,9 @@ .form-group.row - @user.credit_card_validation || @user.build_credit_card_validation = f.fields_for :credit_card_validation do |ff| - .col-sm-2.col-form-label.gl-pt-0 + .col-12.gl-pt-0 = ff.label s_('AdminUsers|Validate user account') - .col-sm-10.gl-display-flex.gl-align-items-baseline + .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.'), diff --git a/app/views/admin/users/_admin_notes.html.haml b/app/views/admin/users/_admin_notes.html.haml index 7c3220e2cee..10f654e0f71 100644 --- a/app/views/admin/users/_admin_notes.html.haml +++ b/app/views/admin/users/_admin_notes.html.haml @@ -1,7 +1,6 @@ %fieldset - %legend= _('Admin notes') + %legend.gl-border-bottom-0= _('Admin notes') .form-group.row - .col-sm-2.col-form-label + .col-12 = f.label :note, s_('Admin|Note') - .col-sm-10 = 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 3869a2b6dcd..7995bc1b6f4 100644 --- a/app/views/admin/users/_form.html.haml +++ b/app/views/admin/users/_form.html.haml @@ -1,49 +1,41 @@ .user_new = gitlab_ui_form_for [:admin, @user], html: { class: 'fieldset-form' } do |f| - = form_errors(@user) + = form_errors(@user, pajamas_alert: true) %fieldset - %legend= _('Account') + %legend.gl-border-bottom-0= _('Account') .form-group.row - .col-sm-2.col-form-label - = f.label :name - .col-sm-10 + .col-12 + = f.label "#{:name} (required)" = f.text_field :name, required: true, autocomplete: 'off', class: 'form-control gl-form-input' - %span.help-inline * #{_('required')} .form-group.row - .col-sm-2.col-form-label - = f.label :username - .col-sm-10 + .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' - %span.help-inline * #{_('required')} .form-group.row - .col-sm-2.col-form-label - = f.label :email - .col-sm-10 + .col-12 + = f.label "#{:email} (required)" = f.text_field :email, required: true, autocomplete: 'off', class: 'form-control gl-form-input' - %span.help-inline * #{_('required')} - if @user.new_record? %fieldset - %legend= _('Password') + %legend.gl-border-bottom-0= _('Password') .form-group.row - .col-sm-2.col-form-label - = f.label :password - .col-sm-10 + .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= _('Password') + %legend.gl-border-bottom-0= _('Password') .form-group.row - .col-sm-2.col-form-label + .col-12 = f.label :password - .col-sm-10 + .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-sm-2.col-form-label + .col-12 = f.label :password_confirmation - .col-sm-10 + .col-12 = 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 } @@ -53,37 +45,33 @@ = render_if_exists 'admin/users/limits', f: f %fieldset - %legend= _('Profile') + %legend.gl-border-bottom-0= _('Profile') .form-group.row - .col-sm-2.col-form-label + .col-12 = f.label :avatar - .col-sm-10 + .col-12 = f.file_field :avatar .form-group.row - .col-sm-2.col-form-label + .col-12 = f.label :skype - .col-sm-10 = f.text_field :skype, class: 'form-control gl-form-input' .form-group.row - .col-sm-2.col-form-label + .col-12 = f.label :linkedin - .col-sm-10 = f.text_field :linkedin, class: 'form-control gl-form-input' .form-group.row - .col-sm-2.col-form-label + .col-12 = f.label :twitter - .col-sm-10 = f.text_field :twitter, class: 'form-control gl-form-input' .form-group.row - .col-sm-2.col-form-label + .col-12 = f.label :website_url - .col-sm-10 = f.text_field :website_url, class: 'form-control gl-form-input' = render 'admin/users/admin_notes', f: f - .form-actions + %div - if @user.new_record? = f.submit _('Create user'), class: "btn gl-button btn-confirm" = link_to _('Cancel'), admin_users_path, class: "gl-button btn btn-default btn-cancel" diff --git a/app/views/admin/users/_head.html.haml b/app/views/admin/users/_head.html.haml index e429a16d5ec..529692df0b6 100644 --- a/app/views/admin/users/_head.html.haml +++ b/app/views/admin/users/_head.html.haml @@ -1,6 +1,6 @@ .gl-display-flex.gl-flex-wrap.gl-justify-content-space-between.gl-align-items-center.gl-py-3.gl-mb-5.gl-border-b-solid.gl-border-gray-100.gl-border-b-1 .gl-my-3 - %h3.page-title.gl-m-0 + %h1.page-title.gl-font-size-h-display.gl-m-0 = @user.name - if @user.blocked_pending_approval? %span.gl-text-red-500 @@ -32,7 +32,7 @@ - if impersonation_enabled? && @user.can?(:log_in) = link_to _('Impersonate'), impersonate_admin_user_path(@user), method: :post, class: "btn btn-default gl-button", data: { qa_selector: 'impersonate_user_link' } - if can_force_email_confirmation?(@user) - %button.btn.gl-button.btn-info.js-confirm-modal-button{ data: confirm_user_data(@user) } + = render Pajamas::ButtonComponent.new(variant: :confirm, button_options: { class: 'js-confirm-modal-button', data: confirm_user_data(@user) }) do = _('Confirm user') .gl-p-2 #js-admin-user-actions{ data: admin_user_actions_data_attributes(@user) } diff --git a/app/views/admin/users/_users.html.haml b/app/views/admin/users/_users.html.haml index a7ed7b8c052..2dbafb517be 100644 --- a/app/views/admin/users/_users.html.haml +++ b/app/views/admin/users/_users.html.haml @@ -1,6 +1,6 @@ - if registration_features_can_be_prompted? = render Pajamas::AlertComponent.new(variant: :tip, - alert_class: 'gl-my-5', + alert_options: { class: 'gl-my-5' }, dismissible: false) do |c| = c.body do = render 'shared/registration_features_discovery_message', feature_title: s_('RegistrationFeatures|send emails to users') diff --git a/app/views/admin/users/edit.html.haml b/app/views/admin/users/edit.html.haml index e3ebb691ba9..5507d640e04 100644 --- a/app/views/admin/users/edit.html.haml +++ b/app/views/admin/users/edit.html.haml @@ -1,5 +1,4 @@ - page_title _("Edit"), @user.name, _("Users") -%h3.page-title +%h1.page-title.gl-font-size-h-display = _("Edit user: %{user_name}") % { user_name: @user.name } -%hr = render 'form' diff --git a/app/views/admin/users/new.html.haml b/app/views/admin/users/new.html.haml index 08aa7c3c9d2..425d0150d10 100644 --- a/app/views/admin/users/new.html.haml +++ b/app/views/admin/users/new.html.haml @@ -1,5 +1,4 @@ - page_title _("New User") -%h3.page-title +%h1.page-title.gl-font-size-h-display = s_('AdminUsers|New user') -%hr = render 'form' |