-
Notifications
You must be signed in to change notification settings - Fork 166
Add maintenance window notification for Acuant (LG-3451) #4202
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
Changes from all commits
1740310
babcd4a
ce2c963
6657954
ec94123
05a973b
ea4836e
cb1075b
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,19 @@ | ||
| class MaintenanceWindow | ||
| attr_reader :start, :finish, :now | ||
|
|
||
| def initialize(start:, finish:, now: nil, display_time_zone: 'America/New_York') | ||
| @start = parse(start, display_time_zone: display_time_zone) | ||
| @finish = parse(finish, display_time_zone: display_time_zone) | ||
| @now = now || Time.zone.now | ||
| end | ||
|
|
||
| def active? | ||
| (start...finish).cover?(now) if start && finish | ||
| end | ||
|
|
||
| private | ||
|
|
||
| def parse(time_str, display_time_zone:) | ||
| Time.zone.parse(time_str).in_time_zone(display_time_zone) if time_str.present? | ||
| end | ||
| end |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,23 +1,24 @@ | ||
| <h1 class="h3 mt0 mb1"><%= t('cac_proofing.headings.choose_method') %></h1> | ||
| <%= t('cac_proofing.info.choose_method') %> | ||
| <hr/> | ||
| <br/> | ||
| <%= image_tag asset_url('dod-logo.jpg'), height: 150 %> | ||
| <br/> | ||
| <%= simple_form_for :cac, | ||
| url: url_for, | ||
| method: 'put', | ||
| html: { autocomplete: 'off', role: 'form', class: 'mt2' } do |f| %> | ||
| <button class="btn btn-primary" type="submit"><%= t('cac_proofing.buttons.use_cac') %></button> | ||
| <%= render 'shared/maintenance_window_alert' do %> | ||
| <h1 class="h3 mt0 mb1"><%= t('cac_proofing.headings.choose_method') %></h1> | ||
| <%= t('cac_proofing.info.choose_method') %> | ||
| <hr/> | ||
| <br/> | ||
| <%= image_tag asset_url('dod-logo.jpg'), height: 150 %> | ||
| <br/> | ||
| <%= simple_form_for :cac, | ||
| url: url_for, | ||
| method: 'put', | ||
| html: { autocomplete: 'off', role: 'form', class: 'mt2' } do |f| %> | ||
| <button class="btn btn-primary" type="submit"><%= t('cac_proofing.buttons.use_cac') %></button> | ||
| <% end %> | ||
| <br/> | ||
| <br/> | ||
| <hr/> | ||
| <%= image_tag asset_url('state-id-confirm@3x.png'), height: 150 %> | ||
| <br/> | ||
| <br/> | ||
| <%= link_to t('cac_proofing.buttons.use_doc_auth'), idv_doc_auth_path, class: 'btn btn-primary' %> | ||
| <br/> | ||
| <br/> | ||
| <div class="mt2 pt1 border-top"><%= link_to t('links.cancel'), idv_cancel_path %></div> | ||
| <% end %> | ||
| <br/> | ||
| <br/> | ||
| <hr/> | ||
| <%= image_tag asset_url('state-id-confirm@3x.png'), height: 150 %> | ||
| <br/> | ||
| <br/> | ||
| <%= link_to t('cac_proofing.buttons.use_doc_auth'), idv_doc_auth_path, class: 'btn btn-primary' %> | ||
| <br/> | ||
| <br/> | ||
| <div class="mt2 pt1 border-top"><%= link_to t('links.cancel'), idv_cancel_path %></div> | ||
|
|
||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -3,113 +3,115 @@ | |
| <div class='alert alert-error'><%= flow_session[:error_message] %></div> | ||
| <% end %> | ||
|
|
||
| <h1 class='h3 my0'><%= t('doc_auth.headings.welcome') %></h1> | ||
| <p class='mt-tiny mb3'><%= t('doc_auth.info.welcome') %></p> | ||
| <h1 class='h3 mb2'><%= t('doc_auth.instructions.welcome') %></h1> | ||
| <%= render 'shared/maintenance_window_alert' do %> | ||
| <h1 class='h3 my0'><%= t('doc_auth.headings.welcome') %></h1> | ||
|
Comment on lines
+6
to
+7
Contributor
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. ditto, this is just indenting & wrapping in a block (recommend that you hide whitespace for this diff) |
||
| <p class='mt-tiny mb3'><%= t('doc_auth.info.welcome') %></p> | ||
| <h1 class='h3 mb2'><%= t('doc_auth.instructions.welcome') %></h1> | ||
|
|
||
| <ul class='list-reset'> | ||
| <li class='pt2 pb1'> | ||
| <div class='inline-block mr2 mt1 align-top circle circle-number bg-blue white'> | ||
| <%= step += 1 %> | ||
| </div> | ||
| <div class='mr1 inline-block'> | ||
| <div class='h1 inline-block bold'> | ||
| <%= t('doc_auth.instructions.bullet1') %> | ||
| <ul class='list-reset'> | ||
| <li class='pt2 pb1'> | ||
| <div class='inline-block mr2 mt1 align-top circle circle-number bg-blue white'> | ||
| <%= step += 1 %> | ||
| </div> | ||
| <br/> | ||
| <div> | ||
| <%= t('doc_auth.instructions.text1') %> | ||
| <div class='mr1 inline-block'> | ||
| <div class='h1 inline-block bold'> | ||
| <%= t('doc_auth.instructions.bullet1') %> | ||
| </div> | ||
| <br/> | ||
| <div> | ||
| <%= t('doc_auth.instructions.text1') %> | ||
| </div> | ||
| </div> | ||
| </div> | ||
| </li> | ||
| <% if liveness_checking_enabled? %> | ||
| <li class='pt2 pb1'> | ||
| <div class='inline-block mr2 mt1 align-top circle circle-number bg-blue white'> | ||
| <%= step += 1 %> | ||
| </div> | ||
| <div class='mr1 inline-block'> | ||
| <div class='h1 inline-block bold'> | ||
| <%= t('doc_auth.instructions.bullet1a') %> | ||
| </li> | ||
| <% if liveness_checking_enabled? %> | ||
| <li class='pt2 pb1'> | ||
| <div class='inline-block mr2 mt1 align-top circle circle-number bg-blue white'> | ||
| <%= step += 1 %> | ||
| </div> | ||
| <br/> | ||
| <div> | ||
| <%= t('doc_auth.instructions.text1a') %> | ||
| <div class='mr1 inline-block'> | ||
| <div class='h1 inline-block bold'> | ||
| <%= t('doc_auth.instructions.bullet1a') %> | ||
| </div> | ||
| <br/> | ||
| <div> | ||
| <%= t('doc_auth.instructions.text1a') %> | ||
| </div> | ||
| </div> | ||
| </div> | ||
| </li> | ||
| <% end %> | ||
| <li class='pt2 pb1'> | ||
| <div class='inline-block mr2 mt1 align-top circle circle-number bg-blue white'> | ||
| <%= step += 1 %> | ||
| </div> | ||
| <div class='mr1 inline-block'> | ||
| <div class='h1 inline-block bold'> | ||
| <%= t('doc_auth.instructions.bullet2') %> | ||
| </li> | ||
| <% end %> | ||
| <li class='pt2 pb1'> | ||
| <div class='inline-block mr2 mt1 align-top circle circle-number bg-blue white'> | ||
| <%= step += 1 %> | ||
| </div> | ||
| <br/> | ||
| <div> | ||
| <%= t('doc_auth.instructions.text2') %> | ||
| <div class='mr1 inline-block'> | ||
| <div class='h1 inline-block bold'> | ||
| <%= t('doc_auth.instructions.bullet2') %> | ||
| </div> | ||
| <br/> | ||
| <div> | ||
| <%= t('doc_auth.instructions.text2') %> | ||
| </div> | ||
| </div> | ||
| </div> | ||
| </li> | ||
| <li class='pt2 pb1'> | ||
| <div class='inline-block mr2 mt1 align-top circle circle-number bg-blue white'> | ||
| <%= step += 1 %> | ||
| </div> | ||
| <div class='mr1 inline-block'> | ||
| <div class='h1 inline-block bold'> | ||
| <%= t('doc_auth.instructions.bullet3') %> | ||
| </li> | ||
| <li class='pt2 pb1'> | ||
| <div class='inline-block mr2 mt1 align-top circle circle-number bg-blue white'> | ||
| <%= step += 1 %> | ||
| </div> | ||
| <br/> | ||
| <div> | ||
| <%= t('doc_auth.instructions.text3') %> | ||
| <div class='mr1 inline-block'> | ||
| <div class='h1 inline-block bold'> | ||
| <%= t('doc_auth.instructions.bullet3') %> | ||
| </div> | ||
| <br/> | ||
| <div> | ||
| <%= t('doc_auth.instructions.text3') %> | ||
| </div> | ||
| </div> | ||
| </div> | ||
| </li> | ||
| <li class='pt2 pb1'> | ||
| <div class='inline-block mr2 mt1 align-top circle circle-number bg-blue white'> | ||
| <%= step += 1 %> | ||
| </div> | ||
| <div class='mr1 inline-block'> | ||
| <div class='h1 inline-block bold'> | ||
| <%= t('doc_auth.instructions.bullet4') %> | ||
| </li> | ||
| <li class='pt2 pb1'> | ||
| <div class='inline-block mr2 mt1 align-top circle circle-number bg-blue white'> | ||
| <%= step += 1 %> | ||
| </div> | ||
| <br/> | ||
| <div> | ||
| <%= t('doc_auth.instructions.text4') %> | ||
| <div class='mr1 inline-block'> | ||
| <div class='h1 inline-block bold'> | ||
| <%= t('doc_auth.instructions.bullet4') %> | ||
| </div> | ||
| <br/> | ||
| <div> | ||
| <%= t('doc_auth.instructions.text4') %> | ||
| </div> | ||
| </div> | ||
| </div> | ||
| </li> | ||
| </ul> | ||
| </li> | ||
| </ul> | ||
|
|
||
| <%= simple_form_for :doc_auth, | ||
| url: url_for, | ||
| method: 'put', | ||
| html: { autocomplete: 'off', role: 'form', class: 'mt2 js-consent-form' } do |f| %> | ||
| <br/> | ||
| <label class="mtn1 mb3" for="ial2_consent_given"> | ||
| <div class="checkbox"> | ||
| <%= check_box_tag :ial2_consent_given, true, false %> | ||
| <span class="indicator"></span> | ||
| <%= t('doc_auth.instructions.consent') %> | ||
| <%= link_to(t('doc_auth.instructions.learn_more'), 'https://login.gov/policy/', target: '_blank') %> | ||
| </div> | ||
| </label> | ||
| <%= f.button :submit, t('doc_auth.buttons.continue'), class: 'btn btn-primary btn-wide sm-col-6 col-6 no-auto-enable' %> | ||
| <% end %> | ||
| <%= simple_form_for :doc_auth, | ||
| url: url_for, | ||
| method: 'put', | ||
| html: { autocomplete: 'off', role: 'form', class: 'mt2 js-consent-form' } do |f| %> | ||
| <br/> | ||
| <label class="mtn1 mb3" for="ial2_consent_given"> | ||
| <div class="checkbox"> | ||
| <%= check_box_tag :ial2_consent_given, true, false %> | ||
| <span class="indicator"></span> | ||
| <%= t('doc_auth.instructions.consent') %> | ||
| <%= link_to(t('doc_auth.instructions.learn_more'), 'https://login.gov/policy/', target: '_blank') %> | ||
| </div> | ||
| </label> | ||
| <%= f.button :submit, t('doc_auth.buttons.continue'), class: 'btn btn-primary btn-wide sm-col-6 col-6 no-auto-enable' %> | ||
| <% end %> | ||
|
|
||
| <br/> | ||
| <br/> | ||
|
|
||
|
|
||
| <% if user_fully_authenticated? %> | ||
| <%= render 'shared/cancel', link: idv_cancel_path %> | ||
| <% else %> | ||
| <div class='mt2 pt1 border-top'> | ||
| <%= link_to(t('two_factor_authentication.choose_another_option'), two_factor_options_path) %> | ||
| </div> | ||
| <% end %> | ||
| <% if user_fully_authenticated? %> | ||
| <%= render 'shared/cancel', link: idv_cancel_path %> | ||
| <% else %> | ||
| <div class='mt2 pt1 border-top'> | ||
| <%= link_to(t('two_factor_authentication.choose_another_option'), two_factor_options_path) %> | ||
| </div> | ||
| <% end %> | ||
|
|
||
|
|
||
| <%= javascript_pack_tag('clipboard') %> | ||
| <%= javascript_pack_tag('ial2-consent-button') %> | ||
| <%= javascript_pack_tag('document-capture-welcome') if FeatureManagement.document_capture_step_enabled? %> | ||
| <%= javascript_pack_tag('clipboard') %> | ||
| <%= javascript_pack_tag('ial2-consent-button') %> | ||
| <%= javascript_pack_tag('document-capture-welcome') if FeatureManagement.document_capture_step_enabled? %> | ||
| <% end %> | ||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,22 @@ | ||
| <% | ||
| maintenance_window = MaintenanceWindow.new( | ||
| start: Figaro.env.acuant_maintenance_window_start, | ||
| finish: Figaro.env.acuant_maintenance_window_finish, | ||
|
Comment on lines
+3
to
+4
Contributor
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. In the future, we can make these start/end variables we pass in, but I figured for the time being, we have just the one maintenance window, so I hardcoded it here |
||
| now: local_assigns[:now], | ||
| ) | ||
| %> | ||
| <% if maintenance_window.active? %> | ||
| <%= render 'shared/alert', { type: 'warning', class: 'margin-bottom-2', text_tag: 'div' } do %> | ||
| <p> | ||
| <%= t('notices.maintenance.currently_under_maintenance_html', | ||
| finish: l(maintenance_window.finish, | ||
| format: t('time.formats.event_timestamp_with_zone'))) %> | ||
aduth marked this conversation as resolved.
Show resolved
Hide resolved
|
||
| </p> | ||
| <p class="margin-bottom-0"> | ||
| <%= t('notices.maintenance.need_assistance') %> | ||
| <%= link_to(t('notices.maintenance.contact_us'), MarketingSite.contact_url) %> | ||
| </p> | ||
| <% end %> | ||
| <% else %> | ||
| <%= yield %> | ||
| <% end %> | ||
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.
this is just indenting & wrapping in a block (recommend that you hide whitespace for this diff)