Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
32 commits
Select commit Hold shift + click to select a range
a8937e4
add mobile phone icon
gina-yamada Apr 29, 2024
512a6ca
Update translations for how to verify view
gina-yamada Apr 29, 2024
6f23a3c
Add translations for how to verify button
gina-yamada Apr 29, 2024
477a31e
Added instance var to selectively display content
gina-yamada Apr 29, 2024
b5f92c2
fix lint issues
gina-yamada Apr 29, 2024
a2e09c5
specs for conditional logic on how to verify
gina-yamada Apr 29, 2024
be5e775
fix lint errors
gina-yamada Apr 29, 2024
5c5db1d
fix linter errors
gina-yamada Apr 29, 2024
df75690
Create how_to_verify presenter for condi rendering
gina-yamada May 1, 2024
e21f1e9
Update specs to look for specific button
gina-yamada May 1, 2024
6bd715a
fix linter errors
gina-yamada May 1, 2024
c650f83
fix lint errors
gina-yamada May 1, 2024
11ab0eb
Clean up unused var, add extra line
gina-yamada May 2, 2024
6109bed
Merge branch 'main' of github.com:18F/identity-idp into yamada/lg-126…
gina-yamada May 2, 2024
df348e1
changelog: Upcoming Features, Biometrics, Modified UX/Content on How …
gina-yamada May 2, 2024
a1eece6
pulled in main, resolved conflicts
gina-yamada May 7, 2024
fc062d1
removed extra blank line
gina-yamada May 7, 2024
5815449
remove extra blank line
gina-yamada May 7, 2024
b549b46
Add margin above tag
gina-yamada May 7, 2024
c99944e
add verify_online_instruction translation back in
gina-yamada May 7, 2024
abdc515
Updated Chinese translation
gina-yamada May 8, 2024
abc13c8
Add period in translation
gina-yamada May 8, 2024
3bf4b95
Merge branch 'main' of github.com:18F/identity-idp into yamada/lg-126…
gina-yamada May 8, 2024
f1f9417
Delete dup verify_online_instruction in chinese
gina-yamada May 8, 2024
4bc8b8d
pulled in main, ran yml_fix_merge_conflicts script
gina-yamada May 13, 2024
cbea414
delete doc_auth and forms folder
gina-yamada May 13, 2024
418185c
restore eng translations
gina-yamada May 13, 2024
56651fc
restore translation files
gina-yamada May 13, 2024
4461398
restore translations
gina-yamada May 13, 2024
0568978
Add class to icon
gina-yamada May 14, 2024
3a48a98
Merge branch 'main' of github.com:18F/identity-idp into yamada/lg-126…
gina-yamada May 14, 2024
e69e1f4
Merge branch 'main' of github.com:18F/identity-idp into yamada/lg-126…
gina-yamada May 14, 2024
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 app/assets/images/idv/mobile-phone-icon.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
6 changes: 6 additions & 0 deletions app/controllers/idv/how_to_verify_controller.rb
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ class HowToVerifyController < ApplicationController
include RenderConditionConcern

before_action :confirm_step_allowed
before_action :set_how_to_verify_presenter

check_or_render_not_found -> { self.class.enabled? }

Expand Down Expand Up @@ -90,5 +91,10 @@ def how_to_verify_form_params
rescue ActionController::ParameterMissing
ActionController::Parameters.new(selection: [])
end

def set_how_to_verify_presenter
@selfie_required = idv_session.selfie_check_required
@presenter = Idv::HowToVerifyPresenter.new(selfie_check_required: @selfie_required)
end
Comment thread
gina-yamada marked this conversation as resolved.
end
end
84 changes: 84 additions & 0 deletions app/presenters/idv/how_to_verify_presenter.rb
Original file line number Diff line number Diff line change
@@ -0,0 +1,84 @@
# frozen_string_literal: true

class Idv::HowToVerifyPresenter
include ActionView::Helpers::TagHelper
include ActionView::Helpers::TranslationHelper

attr_reader :selfie_required

def initialize(selfie_check_required:)
@selfie_required = selfie_check_required
end

def how_to_verify_info
Comment thread
gina-yamada marked this conversation as resolved.
if selfie_required
t('doc_auth.info.how_to_verify_selfie')
else
t('doc_auth.info.how_to_verify')
end
end

def asset_url
if selfie_required
'idv/mobile-phone-icon.svg'
else
'idv/remote.svg'
end
end

