diff options
Diffstat (limited to 'app/views/devise/shared')
5 files changed, 39 insertions, 23 deletions
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 |