diff --git a/app/assets/javascripts/assets.js.erb b/app/assets/javascripts/assets.js.erb index 7938bc44986..04092747016 100644 --- a/app/assets/javascripts/assets.js.erb +++ b/app/assets/javascripts/assets.js.erb @@ -3,7 +3,6 @@ window.LoginGov.assets = {}; <% keys = [ 'clock.svg', - 'state-id-sample-front.jpg', 'plus.svg', 'minus.svg', 'up-carat-thin.svg', diff --git a/app/javascript/app/document-capture/components/document-capture.jsx b/app/javascript/app/document-capture/components/document-capture.jsx index a851a62aff4..9b0616d569b 100644 --- a/app/javascript/app/document-capture/components/document-capture.jsx +++ b/app/javascript/app/document-capture/components/document-capture.jsx @@ -1,7 +1,5 @@ import React, { useState } from 'react'; import AcuantCapture from './acuant-capture'; -import DocumentTips from './document-tips'; -import Image from './image'; import FormSteps from './form-steps'; import DocumentsStep, { isValid as isDocumentsStepValid } from './documents-step'; import Submission from './submission'; @@ -9,34 +7,24 @@ import Submission from './submission'; function DocumentCapture() { const [formValues, setFormValues] = useState(null); - const sample = ( - Sample front of state issued ID - ); - return formValues ? ( ) : ( - <> - - - 'Selfie' }, - { name: 'confirm', component: () => 'Confirm?' }, - ]} - onComplete={setFormValues} - /> - + 'Confirm?' }, + ]} + onComplete={setFormValues} + /> ); } diff --git a/app/views/idv/doc_auth/document_capture.html.erb b/app/views/idv/doc_auth/document_capture.html.erb index 76a1eca71e8..3ac15d63669 100644 --- a/app/views/idv/doc_auth/document_capture.html.erb +++ b/app/views/idv/doc_auth/document_capture.html.erb @@ -1,4 +1,5 @@ <% if Figaro.env.acuant_sdk_document_capture_enabled == 'true' %> + <% title t('doc_auth.titles.doc_auth') %> <% content_for :meta_tags do %> <% end %> -
- <%= javascript_pack_tag 'document-capture' %> -<% end %> -
-<% title t('doc_auth.titles.doc_auth') %> - -<%= render 'idv/doc_auth/error_messages', flow_session: flow_session %> +
+ <%= render 'idv/doc_auth/error_messages', flow_session: flow_session %> + +

+ <% if liveness_checking_enabled? %> + <%= t('doc_auth.headings.document_capture_with_selfie_html') %> + <% else %> + <%= t('doc_auth.headings.document_capture_html') %> + <% end %> +

+ + <%= render 'idv/doc_auth/document_capture_notices', flow_session: flow_session %> + + <%= simple_form_for( + :doc_auth, + url: url_for, + method: 'PUT', + html: { autocomplete: 'off', role: 'form', class: 'mt2' } + ) do |f| %> + <%# ---- Front Image ----- %> + +
+
+

+ <%= t('doc_auth.headings.upload_front_html') %> +

+ + <%= accordion('totp-info', t('doc_auth.tips.title_html'), + wrapper_css: 'my2 col-12 fs-16p') do %> + <%= render 'idv/doc_auth/tips_and_sample' %> +
+ <%= image_tag(asset_url('state-id-sample-front.jpg'), height: 338, width: 450) %> +
+ <% end %> + + <%= f.input :front_image_data_url, as: :hidden %> + <%= f.input :front_image, label: false, as: :file, required: true, wrapper_class: 'mt3 sm-col-8' %> +
+
-

- <% if liveness_checking_enabled? %> - <%= t('doc_auth.headings.document_capture_with_selfie_html') %> - <% else %> - <%= t('doc_auth.headings.document_capture_html') %> - <% end %> -

- -<%= render 'idv/doc_auth/document_capture_notices', flow_session: flow_session %> - -<%= simple_form_for( - :doc_auth, - url: url_for, - method: 'PUT', - html: { autocomplete: 'off', role: 'form', class: 'mt2' } -) do |f| %> - <%# ---- Front Image ----- %> - -
-
-

