diff options
author | GitLab Bot <gitlab-bot@gitlab.com> | 2022-08-18 11:17:02 +0300 |
---|---|---|
committer | GitLab Bot <gitlab-bot@gitlab.com> | 2022-08-18 11:17:02 +0300 |
commit | b39512ed755239198a9c294b6a45e65c05900235 (patch) | |
tree | d234a3efade1de67c46b9e5a38ce813627726aa7 /app/views/devise | |
parent | d31474cf3b17ece37939d20082b07f6657cc79a9 (diff) |
Add latest changes from gitlab-org/gitlab@15-3-stable-eev15.3.0-rc42
Diffstat (limited to 'app/views/devise')
-rw-r--r-- | app/views/devise/passwords/new.html.haml | 2 | ||||
-rw-r--r-- | app/views/devise/registrations/new.html.haml | 1 | ||||
-rw-r--r-- | app/views/devise/sessions/_new_base.html.haml | 5 | ||||
-rw-r--r-- | app/views/devise/sessions/_new_base_user_login_label.html.haml | 2 | ||||
-rw-r--r-- | app/views/devise/sessions/new.html.haml | 5 | ||||
-rw-r--r-- | app/views/devise/sessions/two_factor.html.haml | 4 | ||||
-rw-r--r-- | app/views/devise/shared/_footer.html.haml | 1 | ||||
-rw-r--r-- | app/views/devise/shared/_omniauth_box.html.haml | 9 | ||||
-rw-r--r-- | app/views/devise/shared/_signup_box.html.haml | 16 | ||||
-rw-r--r-- | app/views/devise/shared/_signup_omniauth_provider_list.haml | 31 | ||||
-rw-r--r-- | app/views/devise/shared/_signup_omniauth_providers.haml | 5 |
11 files changed, 50 insertions, 31 deletions
diff --git a/app/views/devise/passwords/new.html.haml b/app/views/devise/passwords/new.html.haml index c90a9e7c672..1400ac9ca72 100644 --- a/app/views/devise/passwords/new.html.haml +++ b/app/views/devise/passwords/new.html.haml @@ -4,7 +4,7 @@ .devise-errors = render "devise/shared/error_messages", resource: resource .form-group.gl-px-5.gl-pt-5 - = f.label :email + = f.label :email, class: ("gl-mb-1" if Feature.enabled?(:restyle_login_page)) = 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.') diff --git a/app/views/devise/registrations/new.html.haml b/app/views/devise/registrations/new.html.haml index b6acb244384..b6719834358 100644 --- a/app/views/devise/registrations/new.html.haml +++ b/app/views/devise/registrations/new.html.haml @@ -11,5 +11,6 @@ = render 'devise/shared/signup_box', url: registration_path(resource_name), button_text: _('Register'), + borderless: Feature.enabled?(:restyle_login_page, @project), show_omniauth_providers: omniauth_enabled? && button_based_providers_enabled? = render 'devise/shared/sign_in_link' diff --git a/app/views/devise/sessions/_new_base.html.haml b/app/views/devise/sessions/_new_base.html.haml index 48b38861e6e..5a322a8f89b 100644 --- a/app/views/devise/sessions/_new_base.html.haml +++ b/app/views/devise/sessions/_new_base.html.haml @@ -3,7 +3,7 @@ = 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.gl-px-5 - = f.label :password, class: 'label-bold' + = f.label :password, class: "label-bold #{'gl-mb-1' if Feature.enabled?(:restyle_login_page, @project)}" = 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? .gl-px-5 @@ -23,3 +23,6 @@ .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' } + - if Gitlab::CurrentSettings.sign_in_text.present? && Feature.enabled?(:restyle_login_page, @project) + .gl-px-5 + = markdown_field(Gitlab::CurrentSettings.current_application_settings, :sign_in_text) 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 index 2aa66684cad..8a8b9f7a361 100644 --- a/app/views/devise/sessions/_new_base_user_login_label.html.haml +++ b/app/views/devise/sessions/_new_base_user_login_label.html.haml @@ -1 +1 @@ -= local_assigns[:form].label _('Username or email'), for: 'user_login', class: 'label-bold' += local_assigns[:form].label _('Username or email'), for: 'user_login', class: "label-bold #{'gl-mb-1' if Feature.enabled?(:restyle_login_page, @project)}" diff --git a/app/views/devise/sessions/new.html.haml b/app/views/devise/sessions/new.html.haml index 9a09f6bee38..f4db9ea5637 100644 --- a/app/views/devise/sessions/new.html.haml +++ b/app/views/devise/sessions/new.html.haml @@ -18,10 +18,9 @@ = _('No authentication methods configured.') - if allow_signup? - %p.gl-mt-3 + %p{ class: "gl-mt-3 #{'gl-text-center' if Feature.enabled?(:restyle_login_page, @project)}" } = _("Don't have an account yet?") - = link_to _("Register now"), new_registration_path(:user, invite_email: @invite_email), data: { qa_selector: 'register_link' } - + = link_to _("Register now"), new_registration_path(:user, invite_email: @invite_email), data: { qa_selector: 'register_link' }, class: "#{'gl-font-weight-bold' if Feature.enabled?(:restyle_login_page, @project)} " - if omniauth_enabled? && devise_mapping.omniauthable? && button_based_providers_enabled? .clearfix = render 'devise/shared/omniauth_box' diff --git a/app/views/devise/sessions/two_factor.html.haml b/app/views/devise/sessions/two_factor.html.haml index 77a2fda021f..fd20ff9a418 100644 --- a/app/views/devise/sessions/two_factor.html.haml +++ b/app/views/devise/sessions/two_factor.html.haml @@ -1,5 +1,5 @@ %div - = render 'devise/shared/tab_single', tab_title: _('Two-Factor Authentication') + = render 'devise/shared/tab_single', tab_title: _('Two-Factor Authentication') if Feature.disabled?(:restyle_login_page, @project) .login-box.gl-p-5 .login-body - if @user.two_factor_otp_enabled? @@ -7,7 +7,7 @@ - resource_params = params[resource_name].presence || params = f.hidden_field :remember_me, value: resource_params.fetch(:remember_me, 0) %div - = f.label _('Two-Factor Authentication code'), name: :otp_attempt + = f.label _('Two-Factor Authentication code'), name: :otp_attempt, class: Feature.enabled?(:restyle_login_page, @project) ? 'gl-mb-1' : '' = f.text_field :otp_attempt, class: 'form-control gl-form-input', required: true, autofocus: true, autocomplete: 'off', title: _('This field is required.'), data: { qa_selector: 'two_fa_code_field' } %p.form-text.text-muted.hint= _("Enter the code from the two-factor app on your mobile device. If you've lost your device, you may enter one of your recovery codes.") .prepend-top-20 diff --git a/app/views/devise/shared/_footer.html.haml b/app/views/devise/shared/_footer.html.haml index 5803107a8f7..10cfc07a719 100644 --- a/app/views/devise/shared/_footer.html.haml +++ b/app/views/devise/shared/_footer.html.haml @@ -5,4 +5,5 @@ = link_to _("Explore"), explore_root_path = link_to _("Help"), help_path = link_to _("About GitLab"), "https://#{ApplicationHelper.promo_host}" + = link_to _("Community forum"), ApplicationHelper.community_forum, target: '_blank', class: 'text-nowrap', rel: 'noopener noreferrer' = footer_message diff --git a/app/views/devise/shared/_omniauth_box.html.haml b/app/views/devise/shared/_omniauth_box.html.haml index 32b4a15517e..d67669352a6 100644 --- a/app/views/devise/shared/_omniauth_box.html.haml +++ b/app/views/devise/shared/_omniauth_box.html.haml @@ -1,20 +1,19 @@ - hide_remember_me = local_assigns.fetch(:hide_remember_me, false) - -.omniauth-container.gl-mt-5.gl-p-5 - %label.gl-font-weight-bold +%div{ class: Feature.enabled?(:restyle_login_page, @project) ? 'omniauth-container gl-mt-5 gl-p-5 gl-text-center gl-w-90p gl-ml-auto gl-mr-auto' : 'omniauth-container gl-mt-5 gl-p-5' } + %label{ class: Feature.enabled?(:restyle_login_page, @project) ? 'gl-font-weight-normal' : 'gl-font-weight-bold' } = _('Sign in with') - providers = enabled_button_based_providers .gl-display-flex.gl-justify-content-between.gl-flex-wrap - providers.each do |provider| - has_icon = provider_has_icon?(provider) - = button_to omniauth_authorize_path(:user, provider), id: "oauth-login-#{provider}", class: "btn gl-button btn-default gl-w-full js-oauth-login #{qa_class_for_provider(provider)}", form: { class: 'gl-w-full gl-mb-3' } do + = button_to omniauth_authorize_path(:user, provider), id: "oauth-login-#{provider}", class: "btn gl-button btn-default gl-ml-2 gl-mr-2 gl-mb-2 js-oauth-login #{qa_class_for_provider(provider)} #{'gl-w-full' if Feature.disabled?(:restyle_login_page, @project)}", form: { class: 'gl-w-full gl-mb-3' } do - if has_icon = provider_image_tag(provider) %span.gl-button-text = label_for_provider(provider) - unless hide_remember_me %fieldset - %label + %label{ class: Feature.enabled?(:restyle_login_page, @project) ? 'gl-font-weight-normal' : '' } = check_box_tag :remember_me, nil, false %span = _('Remember me') diff --git a/app/views/devise/shared/_signup_box.html.haml b/app/views/devise/shared/_signup_box.html.haml index 1868cfa06e9..991af1eea0c 100644 --- a/app/views/devise/shared/_signup_box.html.haml +++ b/app/views/devise/shared/_signup_box.html.haml @@ -13,7 +13,7 @@ = invisible_captcha nonce: true, autocomplete: SecureRandom.alphanumeric(12) .name.form-row .col.form-group - = f.label :first_name, _('First name'), for: 'new_user_first_name', class: 'label-bold' + = f.label :first_name, _('First name'), for: 'new_user_first_name', class: "label-bold #{'gl-mb-1' if Feature.enabled?(:restyle_login_page, @project)}" = f.text_field :first_name, class: 'form-control gl-form-input top js-block-emoji js-validate-length', data: { max_length: max_first_name_length, @@ -22,7 +22,7 @@ required: true, title: _('This field is required.') .col.form-group - = f.label :last_name, _('Last name'), for: 'new_user_last_name', class: 'label-bold' + = f.label :last_name, _('Last name'), for: 'new_user_last_name', class: "label-bold #{'gl-mb-1' if Feature.enabled?(:restyle_login_page, @project)}" = f.text_field :last_name, class: 'form-control gl-form-input top js-block-emoji js-validate-length', data: { max_length: max_last_name_length, @@ -31,7 +31,7 @@ required: true, title: _('This field is required.') .username.form-group - = f.label :username, class: 'label-bold' + = f.label :username, class: "label-bold #{'gl-mb-1' if Feature.enabled?(:restyle_login_page, @project)}" = f.text_field :username, class: 'form-control gl-form-input middle js-block-emoji js-validate-length js-validate-username', data: signup_username_data_attributes, @@ -42,18 +42,19 @@ %p.validation-success.gl-text-green-600.gl-field-error-ignore.gl-mt-2.field-validation.hide= _('Username is available.') %p.validation-pending.gl-field-error-ignore.gl-mt-2.field-validation.hide= _('Checking username availability...') .form-group - = f.label :email, class: 'label-bold' + = f.label :email, class: "label-bold #{'gl-mb-1' if Feature.enabled?(:restyle_login_page, @project)}" = f.email_field :email, value: @invite_email, class: 'form-control gl-form-input middle js-validate-email', data: { qa_selector: 'new_user_email_field' }, required: true, title: _('Please provide a valid email address.') - %p.gl-field-hint.text-secondary= _('We recommend a work email address.') + %p.validation-hint.gl-field-hint.text-secondary= _('We recommend a work email address.') + %p.validation-warning.gl-field-error-ignore.text-secondary.hide= _('This email address does not look right, are you sure you typed it correctly?') -# This is used for providing entry to Jihu on email verification = render_if_exists 'devise/shared/signup_email_additional_info' .form-group.gl-mb-5#password-strength - = f.label :password, class: 'label-bold' + = f.label :password, class: "label-bold #{'gl-mb-1' if Feature.enabled?(:restyle_login_page, @project)}" = f.password_field :password, class: 'form-control gl-form-input bottom js-password-complexity-validation', data: { qa_selector: 'new_user_password_field' }, @@ -69,6 +70,9 @@ = recaptcha_tags nonce: content_security_policy_nonce .submit-container.gl-mt-5 = f.submit button_text, class: 'btn gl-button btn-confirm gl-display-block gl-w-full', data: { qa_selector: 'new_user_register_button' } + - if Gitlab::CurrentSettings.sign_in_text.present? && Feature.enabled?(:restyle_login_page, @project) + .gl-pt-5 + = markdown_field(Gitlab::CurrentSettings.current_application_settings, :sign_in_text) = render 'devise/shared/terms_of_service_notice', button_text: button_text - if show_omniauth_providers && omniauth_providers_placement == :bottom = render 'devise/shared/signup_omniauth_providers' diff --git a/app/views/devise/shared/_signup_omniauth_provider_list.haml b/app/views/devise/shared/_signup_omniauth_provider_list.haml index 84aabbe0efd..8dc22674243 100644 --- a/app/views/devise/shared/_signup_omniauth_provider_list.haml +++ b/app/views/devise/shared/_signup_omniauth_provider_list.haml @@ -1,11 +1,22 @@ - register_omniauth_params = Feature.enabled?(:update_oauth_registration_flow) ? { intent: :register } : {} - -%label.gl-font-weight-bold - = _("Create an account using:") -.gl-display-flex.gl-justify-content-between.gl-flex-wrap - - providers.each do |provider| - = link_to omniauth_authorize_path(:user, provider, register_omniauth_params), method: :post, class: "btn gl-button btn-default gl-w-full gl-mb-3 js-oauth-login #{qa_class_for_provider(provider)}", data: { provider: provider }, id: "oauth-login-#{provider}" do - - if provider_has_icon?(provider) - = provider_image_tag(provider) - %span.gl-button-text - = label_for_provider(provider) +- if Feature.enabled?(:restyle_login_page, @project) + .gl-text-center.gl-pt-5 + %label.gl-font-weight-normal + = _("Create an account using:") + .gl-text-center.gl-w-90p.gl-ml-auto.gl-mr-auto + - providers.each do |provider| + = link_to omniauth_authorize_path(:user, provider, register_omniauth_params), method: :post, class: "btn gl-button btn-default gl-ml-2 gl-mr-2 gl-mb-2 js-oauth-login #{qa_class_for_provider(provider)}", data: { provider: provider }, id: "oauth-login-#{provider}" do + - if provider_has_icon?(provider) + = provider_image_tag(provider) + %span.gl-button-text + = label_for_provider(provider) +- else + %label.gl-font-weight-bold + = _("Create an account using:") + .gl-display-flex.gl-justify-content-between.gl-flex-wrap + - providers.each do |provider| + = link_to omniauth_authorize_path(:user, provider, register_omniauth_params), method: :post, class: "btn gl-button btn-default gl-w-full gl-mb-3 js-oauth-login #{qa_class_for_provider(provider)}", data: { provider: provider }, id: "oauth-login-#{provider}" do + - if provider_has_icon?(provider) + = provider_image_tag(provider) + %span.gl-button-text + = label_for_provider(provider) diff --git a/app/views/devise/shared/_signup_omniauth_providers.haml b/app/views/devise/shared/_signup_omniauth_providers.haml index 30a54ab86a6..d2a47974e01 100644 --- a/app/views/devise/shared/_signup_omniauth_providers.haml +++ b/app/views/devise/shared/_signup_omniauth_providers.haml @@ -1,3 +1,4 @@ -.omniauth-divider.gl-display-flex.gl-align-items-center - = _("or") +- if Feature.disabled?(:restyle_login_page, @project) + .omniauth-divider.gl-display-flex.gl-align-items-center + = _("or") = render 'devise/shared/signup_omniauth_provider_list', providers: enabled_button_based_providers |