def alt_text
if selfie_required
t('image_description.phone_icon')
else
t('image_description.laptop_and_phone')
end
end

def verify_online_text
if selfie_required
t('doc_auth.headings.verify_online_selfie')
else
t('doc_auth.headings.verify_online')
end
end

def verify_online_instruction
if selfie_required
t('doc_auth.info.verify_online_instruction_selfie')
else
t('doc_auth.info.verify_online_instruction')
end
end

def verify_online_description
if selfie_required
t('doc_auth.info.verify_online_description_selfie')
else
t('doc_auth.info.verify_online_description')
end
end

def submit
if selfie_required
t('forms.buttons.continue_remote_selfie')
else
t('forms.buttons.continue_remote')
end
end

def post_office_instruction
if selfie_required
t('doc_auth.info.verify_at_post_office_instruction_selfie')
else
t('doc_auth.info.verify_at_post_office_instruction')
end
end

def post_office_description
if selfie_required
t('doc_auth.info.verify_at_post_office_description_selfie')
else
t('doc_auth.info.verify_at_post_office_description')
end
end
end
42 changes: 22 additions & 20 deletions app/views/idv/how_to_verify/show.html.erb
Original file line number Diff line number Diff line change
@@ -1,24 +1,22 @@
<% self.title = t('doc_auth.headings.how_to_verify') %>

<%= render PageHeadingComponent.new.with_content(t('doc_auth.headings.how_to_verify')) %>
<p id='how-to-verify-info'><%= t('doc_auth.info.how_to_verify') %></p>

