-
Notifications
You must be signed in to change notification settings - Fork 166
LG-14642: Update design and copy of GPO 'letter on the way' email #11351
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
10 commits
Select commit
Hold shift + click to select a range
0ca33b4
LG-14642: Update design and copy of GPO 'letter on the way' email
lmgeorge 5342bea
Fix broken i18n tests, improve url_options implementation, make ruboc…
lmgeorge 8e7f4ca
make rubocop happy, v2
lmgeorge 3e8ac45
make erblint happy
lmgeorge ae992f1
make lint job happy, rev 4
lmgeorge 42419e1
PR feedback: removed unused asset
lmgeorge a96693e
PR feedback: first stab at handling locale with url_options
lmgeorge b4168d7
Fix url_options handling in LocaleHelper spec
lmgeorge f30e09c
Fixing a stray url_options setting
lmgeorge 85ca1f9
clean up the locale helper implementation
jmhooper 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
47 changes: 47 additions & 0 deletions
47
app/presenters/idv/by_mail/letter_requested_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,47 @@ | ||
| # frozen_string_literal: true | ||
|
|
||
| module Idv | ||
| module ByMail | ||
| class LetterRequestedEmailPresenter | ||
| include ActionView::Helpers::TranslationHelper | ||
| include Rails.application.routes.url_helpers | ||
|
|
||
| attr_reader :current_user, :service_provider, :url_options | ||
| def initialize(current_user:, url_options:) | ||
| @current_user = current_user | ||
| @url_options = url_options | ||
| @service_provider = current_user.pending_profile&.initiating_service_provider | ||
| end | ||
|
|
||
| def sp_name | ||
| service_provider&.friendly_name | ||
| end | ||
|
|
||
| def show_sp_contact_instructions? | ||
| sp_name.present? | ||
| end | ||
|
|
||
| def show_cta? | ||
| sign_in_url.present? | ||
| end | ||
|
|
||
| def sign_in_url | ||
| if service_provider.present? | ||
| service_provider_homepage_url | ||
| else | ||
| root_url | ||
| end | ||
| end | ||
lmgeorge marked this conversation as resolved.
Outdated
Show resolved
Hide resolved
|
||
|
|
||
| private | ||
|
|
||
| def service_provider_homepage_url | ||
| sp_return_url_resolver.homepage_url if service_provider | ||
| end | ||
|
|
||
| def sp_return_url_resolver | ||
| SpReturnUrlResolver.new(service_provider:) | ||
| end | ||
| end | ||
| end | ||
| end | ||
73 changes: 55 additions & 18 deletions
73
app/views/user_mailer/verify_by_mail_letter_requested.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 |
|---|---|---|
| @@ -1,21 +1,58 @@ | ||
| <p class="lead"> | ||
| <%= t('user_mailer.letter_reminder.info_html', link_html: link_to(APP_NAME, root_url)) %> | ||
| <%= image_tag( | ||
| 'email/letter-success.png', | ||
| width: 140, | ||
| height: 177, | ||
| alt: '', | ||
| class: 'float-center padding-bottom-4', | ||
| ) %> | ||
| <h1><%= message.subject %></h1> | ||
| <p> | ||
| <%= t('user_mailer.verify_by_mail_letter_requested.intro_html', app_name: APP_NAME) %> | ||
| </p> | ||
| <!-- When there is a service provider present render this block --> | ||
| <% if @presenter.show_sp_contact_instructions? %> | ||
| <ul> | ||
| <li><%= t('user_mailer.verify_by_mail_letter_requested.instructions.sign_in') %></li> | ||
| <li> | ||
| <%= t( | ||
| 'user_mailer.verify_by_mail_letter_requested.instructions.contact_sp', | ||
| friendly_name: @presenter.sp_name, | ||
| ) %> | ||
| </li> | ||
| </ul> | ||
| <% else %> | ||
| <p><%= t('user_mailer.verify_by_mail_letter_requested.instructions.sign_in') %></p> | ||
| <% end %> | ||
|
|
||
| <table class="spacer"> | ||
| <tbody> | ||
| <tr> | ||
| <td class="s10" height="10px"> | ||
| | ||
| </td> | ||
| </tr> | ||
| </tbody> | ||
| </table> | ||
|
|
||
| <table class="hr"> | ||
| <tr> | ||
| <th> | ||
| | ||
| </th> | ||
| </tr> | ||
| </table> | ||
| <% if @presenter.show_cta? %> | ||
| <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.verify_by_mail_letter_requested.cta.sign_in'), | ||
| @presenter.sign_in_url, | ||
| target: '_blank', | ||
| class: 'float-center', | ||
| rel: 'noopener' %> | ||
| </td> | ||
| </tr> | ||
| </tbody> | ||
| </table> | ||
| </td> | ||
| <td class="expander"></td> | ||
| </tr> | ||
| </tbody> | ||
| </table> | ||
| </div> | ||
|
|
||
| <p> | ||
| <%= link_to @presenter.sign_in_url, @presenter.sign_in_url, target: '_blank', rel: 'noopener' %> | ||
| </p> | ||
| <% 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
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
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
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.
Uh oh!
There was an error while loading. Please reload this page.