summaryrefslogtreecommitdiff
path: root/app/views/devise
diff options
context:
space:
mode:
authorGitLab Bot <gitlab-bot@gitlab.com>2022-07-20 15:40:28 +0000
committerGitLab Bot <gitlab-bot@gitlab.com>2022-07-20 15:40:28 +0000
commitb595cb0c1dec83de5bdee18284abe86614bed33b (patch)
tree8c3d4540f193c5ff98019352f554e921b3a41a72 /app/views/devise
parent2f9104a328fc8a4bddeaa4627b595166d24671d0 (diff)
downloadgitlab-ce-b595cb0c1dec83de5bdee18284abe86614bed33b.tar.gz
Add latest changes from gitlab-org/gitlab@15-2-stable-eev15.2.0-rc42
Diffstat (limited to 'app/views/devise')
-rw-r--r--app/views/devise/passwords/edit.html.haml13
-rw-r--r--app/views/devise/sessions/_new_ldap.html.haml2
-rw-r--r--app/views/devise/sessions/email_verification.haml19
-rw-r--r--app/views/devise/sessions/new.html.haml2
-rw-r--r--app/views/devise/sessions/successful_verification.haml11
-rw-r--r--app/views/devise/shared/_signup_box.html.haml7
6 files changed, 45 insertions, 9 deletions
diff --git a/app/views/devise/passwords/edit.html.haml b/app/views/devise/passwords/edit.html.haml
index 56bd30fac73..498fb08969c 100644
--- a/app/views/devise/passwords/edit.html.haml
+++ b/app/views/devise/passwords/edit.html.haml
@@ -1,17 +1,18 @@
= render 'devise/shared/tab_single', tab_title: _('Change your password')
.login-box
.login-body
- = form_for(resource, as: resource_name, url: password_path(:user), html: { method: :put, class: 'gl-show-field-errors' }) do |f|
- .devise-errors
+ = form_for(resource, as: resource_name, url: password_path(:user), html: { method: :put, class: 'gl-show-field-errors gl-pt-5' }) do |f|
+ .devise-errors.gl-px-5
= render "devise/shared/error_messages", resource: resource
= f.hidden_field :reset_password_token
- .form-group
+ .form-group.gl-px-5
= f.label _('New password'), for: "user_password"
- = f.password_field :password, autocomplete: 'new-password', class: "form-control gl-form-input top", required: true, title: _('This field is required.'), data: { qa_selector: 'password_field'}
- .form-group
+ = f.password_field :password, autocomplete: 'new-password', class: "form-control gl-form-input top js-password-complexity-validation", required: true, title: _('This field is required.'), data: { qa_selector: 'password_field'}
+ = render_if_exists 'shared/password_requirements_list'
+ .form-group.gl-px-5
= f.label _('Confirm new password'), for: "user_password_confirmation"
= f.password_field :password_confirmation, autocomplete: 'new-password', class: "form-control gl-form-input bottom", title: _('This field is required.'), data: { qa_selector: 'password_confirmation_field' }, required: true
- .clearfix
+ .clearfix.gl-px-5.gl-pb-5
= f.submit _("Change your password"), class: "gl-button btn btn-confirm", data: { qa_selector: 'change_password_button' }
.clearfix.prepend-top-20
diff --git a/app/views/devise/sessions/_new_ldap.html.haml b/app/views/devise/sessions/_new_ldap.html.haml
index 4cde24f4afa..d06043c1750 100644
--- a/app/views/devise/sessions/_new_ldap.html.haml
+++ b/app/views/devise/sessions/_new_ldap.html.haml
@@ -15,5 +15,5 @@
= check_box_tag :remember_me, '1', false, id: 'remember_me'
%span= _('Remember me')
- .submit-container.move-submit-down.gl-px-5
+ .submit-container.move-submit-down.gl-px-5.gl-pb-5
= submit_tag submit_message, class: "gl-button btn btn-confirm", data: { qa_selector: 'sign_in_button' }
diff --git a/app/views/devise/sessions/email_verification.haml b/app/views/devise/sessions/email_verification.haml
new file mode 100644
index 00000000000..6cafcb941b4
--- /dev/null
+++ b/app/views/devise/sessions/email_verification.haml
@@ -0,0 +1,19 @@
+%div
+ = render 'devise/shared/tab_single', tab_title: s_('IdentityVerification|Help us protect your account')
+ .login-box.gl-p-5
+ .login-body
+ = form_for(resource, as: resource_name, url: session_path(resource_name), method: :post, html: { class: 'gl-show-field-errors' }) do |f|
+ %p
+ = s_("IdentityVerification|For added security, you'll need to verify your identity. We've sent a verification code to %{email}").html_safe % { email: "<strong>#{sanitize(obfuscated_email(resource.email))}</strong>".html_safe }
+ %div
+ = f.label :verification_token, s_('IdentityVerification|Verification code')
+ = f.text_field :verification_token, class: 'form-control gl-form-input', required: true, autofocus: true, autocomplete: 'off', title: s_('IdentityVerification|Please enter a valid code'), inputmode: 'numeric', maxlength: 6, pattern: '[0-9]{6}'
+ %p.gl-field-error.gl-mt-2
+ = resource.errors.full_messages.to_sentence
+ .gl-mt-5
+ = f.submit s_('IdentityVerification|Verify code'), class: 'gl-button btn btn-confirm'
+ - unless send_rate_limited?(resource)
+ = link_to s_('IdentityVerification|Resend code'), users_resend_verification_code_path, method: :post, class: 'form-control gl-button btn-link gl-mt-3 gl-mb-0'
+ %p.gl-p-5.gl-text-secondary
+ - support_link_start = '<a href="https://about.gitlab.com/support/" target="_blank" rel="noopener noreferrer">'.html_safe
+ = s_("IdentityVerification|If you've lost access to the email associated to this account or having trouble with the code, %{link_start}here are some other steps you can take.%{link_end}").html_safe % { link_start: support_link_start, link_end: '</a>'.html_safe }
diff --git a/app/views/devise/sessions/new.html.haml b/app/views/devise/sessions/new.html.haml
index c669f3efec6..9a09f6bee38 100644
--- a/app/views/devise/sessions/new.html.haml
+++ b/app/views/devise/sessions/new.html.haml
@@ -1,7 +1,9 @@
- page_title _("Sign in")
- content_for :page_specific_javascripts do
+ = render "layouts/google_tag_manager_head"
= render "layouts/one_trust"
= render "layouts/bizible"
+= render "layouts/google_tag_manager_body"
#signin-container
- if any_form_based_providers_enabled?
diff --git a/app/views/devise/sessions/successful_verification.haml b/app/views/devise/sessions/successful_verification.haml
new file mode 100644
index 00000000000..8af80fbdceb
--- /dev/null
+++ b/app/views/devise/sessions/successful_verification.haml
@@ -0,0 +1,11 @@
+= content_for :meta_tags do
+ %meta{ 'http-equiv': 'refresh', content: "3; url=#{@redirect_url}" }
+.gl-text-center.gl-max-w-62.gl-mx-auto
+ .svg-content.svg-80
+ = image_tag 'illustrations/success-sm.svg'
+ %h2
+ = s_('IdentityVerification|Verification successful')
+ %p.gl-pt-2
+ - redirect_url_start = '<a href="%{url}"">'.html_safe % { url: @redirect_url }
+ - redirect_url_end = '</a>'.html_safe
+ = html_escape(s_("IdentityVerification|Your account has been successfully verified. You'll be redirected to your account in just a moment or %{redirect_url_start}click here%{redirect_url_end} to refresh.")) % { redirect_url_start: redirect_url_start, redirect_url_end: redirect_url_end }
diff --git a/app/views/devise/shared/_signup_box.html.haml b/app/views/devise/shared/_signup_box.html.haml
index 57135c6cdfc..1868cfa06e9 100644
--- a/app/views/devise/shared/_signup_box.html.haml
+++ b/app/views/devise/shared/_signup_box.html.haml
@@ -45,21 +45,24 @@
= f.label :email, class: 'label-bold'
= f.email_field :email,
value: @invite_email,
- class: 'form-control gl-form-input middle',
+ 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.')
+ -# 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.password_field :password,
- class: 'form-control gl-form-input bottom',
+ class: 'form-control gl-form-input bottom js-password-complexity-validation',
data: { qa_selector: 'new_user_password_field' },
autocomplete: 'new-password',
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 }
+ = render_if_exists 'shared/password_requirements_list'
= render_if_exists 'devise/shared/phone_verification', form: f
%div
- if show_recaptcha_sign_up?