mirror of
https://github.com/scinote-eln/scinote-web.git
synced 2024-11-18 23:21:30 +08:00
30c5b1675f
* Fix form errors in users invitation edit [SCI-8595] Co-authored-by: Sboursen <dev.sboursen@gmail.com> * Fix form errors in users confirmation new [SCI-8595] Co-authored-by: Sboursen <dev.sboursen@gmail.com> * Fix form errors in users registration [SCI-8595] Co-authored-by: Sboursen <dev.sboursen@gmail.com> --------- Co-authored-by: Sboursen <dev.sboursen@gmail.com>
31 lines
1.1 KiB
Text
31 lines
1.1 KiB
Text
<% 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 %>
|
|
|
|
<%= render "users/shared/links" %>
|
|
</div>
|
|
|
|
|
|
<% if resource.errors.present? %>
|
|
<% form_errors = {} %>
|
|
|
|
<% resource.errors.each do |err, msg| %>
|
|
<% form_errors[err] = (msg == "not found") ? ["Email not found"] : [msg] %>
|
|
<% end %>
|
|
<div class="hidden" id="form-error-data" data-form-errors="<%= form_errors.to_json %>"></div>
|
|
<%= javascript_include_tag 'users/confirmation/new', nonce: true %>
|
|
<% end %>
|