<% if @done %>

<%= t 'change_email.confirmed' %>

"><%= t('change_email.please_continue', site_name: SiteSetting.title) %>

<% elsif @error %>
<%= @error %>
<% else %>

<%= t 'change_email.authorizing_new.title' %>

<%= t 'change_email.authorizing_new.description' %>

<%= @to_email %>

<%=form_tag(u_confirm_new_email_path, method: :put) do %> <%= hidden_field_tag 'token', @token.token %> <% if @show_backup_codes %>

<%= t('login.second_factor_backup_title') %>

<%= label_tag(:second_factor_token, t("login.second_factor_backup_description")) %>
<%= render 'common/second_factor_backup_input' %>
<%= submit_tag(t("submit"), class: "btn btn-primary") %>
<%= link_to t("login.second_factor_toggle.totp"), show_backup: "false" %> <% elsif @show_second_factor %>

<%= t('login.second_factor_title') %>

<%= label_tag(:second_factor_token, t('login.second_factor_description')) %>
<%= render 'common/second_factor_text_field' %>
<% if @show_invalid_second_factor_error %>
<%= t('login.invalid_second_factor_code') %>
<% end %> <%= submit_tag t('submit'), class: "btn btn-primary" %>
<% if @backup_codes_enabled %> <%= link_to t("login.second_factor_toggle.backup_code"), show_backup: "true" %> <% end %> <% else %> <%= submit_tag t('change_email.confirm'), class: "btn btn-primary" %> <% end %> <%end%> <% end%>