Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat(customers): CUST-1837 Add reCAPTCHA to password reset for Corner… #2164

Merged
merged 3 commits into from
Feb 22, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
- Cornerstone performance optimizations: blocking scripts delaying DomContentLoaded. [#2158](https://github.com/bigcommerce/cornerstone/pull/2158)
- Cornerstone performance optimizations: remove unused fonts. [#2176](https://github.com/bigcommerce/cornerstone/pull/2176)
- Update stencil-utils package. [#2157](https://github.com/bigcommerce/cornerstone/pull/2157)
- Add google recaptcha to password reset request page [#2164](https://github.com/bigcommerce/cornerstone/pull/2164)

## 6.2.0 (12-13-2021)
- Fix tooltip on close button of modal is shifted. [#2148](https://github.com/bigcommerce/cornerstone/pull/2148)
Expand Down
18 changes: 18 additions & 0 deletions assets/scss/components/citadel/forms/_forms.scss
Original file line number Diff line number Diff line change
Expand Up @@ -236,6 +236,24 @@
}
}

.form-prefixPostfix--centeredColumn {
&.wrap {
flex-direction: column;
}

.g-recaptcha {
margin: 2em auto 0;
}

.form-prefixPostfix-button--postfix {

@include breakpoint("large") {
margin: 1em 0 spacing("half");
}
}

}

.form-prefixPostfix-button--postfix {
margin: spacing("half") 0 0;
order: 1; // 1
Expand Down
8 changes: 5 additions & 3 deletions templates/pages/auth/forgot-password.html
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
{{inject 'recaptchaTitle' (lang 'forgot_password.recaptcha_title')}}
{{#partial "page"}}
<div class="account account--fixedSmall">
{{> components/common/breadcrumbs breadcrumbs=breadcrumbs}}
Expand All @@ -8,9 +9,10 @@ <h2 class="page-heading">{{lang 'reset_password.heading' }}</h2>
{{/if}}
<form action="{{urls.auth.send_password_email}}" class="form forgot-password-form" method="post">
{{inject 'useValidEmail' (lang 'forms.validate.common.email_address')}}
<label class="form-label" for="email">{{lang 'common.email_address'}}</label>
<div class="form-prefixPostfix wrap">
<input class="form-input" name="email" id="email" type="email" formnovalidate>
<div class="form-prefixPostfix form-prefixPostfix--centeredColumn wrap">
<label class="form-label" for="email">{{lang 'common.email_address'}}</label>
<input class="form-input" name="email" id="email" type="email" formnovalidate>
{{{ forms.forgot_password.recaptcha.markup}}}
<input type="submit" class="button button--primary form-prefixPostfix-button--postfix" value="{{lang 'reset_password.heading' }}">
</div>
</form>
Expand Down