Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
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
4 changes: 2 additions & 2 deletions app/services/db/doc_auth_log/drop_off_rates_helper.rb
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
module Db
module DocAuthLog
module DropOffRatesHelper
STEPS = %w[welcome capture_document ssn verify_info phone
STEPS = %w[welcome agreement capture_document ssn verify_info phone
encrypt personal_key verified].freeze

private
Expand All @@ -26,7 +26,7 @@ def select_count_from_profiles_where_verified_and_active

def select_counts_from_doc_auth_logs
<<~SQL
select count(welcome_view_at) as welcome, count(upload_view_at) as upload_option,
select count(welcome_view_at) as welcome, count(agreement_view_at) as agreement, count(upload_view_at) as upload_option,
count(COALESCE(back_image_view_at,mobile_back_image_view_at,capture_mobile_back_image_view_at,present_cac_view_at)) as capture_document,
count(COALESCE(ssn_view_at,enter_info_view_at)) as ssn,
count(verify_view_at) as verify_info,
Expand Down
1 change: 1 addition & 0 deletions app/services/funnel/doc_auth/register_step.rb
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@ module Funnel
module DocAuth
class RegisterStep
TOKEN_WHITELIST = %i[
agreement
welcome
upload
send_link
Expand Down
1 change: 1 addition & 0 deletions app/services/idv/flows/doc_auth_flow.rb
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ module Flows
class DocAuthFlow < Flow::BaseFlow
STEPS = {
welcome: Idv::Steps::WelcomeStep,
agreement: Idv::Steps::AgreementStep,
upload: Idv::Steps::UploadStep,
send_link: Idv::Steps::SendLinkStep,
link_sent: Idv::Steps::LinkSentStep,
Expand Down
23 changes: 23 additions & 0 deletions app/services/idv/steps/agreement_step.rb
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
module Idv
module Steps
class AgreementStep < DocAuthBaseStep
def call
end

def form_submit
skip_to_capture if params[:skip_upload]

Idv::ConsentForm.new.submit(consent_form_params)
end

def skip_to_capture
# See: Idv::DocAuthController#update_if_skipping_upload
flow_session[:skip_upload_step] = true
end

def consent_form_params
params.permit(:ial2_consent_given)
end
end
end
end
17 changes: 1 addition & 16 deletions app/services/idv/steps/welcome_step.rb
Original file line number Diff line number Diff line change
Expand Up @@ -2,27 +2,12 @@ module Idv
module Steps
class WelcomeStep < DocAuthBaseStep
def call
create_document_capture_session(document_capture_session_uuid_key)
end

def form_submit
return no_camera_redirect if params[:no_camera]
skip_to_capture if params[:skip_upload]

Idv::ConsentForm.new.submit(consent_form_params)
end

def consent_form_params
params.permit(:ial2_consent_given)
create_document_capture_session(document_capture_session_uuid_key)
end

private

def skip_to_capture
# See: Idv::DocAuthController#update_if_skipping_upload
flow_session[:skip_upload_step] = true
end

def no_camera_redirect
redirect_to idv_doc_auth_errors_no_camera_url
msg = 'Doc Auth error: Javascript could not detect camera on mobile device.'
Expand Down
51 changes: 51 additions & 0 deletions app/views/idv/doc_auth/agreement.html.erb
Original file line number Diff line number Diff line change
@@ -0,0 +1,51 @@
<% title t('titles.doc_auth.verify') %>

<% if flow_session[:error_message] %>
<%= render 'shared/alert', {
type: 'error',
class: 'margin-bottom-4',
message: flow_session[:error_message],
} %>
<% end %>

<h1 class="h3"><%= t('doc_auth.headings.lets_go') %></h1>
<p><%= t('doc_auth.info.lets_go') %></p>
<h2><%= t('doc_auth.headings.verify_identity') %></h2>
<p><%= t('doc_auth.info.verify_identity') %></p>
<h2><%= t('doc_auth.headings.secure_account') %></h2>
<p><%= t('doc_auth.info.secure_account') %></p>

<%= validated_form_for :doc_auth,
url: url_for,
method: 'put',
html: { autocomplete: 'off', role: 'form', class: 'margin-top-2 js-consent-continue-form' } do |f| %>
<br/>
<label class="margin-top-neg-1 margin-bottom-4" for="ial2_consent_given">
<div class="checkbox">
<%= check_box_tag :ial2_consent_given, true, false %>
<span class="indicator"></span>
<%= t('doc_auth.instructions.consent') %>
<%= new_window_link_to t('doc_auth.instructions.learn_more'), 'https://login.gov/policy/' %>
</div>
</label>
<%= f.button :button, t('doc_auth.buttons.continue'), type: :submit,
class: 'btn btn-primary btn-wide sm-col-6 col-6' %>
<% end %>

<br/>


<% if user_fully_authenticated? %>
<%= render 'shared/cancel', link: idv_cancel_path %>
<% else %>
<div class='margin-top-2 padding-top-1 border-top'>
<%= link_to(t('two_factor_authentication.choose_another_option'), two_factor_options_path) %>
</div>
<% end %>


<%= javascript_packs_tag_once(
'clipboard',
'ial2-consent-button',
'document-capture-welcome',
) %>
3 changes: 2 additions & 1 deletion app/views/idv/doc_auth/overview.html.erb
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,8 @@
<%= check_box_tag :ial2_consent_given, true, false %>
<span class="indicator"></span>
<%= t('recover.instructions.consent') %>
<%= new_window_link_to(t('recover.instructions.learn_more'), 'https://login.gov/policy/') %>
<%= new_window_link_to(t('recover.instructions.learn_more'),
MarketingSite.security_and_privacy_practices_url) %>
</div>
</label>
<%= f.button :submit, t('recover.buttons.continue'), class: 'btn btn-primary btn-wide sm-col-6 col-6' %>
Expand Down
117 changes: 46 additions & 71 deletions app/views/idv/doc_auth/welcome.html.erb
Original file line number Diff line number Diff line change
@@ -1,107 +1,86 @@
<% title t('titles.doc_auth.verify') %>

<% step = 0 %>
<% if flow_session[:error_message] %>
<%= render 'shared/alert', {
type: 'error',
class: 'margin-bottom-4',
message: flow_session[:error_message],
} %>
<% end %>

<%= render 'shared/maintenance_window_alert' do %>
<h1 class='h3 margin-y-0'><%= t('doc_auth.headings.welcome') %></h1>
<p class='mt-tiny margin-bottom-4'><%= t('doc_auth.info.welcome') %></p>
<h1 class='h3 margin-bottom-2'><%= t('doc_auth.instructions.welcome') %></h1>
<h1 class="h3"><%= t('doc_auth.headings.welcome') %></h1>
<p class='mt-tiny margin-bottom-0'><%= t('doc_auth.info.welcome_html') %></p>
<h2 class='margin-bottom-0'><%= t('doc_auth.instructions.welcome') %></h2>

<ul class='list-reset'>
<li class='padding-top-2 padding-bottom-1'>
<div class='inline-block margin-right-2 margin-top-1 text-top circle circle-number bg-blue white'>
<div class='inline-block margin-right-2 text-top circle circle-number bg-blue white'>
<%= step += 1 %>
</div>
<div class='margin-right-1 inline-block'>
<div class='h1 inline-block bold'>
<div class='h2 inline-block bold'>
<%= t('doc_auth.instructions.bullet1') %>
</div>
<br/>
<div>
<div class="margin-top-1">
<%= t('doc_auth.instructions.text1') %>
</div>
</div>
</li>
<% if liveness_checking_enabled? %>
<li class='padding-top-2 padding-bottom-1'>
<div class='inline-block margin-right-2 margin-top-1 text-top circle circle-number bg-blue white'>
<%= step += 1 %>
</div>
<div class='margin-right-1 inline-block'>
<div class='h1 inline-block bold'>
<%= t('doc_auth.instructions.bullet1a') %>
<li class='padding-top-2 padding-bottom-1'>
<div class='inline-block margin-right-2 text-top circle circle-number bg-blue white'>
<%= step += 1 %>
</div>
<br/>
<div>
<%= t('doc_auth.instructions.text1a') %>
<div class='margin-right-1 inline-block'>
<div class='h2 inline-block bold'>
<%= t('doc_auth.instructions.bullet1a') %>
</div>
<br/>
<div class="margin-top-1">
<%= t('doc_auth.instructions.text1a') %>
</div>
</div>
</div>
</li>
</li>
<% end %>
<li class='padding-top-2 padding-bottom-1'>
<div class='inline-block margin-right-2 margin-top-1 text-top circle circle-number bg-blue white'>
<%= step += 1 %>
</div>
<div class='margin-right-1 inline-block'>
<div class='h1 inline-block bold'>
<%= t('doc_auth.instructions.bullet2') %>
<div class="grid-row">
<div class='inline-block margin-right-2 text-top circle circle-number bg-blue white'>
<%= step += 1 %>
</div>
<br/>
<div>
<%= t('doc_auth.instructions.text2') %>
<div class='grid-col-10'>
<div class='h2 inline-block bold'>
<%= t('doc_auth.instructions.bullet2') %>
</div>
<br/>
<div class="margin-top-1">
<%= t('doc_auth.instructions.text2') %>
</div>
</div>
</div>
</li>
<li class='padding-top-2 padding-bottom-1'>
<div class='inline-block margin-right-2 margin-top-1 text-top circle circle-number bg-blue white'>
<%= step += 1 %>
</div>
<div class='margin-right-1 inline-block'>
<div class='h1 inline-block bold'>
<%= t('doc_auth.instructions.bullet3') %>
<div class="grid-row">
<div class='grid-col-2 margin-right-2 text-top circle circle-number bg-blue white'>
<%= step += 1 %>
</div>
<br/>
<div>
<%= t('doc_auth.instructions.text3') %>
</div>
</div>
</li>
<li class='padding-top-2 padding-bottom-1'>
<div class='inline-block margin-right-2 margin-top-1 text-top circle circle-number bg-blue white'>
<%= step += 1 %>
</div>
<div class='margin-right-1 inline-block'>
<div class='h1 inline-block bold'>
<%= t('doc_auth.instructions.bullet4') %>
</div>
<br/>
<div>
<%= t('doc_auth.instructions.text4') %>
<div class='grid-col-10'>
<div class='h2 inline-block bold'>
<%= t('doc_auth.instructions.bullet3') %>
</div>
<br/>
<div class="margin-top-1">
<%= t('doc_auth.instructions.text3') %>
</div>
</div>
</div>
</li>
</ul>

<h2><%= t('doc_auth.instructions.privacy') %></h2>
<p><%== t('doc_auth.info.privacy_html', link: new_window_link_to(t('doc_auth.instructions.learn_more'),
MarketingSite.security_and_privacy_practices_url)) %></p>

<%= validated_form_for :doc_auth,
url: url_for,
method: 'put',
html: { autocomplete: 'off', role: 'form', class: 'margin-top-2 js-consent-continue-form' } do |f| %>
<br/>
<label class="margin-top-neg-1 margin-bottom-4" for="ial2_consent_given">
<div class="checkbox">
<%= check_box_tag :ial2_consent_given, true, false %>
<span class="indicator"></span>
<%= t('doc_auth.instructions.consent') %>
<%= new_window_link_to t('doc_auth.instructions.learn_more'), 'https://login.gov/policy/' %>
</div>
</label>
<%= f.button :button, t('doc_auth.buttons.continue'), type: :submit,
class: 'btn btn-primary btn-wide sm-col-6 col-6' %>
<% end %>
Expand All @@ -117,10 +96,6 @@
</div>
<% end %>


<%= javascript_packs_tag_once(
'clipboard',
'ial2-consent-button',
'document-capture-welcome',
) %>
<% end %>

<%= javascript_packs_tag_once('document-capture-welcome') %>
Loading