18F/identity-idp

View on GitHub
app/views/partials/personal_key/_entry_fields.html.erb

Summary

Maintainability
Test Coverage
<% word_count = IdentityConfig.store.recovery_code_length %>

<div class='margin-bottom-4'>
  <%= f.input attribute_name,
              label: t('forms.two_factor.personal_key'),
              input_html: { autocapitalize: 'none',
                            autocomplete: 'off',
                            class: 'personal-key text-uppercase',
                            maxlength: (RandomPhrase::WORD_LENGTH * word_count + (word_count - 1)),
                            required: true,
                            aria: { invalid: false },
                            spellcheck: 'false' } %>
</div>
<%= javascript_packs_tag_once('formatted-fields') %>