18F/identity-idp

View on GitHub
app/views/users/edit_phone/_make_default_number.html.erb

Summary

Maintainability
Test Coverage
<div class="margin-bottom-4">
  <fieldset class="margin-0 padding-0 border-0">
    <legend class="usa-label margin-bottom-1">
      <% if @edit_phone_form.one_phone_configured? %>
        <%= t('two_factor_authentication.otp_make_default_number.one_number_title') %>
      <% else %>
        <%= t('two_factor_authentication.otp_make_default_number.title') %>
      <% end %>
    </legend>
    <p class="margin-top-0 margin-bottom-2">
      <% if @edit_phone_form.one_phone_configured? %>
        <%= t('two_factor_authentication.otp_make_default_number.one_number_instruction') %>
      <% else %>
        <%= t('two_factor_authentication.otp_make_default_number.instruction') %>
      <% end %>
    </p>
    <%= check_box_tag(
          'edit_phone_form[make_default_number]',
          :otp_make_default_number,
          @edit_phone_form.default_phone_configuration?,
          class: 'usa-checkbox__input usa-checkbox__input--bordered',
          disabled: @edit_phone_form.one_phone_configured?,
        ) %>
    <label
      class="usa-checkbox__label"
      for="edit_phone_form_make_default_number"
    >
      <%= t('two_factor_authentication.otp_make_default_number.label') %>
    </label>
  </fieldset>
</div>