<% content_for :title, "Check your email" %> <% url_prefix = resource_name == :user ? "account" : "admin" %> <%= form_with(model: resource, url: "/#{url_prefix}/two-factor-authentication", html: { method: :put }) do |f| %> <div class="govuk-grid-row"> <div class="govuk-grid-column-two-thirds"> <%= f.govuk_error_summary %> <h1 class="govuk-heading-l"> <%= content_for(:title) %> </h1> <p class="govuk-body">We’ve sent you an email with a security code.</p> <%= f.govuk_number_field :code, label: { text: "Security code", size: "m" }, width: 5, autocomplete: "one-time-code", autofocus: true %> <%= f.govuk_submit "Submit" %> </div> </div> <% end %> <p class="govuk-body"> <%= govuk_link_to "Not received an email?", send("#{resource_name}_two_factor_authentication_resend_path") %> </p>