- <%= t('doc_auth.headings.upload_front_html') %> -

- - <%= accordion('totp-info', t('doc_auth.tips.title_html'), - wrapper_css: 'my2 col-12 fs-16p') do %> - <%= render 'idv/doc_auth/tips_and_sample' %> -
- <%= image_tag(asset_url('state-id-sample-front.jpg'), height: 338, width: 450) %> + <%# ---- Back Image ----- %> + +
+
+

+ <%= t('doc_auth.headings.upload_back_html') %> +

+ + <%= accordion('totp-info', t('doc_auth.tips.title_html'), + wrapper_css: 'my2 col-12 fs-16p') do %> + <%= render 'idv/doc_auth/tips_and_sample' %> +
+ <%= image_tag(asset_url('state-id-sample-back.jpg'), height: 338, width: 450) %> +
+ <% end %> + + <%= f.input :back_image_data_url, as: :hidden %> + <%= f.input :back_image, label: false, as: :file, required: true, wrapper_class: 'mt3 sm-col-8' %> +
- <% end %> - <%= f.input :front_image_data_url, as: :hidden %> - <%= f.input :front_image, label: false, as: :file, required: true, wrapper_class: 'mt3 sm-col-8' %> -
-
+ <%# ---- Selfie ----- %> + <% if liveness_checking_enabled? %> +
+
+

+ <%= t('doc_auth.headings.selfie') %> +

- <%# ---- Back Image ----- %> + <%= f.input :selfie_image_data_url, as: :hidden %> + <%= f.input :selfie_image, label: false, as: :file, required: true, wrapper_class: 'mt3 sm-col-8' %> +
+
+ <% end %> -
-
-

- <%= t('doc_auth.headings.upload_back_html') %> -

+ <%# ---- Submit ----- %> - <%= accordion('totp-info', t('doc_auth.tips.title_html'), - wrapper_css: 'my2 col-12 fs-16p') do %> - <%= render 'idv/doc_auth/tips_and_sample' %> -
- <%= image_tag(asset_url('state-id-sample-back.jpg'), height: 338, width: 450) %> +
+ <%= render 'idv/doc_auth/submit_with_spinner' %>
<% end %> - <%= f.input :back_image_data_url, as: :hidden %> - <%= f.input :back_image, label: false, as: :file, required: true, wrapper_class: 'mt3 sm-col-8' %> -
-
- - <%# ---- Selfie ----- %> - <% if liveness_checking_enabled? %> -
-
-

- <%= t('doc_auth.headings.selfie') %> -

- - <%= f.input :selfie_image_data_url, as: :hidden %> - <%= f.input :selfie_image, label: false, as: :file, required: true, wrapper_class: 'mt3 sm-col-8' %> -
-
- <% end %> - - <%# ---- Submit ----- %> +

<%= t('doc_auth.info.upload_image') %>

-
- <%= render 'idv/doc_auth/submit_with_spinner' %> + <%= javascript_pack_tag 'image-preview' %>
+ <%= render 'idv/doc_auth/start_over_or_cancel' %> + <%= javascript_pack_tag 'document-capture' %> <% end %> - -

<%= t('doc_auth.info.upload_image') %>

- -<%= render 'idv/doc_auth/start_over_or_cancel' %> -<%= javascript_pack_tag 'image-preview' %> -
diff --git a/spec/features/idv/doc_auth/document_capture_step_spec.rb b/spec/features/idv/doc_auth/document_capture_step_spec.rb index d2994280e28..a68ba331279 100644 --- a/spec/features/idv/doc_auth/document_capture_step_spec.rb +++ b/spec/features/idv/doc_auth/document_capture_step_spec.rb @@ -13,6 +13,7 @@ and_return(document_capture_step_enabled) allow(Figaro.env).to receive(:liveness_checking_enabled). and_return(liveness_enabled) + allow(Figaro.env).to receive(:acuant_sdk_document_capture_enabled).and_return('true') sign_in_and_2fa_user(user) complete_doc_auth_steps_before_document_capture_step end