-
Notifications
You must be signed in to change notification settings - Fork 166
LG-6341: Create template for success email and send it when status is set to passed #6665
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
Merged
Merged
Changes from all commits
Commits
Show all changes
19 commits
Select commit
Hold shift + click to select a range
2219f81
add styles to email stylesheet
4bfc8e3
add heading strings
d285913
add verified email strings
5d4c674
add route
0d55442
create verified email and show in preview
d281bf5
add send verified email to jobs
f2be35b
lint fix
d90efbb
fix urls? and normalize yaml
316d4e5
can hide title in layout, added to new template
990dbea
use rasterized header image & add padding
8749b78
use the standard email button size
9b75ba3
use existing sample enrollment data for preview
77580c7
send email in job, remove user's first name
3330d53
rename presenter methods
ed69272
tests
7cf9bd7
add changelog
7ecde01
fix i18n test failures
b8d45b6
Merge remote-tracking branch 'origin/main' into shannon/lg-6341-verif…
24f02d3
LG-6434: Create template for "Your identity could not be verified" em…
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file contains hidden or 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 hidden or 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 hidden or 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
22 changes: 22 additions & 0 deletions
22
app/presenters/idv/in_person/verification_results_email_presenter.rb
This file contains hidden or 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,22 @@ | ||
| module Idv | ||
| module InPerson | ||
| class VerificationResultsEmailPresenter | ||
| # update to user's time zone when out of pilot | ||
| USPS_SERVER_TIMEZONE = ActiveSupport::TimeZone['America/New_York'] | ||
|
|
||
| def initialize(enrollment:) | ||
| @enrollment = enrollment | ||
| end | ||
|
|
||
| def location_name | ||
| @enrollment.selected_location_details['name'] | ||
| end | ||
|
|
||
| def formatted_verified_date | ||
| @enrollment.status_updated_at.in_time_zone(USPS_SERVER_TIMEZONE).strftime( | ||
| I18n.t('time.formats.event_date'), | ||
| ) | ||
| end | ||
| end | ||
| end | ||
| end |
This file contains hidden or 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
38 changes: 38 additions & 0 deletions
38
app/views/shared/_in-person-verification-results-email-lower.html.erb
This file contains hidden or 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,38 @@ | ||
| <div class="margin-top-5"> | ||
| <table class="button expanded large radius"> | ||
| <tbody> | ||
| <tr> | ||
| <td> | ||
| <table> | ||
| <tbody> | ||
| <tr> | ||
| <td style="text-align: center"> | ||
| <%= link_to t('user_mailer.in_person_verified.sign_in'), | ||
| idv_url, | ||
| target: '_blank', | ||
| class: 'float-center', | ||
| rel: 'noopener' %> | ||
| </td> | ||
| </tr> | ||
| </tbody> | ||
| </table> | ||
| </td> | ||
| <td class="expander"></td> | ||
| </tr> | ||
| </tbody> | ||
| </table> | ||
| </div> | ||
|
|
||
| <p> | ||
| <%= link_to idv_url, idv_url, target: '_blank', rel: 'noopener' %> | ||
| </p> | ||
|
|
||
| <div class="s16"> | ||
| <br /> | ||
| <%= t( | ||
| 'user_mailer.in_person_verified.warning_contact_us_html', | ||
| contact_us_url: MarketingSite.contact_url, | ||
| sign_in_url: idv_url, | ||
| ) | ||
| %> | ||
| </div> |
This file contains hidden or 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,20 @@ | ||
| <div class="s16"> | ||
| <%= t('user_mailer.in_person_verified.greeting') %><br> | ||
| <p class="s16"> | ||
| <%= t( | ||
| 'user_mailer.in_person_failed.intro', | ||
| location: @presenter.location_name, | ||
| date: @presenter.formatted_verified_date, | ||
| ) %> | ||
| </p> | ||
| <p class="s16"> | ||
| <%= t('user_mailer.in_person_failed.body', app_name: APP_NAME) %><br><br /> | ||
| </p> | ||
| <strong><%= t('user_mailer.in_person_failed.verifying_identity') %></strong><br> | ||
| <ul class="usa-list"> | ||
| <li><%= t('user_mailer.in_person_failed.verifying_step_not_expired') %></li> | ||
| <li><%= t('user_mailer.in_person_failed.verifying_step_proof_of_address') %></li> | ||
| </ul> | ||
| </div> | ||
|
|
||
| <%= render 'shared/in-person-verification-results-email-lower' %> |
This file contains hidden or 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,19 @@ | ||
| <%= image_tag( | ||
| 'email/user-signup-ial2.png', | ||
| width: 140, | ||
| height: 177, | ||
| alt: '', | ||
| class: 'float-center padding-bottom-4', | ||
| ) %> | ||
| <h4><%= message.subject %></h4> | ||
| <p class="s16"> | ||
| <%= t('user_mailer.in_person_verified.greeting') %><br> | ||
| <%= t( | ||
| 'user_mailer.in_person_verified.intro', | ||
| location: @presenter.location_name, | ||
| date: @presenter.formatted_verified_date, | ||
| ) %><br /><br /> | ||
| <%= t('user_mailer.in_person_verified.next_sign_in', app_name: APP_NAME) %> | ||
| </p> | ||
|
|
||
| <%= render 'shared/in-person-verification-results-email-lower' %> |
This file contains hidden or 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 hidden or 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 hidden or 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
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm doing this so we can render the image above the title