Uncommented some of Pipedrive's templates for password reset warning. WilliamSonoma notes, Aubrey check in.

This commit is contained in:
Norm Rasmussen
2023-10-05 17:26:26 -04:00
parent a610b52c6e
commit 8cd8a61d34
26 changed files with 541 additions and 798 deletions

View File

@ -47,7 +47,7 @@
placeholder="Work email"
>
</div>
<div class="np-form-field">
<div class="np-form-field password-field">
<svg class="login-icon" width="16" height="18" viewBox="0 0 16 18" fill="none" xmlns="http://www.w3.org/2000/svg">
<path fill-rule="evenodd" clip-rule="evenodd" d="M8 1.75C6.20507 1.75 4.75 3.20507 4.75 5V6.25H11.25V5C11.25 3.20507 9.79493 1.75 8 1.75ZM12.75 6.25V5C12.75 2.37665 10.6234 0.25 8 0.25C5.37665 0.25 3.25 2.37665 3.25 5V6.25H2C1.0335 6.25 0.25 7.0335 0.25 8V16C0.25 16.9665 1.0335 17.75 2 17.75H14C14.9665 17.75 15.75 16.9665 15.75 16V8C15.75 7.0335 14.9665 6.25 14 6.25H12.75ZM2 7.75C1.86193 7.75 1.75 7.86193 1.75 8V16C1.75 16.1381 1.86193 16.25 2 16.25H14C14.1381 16.25 14.25 16.1381 14.25 16V8C14.25 7.86193 14.1381 7.75 14 7.75H2ZM5.75 12C5.75 10.7574 6.75736 9.75 8 9.75C9.24264 9.75 10.25 10.7574 10.25 12C10.25 13.2426 9.24264 14.25 8 14.25C6.75736 14.25 5.75 13.2426 5.75 12ZM8 11.25C7.58579 11.25 7.25 11.5858 7.25 12C7.25 12.4142 7.58579 12.75 8 12.75C8.41421 12.75 8.75 12.4142 8.75 12C8.75 11.5858 8.41421 11.25 8 11.25Z" fill="#192435"/>
</svg>
@ -57,8 +57,11 @@
name="learner[password]"
id="learner_password"
placeholder="Password"
onkeyup="passwordValidator()"
>
</div>
<span class="bad-password" style="color: red; display: none; font-size: 12px; line-height: 1.25;">Invalid Password! Make sure your password is 8+ characters long and includes at least one upper case letter, lower case letter, number, and special character!</span>
<span class="bad-password" style="color: red; display: none; font-size: 12px; line-height: 1.25;"></span>
<button type="submit" class="button-1 button-large np-form-action">
{% t shared.sign_up %}
</button>
@ -143,6 +146,23 @@
</style>
<script>
let passwordValidator = () => {
//console.log(event.target.value);
const regexExp = /^(?=.*[a-z])(?=.*[A-Z])(?=.*\d)(?=.*[@$!%*?&.#^+-/()=<>~`:;'",])[A-Za-z\d@$!%*?&.#^+-/()=<>~`:;'",]{8,}$/;
if(event.target.value.length > 7){
if(regexExp.test(event.target.value) == false){
//console.log('BAD PASSWORD')
document.querySelector('.password-field').style.borderBottomColor = 'red';
document.querySelector('.bad-password').style.display = 'block';
} else {
//console.log('VALID PASSWORD')
document.querySelector('.password-field').style.borderBottomColor = '#E4E6E9';
document.querySelector('.bad-password').style.display = 'none';
}
}
}
addEventListener('DOMContentLoaded', () => {
switch (window.localStorage.getItem('academy-language')) {
case 'en':
@ -173,4 +193,4 @@
break;
}
})
</script>
</script>