diff options
Diffstat (limited to 'app/views/devise')
-rw-r--r-- | app/views/devise/registrations/new.html.haml | 2 | ||||
-rw-r--r-- | app/views/devise/sessions/_new_ldap.html.haml | 8 | ||||
-rw-r--r-- | app/views/devise/shared/_omniauth_box.html.haml | 4 | ||||
-rw-r--r-- | app/views/devise/shared/_signin_box.html.haml | 2 | ||||
-rw-r--r-- | app/views/devise/shared/_tabs_ldap.html.haml | 11 | ||||
-rw-r--r-- | app/views/devise/shared/_tabs_normal.html.haml | 7 |
6 files changed, 23 insertions, 11 deletions
diff --git a/app/views/devise/registrations/new.html.haml b/app/views/devise/registrations/new.html.haml index 232dffa28b4..9fb5e27b692 100644 --- a/app/views/devise/registrations/new.html.haml +++ b/app/views/devise/registrations/new.html.haml @@ -8,7 +8,7 @@ = _("GitLab is a single application for the entire software development lifecycle. From project planning and source code management to CI/CD, monitoring, and security.") .col-lg-5.order-12 .text-center.mb-3 - %h2.font-weight-bold.gl-font-size-20= _('Register for GitLab') + %h2.font-weight-bold.gl-font-size-20-deprecated-no-really-do-not-use-me= _('Register for GitLab') = render 'devise/shared/experimental_separate_sign_up_flow_box' = render 'devise/shared/sign_in_link' - else diff --git a/app/views/devise/sessions/_new_ldap.html.haml b/app/views/devise/sessions/_new_ldap.html.haml index 31c4bb0e33e..3fc99b6a47d 100644 --- a/app/views/devise/sessions/_new_ldap.html.haml +++ b/app/views/devise/sessions/_new_ldap.html.haml @@ -1,4 +1,6 @@ - server = local_assigns.fetch(:server) +- hide_remember_me = local_assigns.fetch(:hide_remember_me, false) +- 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 @@ -7,9 +9,11 @@ .form-group = label_tag :password = password_field_tag :password, nil, { class: "form-control bottom", title: "This field is required.", data: { qa_selector: 'password_field' }, required: true } - - if devise_mapping.rememberable? + - if !hide_remember_me && devise_mapping.rememberable? .remember-me %label{ for: "remember_me" } = check_box_tag :remember_me, '1', false, id: 'remember_me' %span Remember me - = submit_tag "Sign in", class: "btn-success btn", data: { qa_selector: 'sign_in_button' } + + .submit-container.move-submit-down + = submit_tag submit_message, class: "btn-success btn", data: { qa_selector: 'sign_in_button' } diff --git a/app/views/devise/shared/_omniauth_box.html.haml b/app/views/devise/shared/_omniauth_box.html.haml index cca0f756e76..5c3e4ccbfe5 100644 --- a/app/views/devise/shared/_omniauth_box.html.haml +++ b/app/views/devise/shared/_omniauth_box.html.haml @@ -1,3 +1,5 @@ +- hide_remember_me = local_assigns.fetch(:hide_remember_me, false) + .omniauth-container.prepend-top-15 %label.label-bold.d-block Sign in with @@ -10,7 +12,7 @@ = provider_image_tag(provider) %span = label_for_provider(provider) - - unless defined?(hide_remember_me) && hide_remember_me + - unless hide_remember_me %fieldset.remember-me %label = check_box_tag :remember_me, nil, false, class: 'remember-me-checkbox' diff --git a/app/views/devise/shared/_signin_box.html.haml b/app/views/devise/shared/_signin_box.html.haml index 6ddb7e1ac48..c0b005bac77 100644 --- a/app/views/devise/shared/_signin_box.html.haml +++ b/app/views/devise/shared/_signin_box.html.haml @@ -6,7 +6,7 @@ = render_if_exists 'devise/sessions/new_kerberos_tab' - - @ldap_servers.each_with_index do |server, i| + - ldap_servers.each_with_index do |server, i| .login-box.tab-pane{ id: "#{server['provider_name']}", role: 'tabpanel', class: active_when(i.zero? && form_based_auth_provider_has_active_class?(:ldapmain)) } .login-body = render 'devise/sessions/new_ldap', server: server diff --git a/app/views/devise/shared/_tabs_ldap.html.haml b/app/views/devise/shared/_tabs_ldap.html.haml index b8f0cd2a91a..eb14ad6006f 100644 --- a/app/views/devise/shared/_tabs_ldap.html.haml +++ b/app/views/devise/shared/_tabs_ldap.html.haml @@ -1,17 +1,20 @@ +- 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?) } - 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' = render_if_exists "devise/shared/kerberos_tab" - - @ldap_servers.each_with_index do |server, i| + - ldap_servers.each_with_index do |server, i| %li.nav-item = link_to server['label'], "##{server['provider_name']}", class: "nav-link #{active_when(i.zero? && form_based_auth_provider_has_active_class?(:ldapmain))}", data: { toggle: 'tab', qa_selector: 'ldap_tab' } = render_if_exists 'devise/shared/tab_smartcard' - - if password_authentication_enabled_for_web? + - if show_password_form %li.nav-item - = link_to 'Standard', '#login-pane', class: 'nav-link', data: { toggle: 'tab', qa_selector: 'standard_tab' } - - if allow_signup? + = link_to _('Standard'), '#login-pane', class: 'nav-link', data: { toggle: 'tab', qa_selector: 'standard_tab' } + - if render_signup_link && allow_signup? %li.nav-item = link_to 'Register', '#register-pane', class: 'nav-link', data: { toggle: 'tab', qa_selector: 'register_tab' } diff --git a/app/views/devise/shared/_tabs_normal.html.haml b/app/views/devise/shared/_tabs_normal.html.haml index b6a1b8805ee..a2d5a8be625 100644 --- a/app/views/devise/shared/_tabs_normal.html.haml +++ b/app/views/devise/shared/_tabs_normal.html.haml @@ -1,6 +1,9 @@ +- 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' } Sign in - - if allow_signup? + %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_event: 'click_button', track_value: '', toggle: 'tab', qa_selector: 'register_tab' }, role: 'tab' } Register |