18F/identity-idp

View on GitHub
app/views/users/piv_cac_setup_from_sign_in/prompt.html.erb

Summary

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

<%= render PageHeadingComponent.new.with_content(t('titles.piv_cac_login.add')) %>

<p class="margin-top-2 margin-bottom-2">
  <%= t('headings.piv_cac_login.add') %>
</p>

<p class="margin-top-2 margin-bottom-2">
  <%= t('instructions.mfa.piv_cac.add_from_sign_in_html') %>
</p>

<%= simple_form_for('', url: submit_new_piv_cac_url) do |f| %>
  <%= render ValidatedFieldComponent.new(
        form: f,
        name: :name,
        label: t('forms.piv_cac_setup.nickname'),
        required: true,
        input_html: {
          size: 16,
          maxlength: 20,
          class: 'width-auto',
        },
      ) %>
  <div class="margin-top-5">
    <%= f.submit t('forms.piv_cac_setup.submit') %>
  </div>
<% end %>

<%= render ButtonComponent.new(
      url: login_add_piv_cac_prompt_path,
      method: :post,
      big: true,
      wide: true,
      outline: true,
      class: 'margin-top-2',
    ).with_content(t('forms.piv_cac_setup.no_thanks')) %>

<%= render 'shared/cancel', link: new_user_session_url %>