journalduhacker/app/views/settings/twofa.html.erb
2017-05-17 11:29:54 +02:00

33 lines
879 B
Plaintext

<div class="box wide">
<div class="legend right">
<a href="/settings">Back to Settings</a>
</div>
<div class="legend">
<%= @title %>
</div>
<%= form_for @user, :url => twofa_auth_url, :method => :post do |f| %>
<p>
<% if @user.has_2fa? %>
To turn off two-factor authentication for your account, enter your
current password:
<% else %>
To begin the two-factor authentication enrollment for your account,
enter your current password:
<% end %>
</p>
<div class="boxline">
<%= f.label :password, "Current Password:", :class => "required" %>
<%= f.password_field :password, :size => 40, :autocomplete => "off" %>
</div>
<p>
<% if @user.has_2fa? %>
<%= submit_tag "Disable Two-Factor Authentication" %>
<% else %>
<%= submit_tag "Continue" %>
<% end %>
<% end %>
</div>