<p id='how-to-verify-info'><%= @presenter.how_to_verify_info %></p>
<div role="group" aria-labelledby="how-to-verify-info" class="border-bottom border-primary-light grid-row">
<div class="grid-col-12 tablet:grid-col-auto">
<%= image_tag(
asset_url('idv/remote.svg'),
width: 88,
height: 88,
class: 'margin-right-1 margin-top-4',
alt: t('image_description.laptop_and_phone'),
) %>
<%= image_tag(
asset_url(@presenter.asset_url),
width: 88,
height: 88,
class: 'margin-right-1 margin-top-0 tablet:margin-top-4',
alt: @presenter.alt_text,
) %>
</div>
<div class="grid-col-12 tablet:grid-col-fill">
<%= simple_form_for(
@idv_how_to_verify_form,
html: {
id: nil,
aria: { label: t('forms.buttons.continue_remote') },
aria: { label: @presenter.submit },
},
method: :put,
url: idv_how_to_verify_url,
Expand All @@ -31,14 +29,18 @@
<%= f.label(
:selection_remote,
) do %>
<h2 class="margin-top-0"><%= t('doc_auth.headings.verify_online') %></h2>
<div>
<p><%= t('doc_auth.info.verify_online_instruction') %></p>
<p><%= t('doc_auth.info.verify_online_description') %></p>
</div>

<% if @selfie_required %>
<span class="usa-tag usa-tag--informative margin-bottom-2">
<%= t('doc_auth.tips.mobile_phone_required') %>
</span>
<% end %>
<h2 class="margin-top-0"><%= @presenter.verify_online_text %></h2>
<div>
<p><%= @presenter.verify_online_instruction %></p>
<p><%= @presenter.verify_online_description %></p>
</div>
<% end %>
<%= f.submit t('forms.buttons.continue_remote'), class: 'display-block margin-top-3 margin-bottom-5' %>
<%= f.submit @presenter.submit, class: 'display-block margin-top-3 margin-bottom-5' %>
<% end %>
</div>
</div>
Expand Down Expand Up @@ -72,8 +74,8 @@
) do %>
<h3 class="h2 margin-top-0"><%= t('doc_auth.headings.verify_at_post_office') %></h3>
<div>
<p><%= t('doc_auth.info.verify_at_post_office_instruction') %></p>
<p><%= t('doc_auth.info.verify_at_post_office_description') %></p>
<p><%= @presenter.post_office_instruction %></p>
<p><%= @presenter.post_office_description %></p>
</div>
<% end %>
<%= f.submit t('forms.buttons.continue_ipp'), class: 'display-block margin-top-3 margin-bottom-5', outline: true %>
Expand Down
8 changes: 8 additions & 0 deletions config/locales/en.yml
Original file line number Diff line number Diff line change
Expand Up @@ -569,6 +569,7 @@ doc_auth.headings.upload_from_phone: Use your phone to take photos
doc_auth.headings.verify_at_post_office: Verify your identity at a Post Office
doc_auth.headings.verify_identity: Verify your identity
doc_auth.headings.verify_online: Verify your identity online
doc_auth.headings.verify_online_selfie: Verify your identity online using your phone
doc_auth.headings.welcome: Let’s verify your identity for %{sp_name}
doc_auth.hybrid_flow_warning.explanation_html: You’re using <strong>%{app_name}</strong> to verify your identity for access to <strong>%{service_provider_name}</strong> and its services.
doc_auth.hybrid_flow_warning.explanation_non_sp_html: You’re using <strong>%{app_name}</strong> to verify your identity.
Expand All @@ -587,6 +588,7 @@ doc_auth.info.exit.without_sp: Exit identity verification and go to your account
doc_auth.info.getting_started_html: '%{sp_name} needs to make sure you are you — not someone pretending to be you. %{link_html}'
doc_auth.info.getting_started_learn_more: Learn more about verifying your identity
doc_auth.info.how_to_verify: You have the option to verify your identity online, or in person at a participating Post Office.
doc_auth.info.how_to_verify_selfie: You have the option to verify your identity online with your phone, or in person at a participating Post Office.
doc_auth.info.how_to_verify_troubleshooting_options_header: Want to learn more about how to verify your identity?
doc_auth.info.hybrid_handoff: We’ll collect information about you by reading your state‑issued ID.
doc_auth.info.hybrid_handoff_ipp_html: '<strong>Don’t have a mobile phone?</strong> You can verify your identity at a United States Post Office instead.'
Expand Down Expand Up @@ -615,11 +617,15 @@ doc_auth.info.tag: Recommended
doc_auth.info.upload_from_computer: Don’t have a phone? Upload photos of your ID from this computer.
doc_auth.info.upload_from_phone: You won’t have to sign in again, and you’ll switch back to this computer after you take photos. Your mobile phone must have a camera and a web browser.
doc_auth.info.verify_at_post_office_description: This option is better if you don’t have a phone to take photos of your ID.
doc_auth.info.verify_at_post_office_description_selfie: Choose this option if you don’t have a phone to take pictures.
doc_auth.info.verify_at_post_office_instruction: You’ll enter your ID information online, and verify your identity in person at a participating Post Office.
doc_auth.info.verify_at_post_office_instruction_selfie: You’ll enter your ID information online, and verify your identity in person at a participating Post Office.
doc_auth.info.verify_at_post_office_link_text: Learn more about verifying in person
doc_auth.info.verify_identity: We’ll ask for your ID, phone number, and other personal information to verify your identity against public records.
doc_auth.info.verify_online_description: This option is better if you have a phone to take photos of your ID.
doc_auth.info.verify_online_description_selfie: Choose this option if you have a phone to take pictures.
doc_auth.info.verify_online_instruction: You’ll take photos of your ID to verify your identity fully online. Most users finish this process in one sitting.
doc_auth.info.verify_online_instruction_selfie: You’ll take photos of your ID and a photo of yourself using a phone. Most users finish this process in one sitting.
doc_auth.info.verify_online_link_text: Learn more about verifying online
doc_auth.info.you_entered: 'You entered:'
doc_auth.instructions.bullet1: Have a driver’s license or state ID
Expand Down Expand Up @@ -647,6 +653,7 @@ doc_auth.tips.document_capture_selfie_text1: Remove any clothing items or access
doc_auth.tips.document_capture_selfie_text2: Take your photo in a well-lit place.
doc_auth.tips.document_capture_selfie_text3: Keep your expression neutral.
doc_auth.tips.document_capture_selfie_text4: Make sure your whole face is visible within the green circle.
doc_auth.tips.mobile_phone_required: Mobile Phone Required
doc_auth.tips.review_issues_id_header_text: 'Review the images of your state‑issued ID:'
doc_auth.tips.review_issues_id_text1: Did you use a dark background?
doc_auth.tips.review_issues_id_text2: Did you take the photo on a flat surface?
Expand Down Expand Up @@ -804,6 +811,7 @@ forms.buttons.confirm: Confirm
forms.buttons.continue: Continue
forms.buttons.continue_ipp: Continue in person
forms.buttons.continue_remote: Continue online
forms.buttons.continue_remote_selfie: Continue on your phone
forms.buttons.delete: Delete
forms.buttons.disable: Delete
forms.buttons.edit: Edit
Expand Down
Loading