2016-03-08 03:40:11 +08:00
|
|
|
<div id="simple-container">
|
|
|
|
<% if @update_result == :authorizing_new %>
|
|
|
|
<h2><%= t 'change_email.authorizing_old.title' %></h2>
|
|
|
|
<br>
|
|
|
|
<p><%= t 'change_email.authorizing_old.description' %></p>
|
|
|
|
<% elsif @update_result == :complete %>
|
|
|
|
<h2><%= t 'change_email.confirmed' %></h2>
|
|
|
|
<br>
|
|
|
|
<a class="btn" href="/"><%= t('change_email.please_continue', site_name: SiteSetting.title) %></a>
|
2017-12-22 09:18:12 +08:00
|
|
|
<% elsif @update_result == :invalid_second_factor%>
|
|
|
|
<h2><%= t('login.second_factor_title') %></h2>
|
|
|
|
<br>
|
|
|
|
<%=form_tag({}, method: :put) do %>
|
|
|
|
<%= label_tag(:second_factor_token, t('login.second_factor_description')) %>
|
|
|
|
<%= text_field_tag(:second_factor_token, nil, autofocus: true) %><br>
|
|
|
|
<% if @show_invalid_second_factor_error %>
|
|
|
|
<div class='alert alert-error'><%= t('login.invalid_second_factor_code') %></div>
|
|
|
|
<% end %>
|
2018-02-20 14:44:51 +08:00
|
|
|
<%= submit_tag t('submit'), class: "btn btn-primary" %>
|
2017-12-22 09:18:12 +08:00
|
|
|
<% end %>
|
2016-03-08 03:40:11 +08:00
|
|
|
<% else %>
|
|
|
|
<div class='alert alert-error'>
|
2017-10-20 23:27:01 +08:00
|
|
|
<%=t 'change_email.already_done' %>
|
2016-03-08 03:40:11 +08:00
|
|
|
</div>
|
|
|
|
<% end %>
|
|
|
|
</div>
|