Sha256: 834b5c16a0b078ee04b0a170873cf63abcef3f2e9e8e87091b7bcd8216505a74

Contents?: true

Size: 1.3 KB

Versions: 2

Compression:

Stored size: 1.3 KB

Contents

<h2><%= I18n.t('title', :scope => 'devise.otp.submit_token') %></h2>
<p><%= I18n.t('explain', :scope => 'devise.otp.submit_token') %></p>

<%= form_for(resource, :as => resource_name, :url => [resource_name, :otp_credential], :html => { :method => :put, "data-turbo" => false }) do |f| %>

  <%= f.hidden_field :challenge, {:value => @challenge} %>
  <%= f.hidden_field :recovery, {:value => @recovery} %>

  <% if @recovery %>
    <p>
      <%= f.label :token, I18n.t('recovery_prompt', :scope => 'devise.otp.submit_token') %><br />
      <%= f.text_field :otp_recovery_counter, :autocomplete => :off, :disabled => true, :size => 4 %>
    </p>
  <% else %>
    <p>
      <%= f.label :token, I18n.t('prompt', :scope => 'devise.otp.submit_token') %><br />
    </p>
  <% end %>

  <%= f.text_field :token, :autocomplete => :off, :autofocus => true, :size => 6, :value => '' %><br>

  <%= label_tag :enable_persistence do %>
    <%= check_box_tag :enable_persistence, true, false %> Remember this browser
  <% end %>

  <p><%= f.submit I18n.t('submit', :scope => 'devise.otp.submit_token') %></p>

  <% if !@recovery && recovery_enabled? %>
    <p><%= link_to I18n.t('recovery_link', :scope => 'devise.otp.submit_token'), otp_credential_path_for(resource_name, :challenge => @challenge, :recovery => true) %></p>
  <% end %>
<% end %>

Version data entries

2 entries across 2 versions & 1 rubygems

Version Path
devise-otp-0.4.0 app/views/devise/otp_credentials/show.html.erb
devise-otp-0.3.0 app/views/devise/credentials/show.html.erb