tilde.news/app/views/settings/twofa.html.erb

33 lines
886 B
Plaintext

<div class="box wide">
<div class="legend right">
<a href="/settings">Back to Settings</a>
</div>
<div class="legend">
<%= @title %>
</div>
<%= form_with :model => @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? %>
<%= f.submit "Disable Two-Factor Authentication" %>
<% else %>
<%= f.submit "Continue" %>
<% end %>
<% end %>
</div>