18F/identity-idp

View on GitHub
app/views/users/piv_cac_authentication_setup/new.html.erb

Summary

Maintainability
Test Coverage
<% self.title = @presenter.title %>

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

<p><%= t('headings.piv_cac_login.add') %></p>

<%= simple_form_for('', url: submit_new_piv_cac_url) do |f| %>
  <%= render ProcessListComponent.new(connected: true, class: 'margin-y-4') do |c| %>
    <%= c.with_item(heading: t('instructions.mfa.piv_cac.step_1')) do %>
      <p>
        <%= t('instructions.mfa.piv_cac.step_1_info') %>
      </p>
      <%= render ValidatedFieldComponent.new(
            form: f,
            name: :name,
            label: false,
            required: true,
            wrapper_html: { class: 'margin-bottom-0' },
            input_html: {
              aria: { label: t('instructions.mfa.piv_cac.step_1') },
              size: 16,
              maxlength: 20,
            },
          ) %>
    <% end %>
    <%= c.with_item(heading: t('instructions.mfa.piv_cac.step_2')) %>
    <%= c.with_item(heading: t('instructions.mfa.piv_cac.step_3')) do %>
      <p>
        <%= t('instructions.mfa.piv_cac.step_3_info_html') %>
      </p>
    <% end %>
  <% end %>

  <%= f.submit t('forms.piv_cac_setup.submit'), class: 'display-block margin-y-5' %>
<% end %>


<%= render 'shared/cancel_or_back_to_options' %>