Welcome to mirror list, hosted at ThFree Co, Russian Federation.

gitlab.com/gitlab-org/gitlab-foss.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'app/views/devise')
-rw-r--r--app/views/devise/confirmations/new.html.haml3
-rw-r--r--app/views/devise/passwords/new.html.haml6
-rw-r--r--app/views/devise/registrations/new.html.haml3
-rw-r--r--app/views/devise/sessions/new.html.haml33
-rw-r--r--app/views/devise/sessions/two_factor.html.haml3
-rw-r--r--app/views/devise/shared/_footer.html.haml3
-rw-r--r--app/views/devise/shared/_omniauth_box.html.haml19
-rw-r--r--app/views/devise/shared/_omniauth_provider_button.haml7
-rw-r--r--app/views/devise/shared/_signup_box.html.haml5
-rw-r--r--app/views/devise/shared/_signup_omniauth_provider_button.haml14
-rw-r--r--app/views/devise/shared/_signup_omniauth_provider_list.haml24
-rw-r--r--app/views/devise/shared/_signup_omniauth_providers.haml3
-rw-r--r--app/views/devise/shared/_tabs_ldap.html.haml2
-rw-r--r--app/views/devise/shared/_terms_of_service_notice.html.haml18
-rw-r--r--app/views/devise/unlocks/new.html.haml7
15 files changed, 58 insertions, 92 deletions
diff --git a/app/views/devise/confirmations/new.html.haml b/app/views/devise/confirmations/new.html.haml
index 00652e8574a..0ce6d9b1095 100644
--- a/app/views/devise/confirmations/new.html.haml
+++ b/app/views/devise/confirmations/new.html.haml
@@ -8,7 +8,8 @@
= f.label :email
= f.email_field :email, class: "form-control gl-form-input", required: true, autocomplete: 'off', title: _('Please provide a valid email address.'), value: nil
.form-text.gl-text-secondary
- = _('Requires your primary GitLab email address.')
+ - emails_link = link_to('', profile_emails_url, target: '_blank', rel: 'noopener noreferrer')
+ = safe_format(s_('Requires your primary GitLab email address. If you want to confirm a secondary email address, go to %{emails_link_start}Emails%{emails_link_end}'), tag_pair(emails_link, :emails_link_start, :emails_link_end))
%div
- if recaptcha_enabled?
diff --git a/app/views/devise/passwords/new.html.haml b/app/views/devise/passwords/new.html.haml
index 227418e366d..536d4c9fd4b 100644
--- a/app/views/devise/passwords/new.html.haml
+++ b/app/views/devise/passwords/new.html.haml
@@ -16,8 +16,4 @@
= render Pajamas::ButtonComponent.new(type: :submit, variant: :confirm, block: true) do
= _('Reset password')
-- if Feature.enabled?(:restyle_login_page, @project)
- = render 'devise/shared/sign_in_link'
-- else
- .gl-mt-3
- = render 'devise/shared/sign_in_link'
+= render 'devise/shared/sign_in_link'
diff --git a/app/views/devise/registrations/new.html.haml b/app/views/devise/registrations/new.html.haml
index 29f1a1f398b..ec85c680f7f 100644
--- a/app/views/devise/registrations/new.html.haml
+++ b/app/views/devise/registrations/new.html.haml
@@ -11,9 +11,8 @@
= render 'devise/shared/signup_omniauth_providers'
.signup-page
- = render signup_box_template,
+ = render 'devise/shared/signup_box',
url: registration_path(resource_name, registration_path_params),
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.html.haml b/app/views/devise/sessions/new.html.haml
index e7ebe6d808c..728728ea653 100644
--- a/app/views/devise/sessions/new.html.haml
+++ b/app/views/devise/sessions/new.html.haml
@@ -9,26 +9,23 @@
= render_if_exists "layouts/google_tag_manager_body"
-#signin-container
+.js-non-oauth-login
- if any_form_based_providers_enabled?
= render 'devise/shared/tabs_ldap', render_signup_link: false
.tab-content
- if password_authentication_enabled_for_web? || ldap_sign_in_enabled? || crowd_enabled?
= render 'devise/shared/signin_box'
-
- -# Show a message if none of the mechanisms above are enabled
- - if !password_authentication_enabled_for_web? && !ldap_sign_in_enabled? && !(omniauth_enabled? && devise_mapping.omniauthable?)
- %div
- = _('No authentication methods configured.')
-
- - if Feature.enabled?(:restyle_login_page, @project) && Gitlab::CurrentSettings.current_application_settings.terms
- %p.gl-px-5
- = html_escape(s_("SignUp|By signing in you accept the %{link_start}Terms of Use and acknowledge the Privacy Statement and Cookie Policy%{link_end}.")) % { link_start: "<a href='#{terms_path}' target='_blank' rel='noreferrer noopener'>".html_safe,
- link_end: '</a>'.html_safe }
-
- - if allow_signup?
- %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: { testid: 'register-link' }
- - if omniauth_enabled? && devise_mapping.omniauthable? && button_based_providers_enabled?
- = render 'devise/shared/omniauth_box'
+-# Show a message if none of the mechanisms above are enabled
+- if !password_authentication_enabled_for_web? && !ldap_sign_in_enabled? && !(omniauth_enabled? && devise_mapping.omniauthable?)
+ %div
+ = _('No authentication methods configured.')
+- if Gitlab::CurrentSettings.current_application_settings.terms
+ %p.gl-px-5
+ = html_escape(s_("SignUp|By signing in you accept the %{link_start}Terms of Use and acknowledge the Privacy Statement and Cookie Policy%{link_end}.")) % { link_start: "<a href='#{terms_path}' target='_blank' rel='noreferrer noopener'>".html_safe,
+ link_end: '</a>'.html_safe }
+- if allow_signup?
+ %p.gl-mt-3.gl-text-center
+ = _("Don't have an account yet?")
+ = link_to _("Register now"), new_registration_path(:user, invite_email: @invite_email), data: { testid: 'register-link' }
+- if omniauth_enabled? && devise_mapping.omniauthable? && button_based_providers_enabled?
+ = 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 96f6f5cb095..454b89e40f8 100644
--- a/app/views/devise/sessions/two_factor.html.haml
+++ b/app/views/devise/sessions/two_factor.html.haml
@@ -1,8 +1,7 @@
-= 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_enabled?
- = gitlab_ui_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_enabled?}" }) do |f|
+ = gitlab_ui_form_for(resource, as: resource_name, url: session_path(resource_name), method: :post, html: { class: "gl-show-field-errors js-2fa-form #{'hidden' if @user.two_factor_webauthn_enabled?}", aria: { live: 'assertive' }}) do |f|
.form-group
= f.label :otp_attempt, _('Enter verification code')
= f.text_field :otp_attempt, class: 'form-control gl-form-input', required: true, autofocus: true, autocomplete: 'off', inputmode: 'numeric', title: _('This field is required.'), data: { testid: 'two-fa-code-field' }
diff --git a/app/views/devise/shared/_footer.html.haml b/app/views/devise/shared/_footer.html.haml
index c35e43b909e..44f34e3f342 100644
--- a/app/views/devise/shared/_footer.html.haml
+++ b/app/views/devise/shared/_footer.html.haml
@@ -7,5 +7,8 @@
= 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'
+ - if one_trust_enabled?
+ = render Pajamas::ButtonComponent.new(category: :tertiary, size: :small, button_options: { class: 'ot-sdk-show-settings' }) do
+ = _("Cookie Preferences")
= render 'devise/shared/language_switcher'
= footer_message
diff --git a/app/views/devise/shared/_omniauth_box.html.haml b/app/views/devise/shared/_omniauth_box.html.haml
index 45062745b77..8197abcc787 100644
--- a/app/views/devise/shared/_omniauth_box.html.haml
+++ b/app/views/devise/shared/_omniauth_box.html.haml
@@ -1,21 +1,16 @@
- render_remember_me = remember_me_enabled? && local_assigns.fetch(:render_remember_me, true)
-- restyle_login_page_enabled = Feature.enabled?(:restyle_login_page, @project)
-- if restyle_login_page_enabled && (any_form_based_providers_enabled? || password_authentication_enabled_for_web?)
+- if any_form_based_providers_enabled? || password_authentication_enabled_for_web?
.omniauth-divider.gl-display-flex.gl-align-items-center
= _("or sign in with")
-.gl-mt-5.gl-px-5{ class: restyle_login_page_enabled ? 'omniauth-container gl-text-center gl-ml-auto gl-mr-auto' : 'omniauth-container gl-py-5' }
- - if !restyle_login_page_enabled
- %label.gl-font-weight-bold
- = _('Sign in with')
+.gl-mt-5.gl-px-5.gl-text-center.gl-display-flex.gl-flex-direction-column.gl-gap-3.js-oauth-login
- enabled_button_based_providers.each do |provider|
- - has_icon = provider_has_icon?(provider)
- = button_to omniauth_authorize_path(:user, provider), id: "oauth-login-#{provider}", data: { testid: "#{test_id_for_provider(provider)}" }, class: "btn gl-button btn-default gl-mb-2 js-oauth-login gl-w-full", form: { class: restyle_login_page_enabled ? 'gl-mb-3' : 'gl-w-full gl-mb-3' } do
- - if has_icon
- = provider_image_tag(provider)
- %span.gl-button-text
- = label_for_provider(provider)
+ = render 'devise/shared/omniauth_provider_button',
+ href: omniauth_authorize_path(:user, provider),
+ provider: provider,
+ data: { testid: test_id_for_provider(provider) },
+ id: "oauth-login-#{provider}"
- if render_remember_me
= render Pajamas::CheckboxTagComponent.new(name: 'remember_me_omniauth', value: nil) do |c|
- c.with_label do
diff --git a/app/views/devise/shared/_omniauth_provider_button.haml b/app/views/devise/shared/_omniauth_provider_button.haml
new file mode 100644
index 00000000000..c33e2253bb1
--- /dev/null
+++ b/app/views/devise/shared/_omniauth_provider_button.haml
@@ -0,0 +1,7 @@
+- button_options = { class: local_assigns.fetch(:classes, nil) || nil, data: data, id: id }
+
+= render Pajamas::ButtonComponent.new(href: href, method: :post, form: true, block: true, button_options: button_options) 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_box.html.haml b/app/views/devise/shared/_signup_box.html.haml
index fb60b8c08eb..9eb0b773ebb 100644
--- a/app/views/devise/shared/_signup_box.html.haml
+++ b/app/views/devise/shared/_signup_box.html.haml
@@ -1,10 +1,7 @@
-- borderless ||= false
-
-.gl-mb-3.gl-p-4{ class: (borderless ? '' : 'gl-border-gray-100 gl-border-1 gl-border-solid gl-rounded-base') }
+.gl-mb-3.gl-p-4
= yield :omniauth_providers_top if show_omniauth_providers
= render 'devise/shared/signup_box_form',
button_text: button_text,
url: url,
show_omniauth_providers: omniauth_enabled? && button_based_providers_enabled?
-
diff --git a/app/views/devise/shared/_signup_omniauth_provider_button.haml b/app/views/devise/shared/_signup_omniauth_provider_button.haml
index 74f009a97d3..9870e90cfff 100644
--- a/app/views/devise/shared/_signup_omniauth_provider_button.haml
+++ b/app/views/devise/shared/_signup_omniauth_provider_button.haml
@@ -1,8 +1,6 @@
-- data = { provider: provider, track_action: "#{provider}_sso", track_label: tracking_label }
-- button_options = { class: 'js-oauth-login', data: data, id: "oauth-login-#{provider}" }
-
-= render Pajamas::ButtonComponent.new(href: href, method: :post, form: true, block: true, button_options: button_options) do
- - if provider_has_icon?(provider)
- = provider_image_tag(provider)
- %span.gl-button-text
- = label_for_provider(provider)
+= render 'devise/shared/omniauth_provider_button',
+ href: href,
+ provider: provider,
+ classes: 'js-track-omni-auth',
+ data: { provider: provider, track_action: "#{provider}_sso", track_label: tracking_label },
+ id: "oauth-login-#{provider}"
diff --git a/app/views/devise/shared/_signup_omniauth_provider_list.haml b/app/views/devise/shared/_signup_omniauth_provider_list.haml
index 9916d3fa026..c1026c0f431 100644
--- a/app/views/devise/shared/_signup_omniauth_provider_list.haml
+++ b/app/views/devise/shared/_signup_omniauth_provider_list.haml
@@ -1,21 +1,9 @@
-- if Feature.enabled?(:restyle_login_page, @project)
- .gl-text-center.gl-pt-5
- %label.gl-font-weight-normal
- = _("Register with:")
- .gl-display-flex.gl-flex-direction-column.gl-gap-3
- - providers.each do |provider|
- = render 'devise/shared/signup_omniauth_provider_button',
- href: omniauth_authorize_path(:user, provider, register_omniauth_params(local_assigns)),
- provider: provider,
- tracking_label: tracking_label
-
-
-- else
- %label.gl-font-weight-bold
- = _("Create an account using:")
+.gl-text-center.gl-pt-5
+ %label.gl-font-weight-normal
+ = _("Register with:")
.gl-display-flex.gl-flex-direction-column.gl-gap-3
- providers.each do |provider|
= render 'devise/shared/signup_omniauth_provider_button',
- href: omniauth_authorize_path(:user, provider, register_omniauth_params(local_assigns)),
- provider: provider,
- tracking_label: tracking_label
+ href: omniauth_authorize_path(:user, provider, register_omniauth_params(local_assigns)),
+ provider: provider,
+ tracking_label: tracking_label
diff --git a/app/views/devise/shared/_signup_omniauth_providers.haml b/app/views/devise/shared/_signup_omniauth_providers.haml
index 4e62c10b258..263e11ab341 100644
--- a/app/views/devise/shared/_signup_omniauth_providers.haml
+++ b/app/views/devise/shared/_signup_omniauth_providers.haml
@@ -1,6 +1,3 @@
-- 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,
tracking_label: oauth_tracking_label
diff --git a/app/views/devise/shared/_tabs_ldap.html.haml b/app/views/devise/shared/_tabs_ldap.html.haml
index e6bc38ba6dd..3e9d60da228 100644
--- a/app/views/devise/shared/_tabs_ldap.html.haml
+++ b/app/views/devise/shared/_tabs_ldap.html.haml
@@ -1,7 +1,7 @@
- show_password_form = local_assigns.fetch(:show_password_form, password_authentication_enabled_for_web?)
- render_signup_link = local_assigns.fetch(:render_signup_link, true)
-%ul.nav-links.new-session-tabs.nav-tabs.nav{ class: "#{'custom-provider-tabs' if any_form_based_providers_enabled?} #{'nav-links-unboxed' if Feature.enabled?(:restyle_login_page, @project)}" }
+%ul.nav-links.new-session-tabs.nav-tabs.nav.nav-links-unboxed
- if crowd_enabled?
%li.nav-item
= link_to _("Crowd"), "#crowd", class: "nav-link #{active_when(form_based_auth_provider_has_active_class?(:crowd))}", 'data-toggle' => 'tab', role: 'tab'
diff --git a/app/views/devise/shared/_terms_of_service_notice.html.haml b/app/views/devise/shared/_terms_of_service_notice.html.haml
index 3749dc66a04..5d5a5a64c29 100644
--- a/app/views/devise/shared/_terms_of_service_notice.html.haml
+++ b/app/views/devise/shared/_terms_of_service_notice.html.haml
@@ -1,17 +1,9 @@
- return unless Gitlab::CurrentSettings.current_application_settings.enforce_terms?
%p.gl-text-gray-500.gl-mt-5.gl-mb-0
- - if Feature.enabled?(:restyle_login_page, @project)
- - if Gitlab.com?
- = html_escape(s_("SignUp|By clicking %{button_text} or registering through a third party you accept the GitLab%{link_start} Terms of Use and acknowledge the Privacy Statement and Cookie Policy%{link_end}")) % { button_text: button_text,
- link_start: "<a href='#{terms_path}' target='_blank' rel='noreferrer noopener'>".html_safe, link_end: '</a>'.html_safe }
- - else
- = html_escape(s_("SignUp|By clicking %{button_text} or registering through a third party you accept the%{link_start} Terms of Use and acknowledge the Privacy Statement and Cookie Policy%{link_end}")) % { button_text: button_text,
- link_start: "<a href='#{terms_path}' target='_blank' rel='noreferrer noopener'>".html_safe, link_end: '</a>'.html_safe }
+ - if Gitlab.com?
+ = html_escape(s_("SignUp|By clicking %{button_text} or registering through a third party you accept the GitLab%{link_start} Terms of Use and acknowledge the Privacy Statement and Cookie Policy%{link_end}")) % { button_text: button_text,
+ link_start: "<a href='#{terms_path}' target='_blank' rel='noreferrer noopener'>".html_safe, link_end: '</a>'.html_safe }
- else
- - if Gitlab.com?
- = html_escape(s_("SignUp|By clicking %{button_text}, I agree that I have read and accepted the GitLab %{link_start}Terms of Use and Privacy Statement%{link_end}")) % { button_text: button_text,
- link_start: "<a href='#{terms_path}' target='_blank' rel='noreferrer noopener'>".html_safe, link_end: '</a>'.html_safe }
- - else
- = html_escape(s_("SignUp|By clicking %{button_text}, I agree that I have read and accepted the %{link_start}Terms of Use and Privacy Statement%{link_end}")) % { button_text: button_text,
- link_start: "<a href='#{terms_path}' target='_blank' rel='noreferrer noopener'>".html_safe, link_end: '</a>'.html_safe }
+ = html_escape(s_("SignUp|By clicking %{button_text} or registering through a third party you accept the%{link_start} Terms of Use and acknowledge the Privacy Statement and Cookie Policy%{link_end}")) % { button_text: button_text,
+ link_start: "<a href='#{terms_path}' target='_blank' rel='noreferrer noopener'>".html_safe, link_end: '</a>'.html_safe }
diff --git a/app/views/devise/unlocks/new.html.haml b/app/views/devise/unlocks/new.html.haml
index 8bae27020c2..393f42cd197 100644
--- a/app/views/devise/unlocks/new.html.haml
+++ b/app/views/devise/unlocks/new.html.haml
@@ -11,8 +11,5 @@
= render Pajamas::ButtonComponent.new(type: :submit, variant: :confirm, block: true) do
= _('Resend unlock instructions')
-- if Feature.enabled?(:restyle_login_page, @project)
- = render 'devise/shared/sign_in_link'
-- else
- .gl-mt-3
- = render 'devise/shared/sign_in_link'
+= render 'devise/shared/sign_in_link'
+