diff options
author | GitLab Bot <gitlab-bot@gitlab.com> | 2022-05-19 10:33:21 +0300 |
---|---|---|
committer | GitLab Bot <gitlab-bot@gitlab.com> | 2022-05-19 10:33:21 +0300 |
commit | 36a59d088eca61b834191dacea009677a96c052f (patch) | |
tree | e4f33972dab5d8ef79e3944a9f403035fceea43f /app/views/devise | |
parent | a1761f15ec2cae7c7f7bbda39a75494add0dfd6f (diff) |
Add latest changes from gitlab-org/gitlab@15-0-stable-eev15.0.0-rc42
Diffstat (limited to 'app/views/devise')
-rw-r--r-- | app/views/devise/passwords/new.html.haml | 8 | ||||
-rw-r--r-- | app/views/devise/sessions/_new_base.html.haml | 13 | ||||
-rw-r--r-- | app/views/devise/sessions/_new_base_user_login_label.html.haml | 1 | ||||
-rw-r--r-- | app/views/devise/sessions/_new_crowd.html.haml | 8 | ||||
-rw-r--r-- | app/views/devise/sessions/_new_ldap.html.haml | 8 | ||||
-rw-r--r-- | app/views/devise/sessions/two_factor.html.haml | 2 | ||||
-rw-r--r-- | app/views/devise/shared/_omniauth_box.html.haml | 2 | ||||
-rw-r--r-- | app/views/devise/shared/_tab_single.html.haml | 2 | ||||
-rw-r--r-- | app/views/devise/shared/_tabs_normal.html.haml | 9 |
9 files changed, 23 insertions, 30 deletions
diff --git a/app/views/devise/passwords/new.html.haml b/app/views/devise/passwords/new.html.haml index d5372862128..c90a9e7c672 100644 --- a/app/views/devise/passwords/new.html.haml +++ b/app/views/devise/passwords/new.html.haml @@ -3,17 +3,17 @@ = form_for(resource, as: resource_name, url: password_path(resource_name), html: { method: :post, class: 'gl-show-field-errors' }) do |f| .devise-errors = render "devise/shared/error_messages", resource: resource - .form-group + .form-group.gl-px-5.gl-pt-5 = f.label :email = f.email_field :email, class: "form-control gl-form-input", required: true, autocomplete: 'off', value: params[:user_email], autofocus: true, title: _('Please provide a valid email address.') .form-text.text-muted = _('Requires your primary GitLab email address.') - %div - if recaptcha_enabled? - = recaptcha_tags nonce: content_security_policy_nonce + .gl-px-5 + = recaptcha_tags nonce: content_security_policy_nonce - .gl-mt-5 + .gl-p-5 = f.submit _("Reset password"), class: "gl-button btn-confirm btn" .clearfix.prepend-top-20 diff --git a/app/views/devise/sessions/_new_base.html.haml b/app/views/devise/sessions/_new_base.html.haml index 83e3fd85511..48b38861e6e 100644 --- a/app/views/devise/sessions/_new_base.html.haml +++ b/app/views/devise/sessions/_new_base.html.haml @@ -1,12 +1,12 @@ = gitlab_ui_form_for(resource, as: resource_name, url: session_path(resource_name), html: { class: 'new_user gl-show-field-errors js-sign-in-form', aria: { live: 'assertive' }, data: { testid: 'sign-in-form' }}) do |f| - .form-group - = f.label _('Username or email'), for: 'user_login', class: 'label-bold' + .form-group.gl-px-5.gl-pt-5 + = render_if_exists 'devise/sessions/new_base_user_login_label', form: f = f.text_field :login, value: @invite_email, class: 'form-control gl-form-input top js-username-field', autofocus: 'autofocus', autocapitalize: 'off', autocorrect: 'off', required: true, title: _('This field is required.'), data: { qa_selector: 'login_field', testid: 'username-field' } - .form-group + .form-group.gl-px-5 = f.label :password, class: 'label-bold' = f.password_field :password, class: 'form-control gl-form-input bottom', autocomplete: 'current-password', required: true, title: _('This field is required.'), data: { qa_selector: 'password_field' } - if devise_mapping.rememberable? - %div + .gl-px-5 .gl-display-inline-block = f.gitlab_ui_checkbox_component :remember_me, _('Remember me') .gl-float-right @@ -18,7 +18,8 @@ - if Feature.enabled?(:arkose_labs_login_challenge) = render_if_exists 'devise/sessions/arkose_labs' - elsif captcha_enabled? || captcha_on_login_required? - = recaptcha_tags nonce: content_security_policy_nonce + .gl-px-5 + = recaptcha_tags nonce: content_security_policy_nonce - .submit-container.move-submit-down + .submit-container.move-submit-down.gl-px-5 = f.button _('Sign in'), type: :submit, class: "gl-button btn btn-block btn-confirm js-sign-in-button#{' js-no-auto-disable' if Feature.enabled?(:arkose_labs_login_challenge)}", data: { qa_selector: 'sign_in_button', testid: 'sign-in-button' } diff --git a/app/views/devise/sessions/_new_base_user_login_label.html.haml b/app/views/devise/sessions/_new_base_user_login_label.html.haml new file mode 100644 index 00000000000..2aa66684cad --- /dev/null +++ b/app/views/devise/sessions/_new_base_user_login_label.html.haml @@ -0,0 +1 @@ += local_assigns[:form].label _('Username or email'), for: 'user_login', class: 'label-bold' diff --git a/app/views/devise/sessions/_new_crowd.html.haml b/app/views/devise/sessions/_new_crowd.html.haml index fb4c011dd49..bdf357c5f74 100644 --- a/app/views/devise/sessions/_new_crowd.html.haml +++ b/app/views/devise/sessions/_new_crowd.html.haml @@ -1,13 +1,13 @@ = form_tag(omniauth_authorize_path(:user, :crowd), id: 'new_crowd_user', class: 'gl-show-field-errors') do - .form-group + .form-group.gl-px-5.gl-pt-5 = label_tag :username, _('Username or email') = text_field_tag :username, nil, { class: "form-control top", title: _("This field is required."), autofocus: "autofocus", required: true } - .form-group + .form-group.gl-px-5 = label_tag :password = password_field_tag :password, nil, { autocomplete: 'current-password', class: "form-control bottom", title: _("This field is required."), required: true } - if devise_mapping.rememberable? - .remember-me + .remember-me.gl-px-5 %label{ for: "remember_me" } = check_box_tag :remember_me, '1', false, id: 'remember_me' %span= _('Remember me') - = submit_tag _("Sign in"), class: "gl-button btn-confirm btn" + = submit_tag _("Sign in"), class: "gl-button btn-confirm btn gl-px-5" diff --git a/app/views/devise/sessions/_new_ldap.html.haml b/app/views/devise/sessions/_new_ldap.html.haml index fea58779c17..4cde24f4afa 100644 --- a/app/views/devise/sessions/_new_ldap.html.haml +++ b/app/views/devise/sessions/_new_ldap.html.haml @@ -3,17 +3,17 @@ - submit_message = local_assigns.fetch(:submit_message, _('Sign in')) = form_tag(omniauth_callback_path(:user, server['provider_name']), id: 'new_ldap_user', class: "gl-show-field-errors") do - .form-group + .form-group.gl-px-5.gl-pt-5 = label_tag :username, "#{server['label']} Username" = text_field_tag :username, nil, { class: "form-control gl-form-input top", title: _("This field is required."), autofocus: "autofocus", data: { qa_selector: 'username_field' }, required: true } - .form-group + .form-group.gl-px-5 = label_tag :password = password_field_tag :password, nil, { autocomplete: 'current-password', class: "form-control gl-form-input bottom", title: _("This field is required."), data: { qa_selector: 'password_field' }, required: true } - if !hide_remember_me && devise_mapping.rememberable? - .remember-me + .remember-me.gl-px-5 %label{ for: "remember_me" } = check_box_tag :remember_me, '1', false, id: 'remember_me' %span= _('Remember me') - .submit-container.move-submit-down + .submit-container.move-submit-down.gl-px-5 = submit_tag submit_message, class: "gl-button btn btn-confirm", data: { qa_selector: 'sign_in_button' } diff --git a/app/views/devise/sessions/two_factor.html.haml b/app/views/devise/sessions/two_factor.html.haml index 29bcb3c158b..77a2fda021f 100644 --- a/app/views/devise/sessions/two_factor.html.haml +++ b/app/views/devise/sessions/two_factor.html.haml @@ -1,6 +1,6 @@ %div = render 'devise/shared/tab_single', tab_title: _('Two-Factor Authentication') - .login-box + .login-box.gl-p-5 .login-body - if @user.two_factor_otp_enabled? = form_for(resource, as: resource_name, url: session_path(resource_name), method: :post, html: { class: "edit_user gl-show-field-errors js-2fa-form #{'hidden' if @user.two_factor_webauthn_u2f_enabled?}" }) do |f| diff --git a/app/views/devise/shared/_omniauth_box.html.haml b/app/views/devise/shared/_omniauth_box.html.haml index bd7fe41ae8d..32b4a15517e 100644 --- a/app/views/devise/shared/_omniauth_box.html.haml +++ b/app/views/devise/shared/_omniauth_box.html.haml @@ -1,6 +1,6 @@ - hide_remember_me = local_assigns.fetch(:hide_remember_me, false) -.omniauth-container.gl-mt-5 +.omniauth-container.gl-mt-5.gl-p-5 %label.gl-font-weight-bold = _('Sign in with') - providers = enabled_button_based_providers diff --git a/app/views/devise/shared/_tab_single.html.haml b/app/views/devise/shared/_tab_single.html.haml index 1b5a932a09a..336954d00b0 100644 --- a/app/views/devise/shared/_tab_single.html.haml +++ b/app/views/devise/shared/_tab_single.html.haml @@ -1,2 +1,2 @@ = gl_tabs_nav({ class: 'new-session-tabs gl-border-0' }) do - = gl_tab_link_to tab_title, '#', { item_active: true, class: 'gl-cursor-default!', tab_class: 'gl-bg-transparent!', tabindex: '-1' } + = gl_tab_link_to tab_title, '#', { item_active: true, class: 'gl-cursor-default!', tab_class: 'gl-bg-transparent!', tabindex: '-1', data: { qa_selector: 'sign_in_tab' } } diff --git a/app/views/devise/shared/_tabs_normal.html.haml b/app/views/devise/shared/_tabs_normal.html.haml deleted file mode 100644 index 01dd3748887..00000000000 --- a/app/views/devise/shared/_tabs_normal.html.haml +++ /dev/null @@ -1,9 +0,0 @@ -- tab_title = local_assigns.fetch(:tab_title, _('Sign in')) -- render_signup_link = local_assigns.fetch(:render_signup_link, true) - -%ul.nav-links.new-session-tabs.nav-tabs.nav{ role: 'tablist' } - %li.nav-item{ role: 'presentation' } - %a.nav-link.active{ href: '#login-pane', data: { toggle: 'tab', qa_selector: 'sign_in_tab' }, role: 'tab' }= tab_title - - if render_signup_link && allow_signup? - %li.nav-item{ role: 'presentation' } - %a.nav-link{ href: '#register-pane', data: { track_label: 'sign_in_register', track_property: '', track_action: 'click_button', track_value: '', toggle: 'tab', qa_selector: 'register_tab' }, role: 'tab' } Register |