summaryrefslogtreecommitdiff
path: root/app/views/devise
diff options
context:
space:
mode:
Diffstat (limited to 'app/views/devise')
-rw-r--r--app/views/devise/confirmations/almost_there.haml6
-rw-r--r--app/views/devise/shared/_signup_box.html.haml9
-rw-r--r--app/views/devise/shared/_signup_omniauth_provider_list.haml9
-rw-r--r--app/views/devise/shared/_signup_omniauth_providers.haml12
-rw-r--r--app/views/devise/shared/_signup_omniauth_providers_top.haml3
-rw-r--r--app/views/devise/unlocks/new.html.haml2
6 files changed, 24 insertions, 17 deletions
diff --git a/app/views/devise/confirmations/almost_there.haml b/app/views/devise/confirmations/almost_there.haml
index a1fcbea5bf2..bf321bb690b 100644
--- a/app/views/devise/confirmations/almost_there.haml
+++ b/app/views/devise/confirmations/almost_there.haml
@@ -1,7 +1,7 @@
-.well-confirmation.text-center.append-bottom-20
+.well-confirmation.text-center.gl-mb-6
%h1.gl-mt-0
Almost there...
- %p.lead.append-bottom-20
+ %p.lead.gl-mb-6
Please check your email to confirm your account
%hr
- if Gitlab::CurrentSettings.after_sign_up_text.present?
@@ -9,6 +9,6 @@
= markdown_field(Gitlab::CurrentSettings, :after_sign_up_text)
%p.text-center
No confirmation email received? Please check your spam folder or
-.append-bottom-20.prepend-top-20.text-center
+.gl-mb-6.prepend-top-20.text-center
%a.btn.btn-lg.btn-success{ href: new_user_confirmation_path }
Request new confirmation email
diff --git a/app/views/devise/shared/_signup_box.html.haml b/app/views/devise/shared/_signup_box.html.haml
index 0dc98001881..3c4cbbbc3bd 100644
--- a/app/views/devise/shared/_signup_box.html.haml
+++ b/app/views/devise/shared/_signup_box.html.haml
@@ -1,7 +1,12 @@
- max_first_name_length = max_last_name_length = 127
- max_username_length = 255
- min_username_length = 2
+- omniauth_providers_placement ||= :bottom
+
.gl-mb-3.gl-p-4.gl-border-gray-100.gl-border-1.gl-border-solid.gl-rounded-base
+ - if show_omniauth_providers && omniauth_providers_placement == :top
+ = render 'devise/shared/signup_omniauth_providers_top'
+
= form_for(resource, as: "new_#{resource_name}", url: url, html: { class: 'new_user gl-show-field-errors', 'aria-live' => 'assertive' }) do |f|
.devise-errors
= render 'devise/shared/error_messages', resource: resource
@@ -23,7 +28,7 @@
.form-group
= f.label :email, class: 'label-bold'
= f.email_field :email, value: @invite_email, class: 'form-control middle', data: { qa_selector: 'new_user_email_field' }, required: true, title: _('Please provide a valid email address.')
- .form-group.append-bottom-20#password-strength
+ .form-group.gl-mb-5#password-strength
= f.label :password, class: 'label-bold'
= f.password_field :password, class: 'form-control bottom', data: { qa_selector: 'new_user_password_field' }, required: true, pattern: ".{#{@minimum_password_length},}", title: s_('SignUp|Minimum length is %{minimum_password_length} characters.') % { minimum_password_length: @minimum_password_length }
%p.gl-field-hint.text-secondary= s_('SignUp|Minimum length is %{minimum_password_length} characters.') % { minimum_password_length: @minimum_password_length }
@@ -33,5 +38,5 @@
.submit-container
= f.submit button_text, class: 'btn gl-button btn-success', data: { qa_selector: 'new_user_register_button' }
= render 'devise/shared/terms_of_service_notice'
- - if show_omniauth_providers
+ - 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
new file mode 100644
index 00000000000..ece886b3cdd
--- /dev/null
+++ b/app/views/devise/shared/_signup_omniauth_provider_list.haml
@@ -0,0 +1,9 @@
+%label.label-bold.d-block
+ = _("Create an account using:")
+.d-flex.justify-content-between.flex-wrap
+ - providers.each do |provider|
+ = link_to omniauth_authorize_path(:user, provider), method: :post, class: "btn gl-button gl-display-flex gl-align-items-center gl-text-left gl-mb-2 gl-p-2 omniauth-btn oauth-login #{qa_class_for_provider(provider)}", id: "oauth-login-#{provider}" do
+ - if provider_has_icon?(provider)
+ = provider_image_tag(provider)
+ %span.ml-2
+ = 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 68098f1865b..a653d44d694 100644
--- a/app/views/devise/shared/_signup_omniauth_providers.haml
+++ b/app/views/devise/shared/_signup_omniauth_providers.haml
@@ -1,13 +1,3 @@
.omniauth-divider.d-flex.align-items-center.text-center
= _("or")
-%label.label-bold.d-block
- = _("Create an account using:")
-- providers = enabled_button_based_providers
-.d-flex.justify-content-between.flex-wrap
- - providers.each do |provider|
- - has_icon = provider_has_icon?(provider)
- = link_to omniauth_authorize_path(:user, provider), method: :post, class: "gl-button btn d-flex align-items-center omniauth-btn text-left oauth-login mb-2 p-2 #{qa_class_for_provider(provider)}", id: "oauth-login-#{provider}" do
- - if has_icon
- = provider_image_tag(provider)
- %span.ml-2
- = label_for_provider(provider)
+= render 'devise/shared/signup_omniauth_provider_list', providers: enabled_button_based_providers
diff --git a/app/views/devise/shared/_signup_omniauth_providers_top.haml b/app/views/devise/shared/_signup_omniauth_providers_top.haml
new file mode 100644
index 00000000000..1deacad88c4
--- /dev/null
+++ b/app/views/devise/shared/_signup_omniauth_providers_top.haml
@@ -0,0 +1,3 @@
+= render 'devise/shared/signup_omniauth_provider_list', providers: experiment_enabled_button_based_providers
+.omniauth-divider.d-flex.align-items-center.text-center
+ = _("or")
diff --git a/app/views/devise/unlocks/new.html.haml b/app/views/devise/unlocks/new.html.haml
index 96f4f07176e..d145ac3f359 100644
--- a/app/views/devise/unlocks/new.html.haml
+++ b/app/views/devise/unlocks/new.html.haml
@@ -4,7 +4,7 @@
= form_for(resource, as: resource_name, url: unlock_path(resource_name), html: { method: :post, class: 'gl-show-field-errors' }) do |f|
.devise-errors
= render "devise/shared/error_messages", resource: resource
- .form-group.append-bottom-20
+ .form-group.gl-mb-6
= f.label :email
= f.email_field :email, class: 'form-control', autofocus: 'autofocus', autocapitalize: 'off', autocorrect: 'off', title: 'Please provide a valid email address.'
.clearfix