2016-03-07 14:40:11 -05: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-21 20:18:12 -05:00
|
|
|
<% elsif @update_result == :invalid_second_factor%>
|
2018-06-28 04:12:32 -04:00
|
|
|
<div id="primary-second-factor-form">
|
|
|
|
<h2><%= t('login.second_factor_title') %></h2>
|
|
|
|
<br>
|
|
|
|
<%=form_tag({}, method: :put) do %>
|
|
|
|
<%= label_tag(:second_factor_token, t('login.second_factor_description')) %>
|
|
|
|
<div><%= render 'common/second_factor_text_field' %></div>
|
|
|
|
<% if @show_invalid_second_factor_error %>
|
|
|
|
<div class='alert alert-error'><%= t('login.invalid_second_factor_code') %></div>
|
|
|
|
<% end %>
|
|
|
|
<%= submit_tag t('submit'), class: "btn btn-primary" %>
|
2017-12-21 20:18:12 -05:00
|
|
|
<% end %>
|
2018-06-28 04:12:32 -04:00
|
|
|
</div>
|
|
|
|
|
|
|
|
<%if @backup_codes_enabled %>
|
|
|
|
<div id="backup-second-factor-form" style="display: none">
|
|
|
|
<h2><%= t('login.second_factor_backup_title') %></h2>
|
|
|
|
<br>
|
|
|
|
<%= form_tag({}, method: :put) do%>
|
|
|
|
<%= label_tag(:second_factor_token, t("login.second_factor_backup_description")) %>
|
|
|
|
<div><%= render 'common/second_factor_backup_input' %></div>
|
|
|
|
<%= submit_tag(t("submit"), class: "btn btn-primary") %>
|
|
|
|
<%end%>
|
|
|
|
|
|
|
|
</div>
|
|
|
|
<a href id="toggle-form"><%=t "login.second_factor_backup" %></a>
|
|
|
|
<%= render 'common/second_factor_form_script' %>
|
|
|
|
<%end%>
|
2016-03-07 14:40:11 -05:00
|
|
|
<% else %>
|
|
|
|
<div class='alert alert-error'>
|
2017-10-20 11:27:01 -04:00
|
|
|
<%=t 'change_email.already_done' %>
|
2016-03-07 14:40:11 -05:00
|
|
|
</div>
|
|
|
|
<% end %>
|
|
|
|
</div>
|