2016-02-12 23:52:43 +08:00
|
|
|
<% provide(:head_title, t("devise.confirmations.new.head_title")) %>
|
|
|
|
|
|
|
|
<div class="center-block center-block-narrow">
|
|
|
|
|
|
|
|
<h2><%=t "devise.confirmations.new.title" %></h2>
|
|
|
|
|
|
|
|
<%= form_for(resource, as: resource_name, url: confirmation_path(resource_name), html: { method: :post }) do |f| %>
|
|
|
|
|
|
|
|
<div class="form-group">
|
|
|
|
<%= f.label :email %>
|
|
|
|
<%= f.email_field :email, autofocus: true, class: "form-control", value: (resource.pending_reconfirmation? ? resource.unconfirmed_email : resource.email) %>
|
|
|
|
</div>
|
|
|
|
|
|
|
|
<div class="form-group">
|
|
|
|
<%= f.submit t("devise.confirmations.new.submit"), class: "btn btn-primary" %>
|
|
|
|
</div>
|
|
|
|
<% end %>
|
|
|
|
|
2016-11-29 23:12:35 +08:00
|
|
|
<%= render "users/shared/links" %>
|
2016-02-12 23:52:43 +08:00
|
|
|
</div>
|
2016-07-21 19:11:15 +08:00
|
|
|
|
|
|
|
|
|
|
|
<% if not resource.errors.empty? %>
|
|
|
|
<script>
|
|
|
|
(function () {
|
|
|
|
var formErrors = {};
|
|
|
|
|
|
|
|
<% resource.errors.each do |err, m| %>
|
|
|
|
formErrors["<%= err %>"] = ("<%= m %>" == 'not found') ? ["Email not found"] : ["<%= m %>"];
|
|
|
|
<% end %>
|
|
|
|
|
|
|
|
$("form").render_form_errors("user", formErrors, false);
|
|
|
|
}());
|
|
|
|
</script>
|
|
|
|
<% end %>
|