18F/identity-idp

View on GitHub
app/views/idv/session_errors/failure.html.erb

Summary

Maintainability
Test Coverage
<%= render(
      'idv/shared/error',
      title: t('titles.failure.information_not_verified'),
      heading: t('idv.failure.sessions.heading'),
      options: [
        {
          url: contact_redirect_url,
          text: t('idv.troubleshooting.options.contact_support', app_name: APP_NAME),
          new_tab: true,
        },
      ].select(&:present?),
    ) do %>
      <p>
        <%= t(
              'idv.failure.sessions.fail_html',
              timeout: distance_of_time_in_words(
                Time.zone.now,
                [@expires_at, Time.zone.now].compact.max,
                except: :seconds,
              ),
            ) %>
      </p>
      <p>
        <strong>
          <%= link_to(
                @sp_name ?
                  t('idv.failure.exit.with_sp', app_name: APP_NAME, sp_name: @sp_name) :
                  t('idv.failure.exit.without_sp'),
                return_to_sp_failure_to_proof_path(
                  step: 'verify_id',
                  location: 'failure',
                ),
              ) %>
        </strong>
      </p>
    <% end %>