-
Notifications
You must be signed in to change notification settings - Fork 161
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
LG-14748 Add in person warning to password reset email
changelog: User-facing Improvements, In-person Proofing, Add warning banner to password reset email when the user has an in-progress in-person enrollment
- Loading branch information
1 parent
345afa2
commit a8fc357
Showing
10 changed files
with
194 additions
and
2 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
11 changes: 11 additions & 0 deletions
11
app/views/user_mailer/shared/_in_person_warning_banner.html.erb
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
<table class="usa-alert usa-alert--warning margin-bottom-4"> | ||
<tbody> | ||
<tr> | ||
<td style="width:16px;"> | ||
<%= image_tag('email/warning.png', width: 16, height: 14, alt: 'warning icon', style: 'margin-top: 5px;') %> | ||
</td> | ||
<td> | ||
<p><%= t('user_mailer.reset_password_instructions.in_person_warning_description_html') %></p> | ||
</td> | ||
</tr> | ||
</table> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -26,6 +26,14 @@ def reset_password_instructions_with_pending_gpo_letter | |
) | ||
end | ||
|
||
def reset_password_instructions_with_pending_in_person_warning | ||
UserMailer.with( | ||
user: user_with_pending_in_person_profile, email_address: email_address_record, | ||
).reset_password_instructions( | ||
token: SecureRandom.hex, request_id: SecureRandom.hex, | ||
) | ||
end | ||
|
||
def password_changed | ||
UserMailer.with(user: user, email_address: email_address_record). | ||
password_changed(disavowal_token: SecureRandom.hex) | ||
|
@@ -313,6 +321,19 @@ def user_with_pending_gpo_letter | |
raw_user | ||
end | ||
|
||
def user_with_pending_in_person_profile | ||
raw_user = user | ||
in_person_pending_profile = unsaveable( | ||
Profile.new( | ||
user: raw_user, | ||
active: false, | ||
in_person_verification_pending_at: Time.zone.now, | ||
), | ||
) | ||
raw_user.send(:instance_variable_set, :@pending_profile, in_person_pending_profile) | ||
raw_user | ||
end | ||
|
||
def email_address | ||
'[email protected]' | ||
end | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters