18F/identity-idp

View on GitHub
app/views/two_factor_authentication/_locked.html.erb

Summary

Maintainability
Test Coverage
<% self.title = t('titles.account_locked') %>

<%= render StatusPageComponent.new(status: :error, icon: :lock) do |c| %>
  <% c.with_header { t('titles.account_locked') } %>

  <p><%= presenter.locked_reason %></p>

  <p>
    <%= t(
          'two_factor_authentication.please_try_again_html',
          countdown: render(
            CountdownComponent.new(expiration: presenter.user.lockout_time_expiration),
          ),
        ) %>
  </p>

  <% c.with_troubleshooting_options do |tc| %>
    <% tc.with_header { t('components.troubleshooting_options.default_heading') } %>
    <% tc.with_option(
         url: MarketingSite.help_url,
         new_tab: true,
       ).with_content(t('two_factor_authentication.read_about_two_factor_authentication')) %>
    <% tc.with_option(
         url: MarketingSite.contact_url,
         new_tab: true,
       ).with_content(t('idv.troubleshooting.options.contact_support', app_name: APP_NAME)) %>
  <% end %>
<% end %>