mirror of
https://github.com/scinote-eln/scinote-web.git
synced 2025-12-10 22:25:59 +08:00
fixes errors with form id duplicates [fixes SCI-2039]
This commit is contained in:
parent
128f15f984
commit
ace78cfb58
1 changed files with 10 additions and 9 deletions
|
|
@ -18,8 +18,10 @@
|
||||||
<%= devise_error_messages! %>
|
<%= devise_error_messages! %>
|
||||||
</div>
|
</div>
|
||||||
<% end %>
|
<% end %>
|
||||||
|
<%= form_for(resource,
|
||||||
<%= form_for(resource, as: resource_name, url: registration_path(resource_name), html: { method: :put, "data-for" => "avatar" }) do |f| %>
|
as: resource_name,
|
||||||
|
url: registration_path(resource_name),
|
||||||
|
html: { method: :put, "data-for" => "avatar", id: 'user-avatar-field' }) do |f| %>
|
||||||
<%= hidden_field_tag "user[change_avatar]", "true" %>
|
<%= hidden_field_tag "user[change_avatar]", "true" %>
|
||||||
<div data-part="view">
|
<div data-part="view">
|
||||||
<div class="form-group">
|
<div class="form-group">
|
||||||
|
|
@ -54,12 +56,11 @@
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<% end %>
|
<% end %>
|
||||||
|
|
||||||
<%= form_for(resource,
|
<%= form_for(resource,
|
||||||
as: resource_name,
|
as: resource_name,
|
||||||
url: registration_path(resource_name, format: :json),
|
url: registration_path(resource_name, format: :json),
|
||||||
remote: true,
|
remote: true,
|
||||||
html: { method: :put, "data-for" => "full_name", class: 'settings-page-full-name' }) do |f| %>
|
html: { method: :put, "data-for" => "full_name", class: 'settings-page-full-name', id: 'user-full_name-field' }) do |f| %>
|
||||||
<div data-part="view">
|
<div data-part="view">
|
||||||
<div class="form-group">
|
<div class="form-group">
|
||||||
<%= f.label t("users.registrations.edit.name_label") %>
|
<%= f.label t("users.registrations.edit.name_label") %>
|
||||||
|
|
@ -90,7 +91,7 @@
|
||||||
as: resource_name,
|
as: resource_name,
|
||||||
url: registration_path(resource_name, format: :json),
|
url: registration_path(resource_name, format: :json),
|
||||||
remote: true,
|
remote: true,
|
||||||
html: { method: :put, "data-for" => "initials", class: 'settings-page-initials' }) do |f| %>
|
html: { method: :put, "data-for" => "initials", class: 'settings-page-initials', id: 'user-initials-field' }) do |f| %>
|
||||||
<div data-part="view">
|
<div data-part="view">
|
||||||
<div class="form-group">
|
<div class="form-group">
|
||||||
<%= f.label t("users.registrations.edit.initials_label") %>
|
<%= f.label t("users.registrations.edit.initials_label") %>
|
||||||
|
|
@ -121,7 +122,7 @@
|
||||||
as: resource_name,
|
as: resource_name,
|
||||||
url: registration_path(resource_name, format: :json),
|
url: registration_path(resource_name, format: :json),
|
||||||
remote: true,
|
remote: true,
|
||||||
html: { method: :put, "data-for" => "email", class: 'settings-page-email' }) do |f| %>
|
html: { method: :put, "data-for" => "email", class: 'settings-page-email', id: 'user-email-field' }) do |f| %>
|
||||||
<div data-part="view">
|
<div data-part="view">
|
||||||
<div class="form-group">
|
<div class="form-group">
|
||||||
<%= f.label t("users.registrations.edit.email_label") %>
|
<%= f.label t("users.registrations.edit.email_label") %>
|
||||||
|
|
@ -148,7 +149,7 @@
|
||||||
</div>
|
</div>
|
||||||
<div class="form-group">
|
<div class="form-group">
|
||||||
<%= f.label :current_password, t("users.registrations.edit.current_password_label") %> <i><%=t "users.registrations.edit.password_explanation" %></i>
|
<%= f.label :current_password, t("users.registrations.edit.current_password_label") %> <i><%=t "users.registrations.edit.password_explanation" %></i>
|
||||||
<%= f.password_field :current_password, autocomplete: "off", class: "form-control", "data-role" => "clear" %>
|
<%= f.password_field :current_password, autocomplete: "off", class: "form-control", "data-role" => "clear", id: 'edit-email-current-password' %>
|
||||||
</div>
|
</div>
|
||||||
<div>
|
<div>
|
||||||
<a href="#" class="btn btn-default" data-action="cancel"><%=t "general.cancel" %></a>
|
<a href="#" class="btn btn-default" data-action="cancel"><%=t "general.cancel" %></a>
|
||||||
|
|
@ -162,7 +163,7 @@
|
||||||
as: resource_name,
|
as: resource_name,
|
||||||
url: registration_path(resource_name, format: :json),
|
url: registration_path(resource_name, format: :json),
|
||||||
remote: true,
|
remote: true,
|
||||||
html: { method: :put, "data-for" => "password", class: 'settings-page-change-password' }) do |f| %>
|
html: { method: :put, "data-for" => "password", class: 'settings-page-change-password', id: 'user-password-field' }) do |f| %>
|
||||||
<%= hidden_field_tag "user[change_password]", "true" %>
|
<%= hidden_field_tag "user[change_password]", "true" %>
|
||||||
<div data-part="view">
|
<div data-part="view">
|
||||||
<div class="form-group">
|
<div class="form-group">
|
||||||
|
|
@ -180,7 +181,7 @@
|
||||||
<h4><%=t "users.registrations.edit.password_title" %></h4>
|
<h4><%=t "users.registrations.edit.password_title" %></h4>
|
||||||
<div class="form-group">
|
<div class="form-group">
|
||||||
<%= f.label :current_password, t("users.registrations.edit.current_password_label") %> <i><%=t "users.registrations.edit.password_explanation" %></i>
|
<%= f.label :current_password, t("users.registrations.edit.current_password_label") %> <i><%=t "users.registrations.edit.password_explanation" %></i>
|
||||||
<%= f.password_field :current_password, autocomplete: "off", class: "form-control", "data-role" => "clear" %>
|
<%= f.password_field :current_password, autocomplete: "off", class: "form-control", "data-role" => "clear", id: 'edit-password-current-password' %>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div class="form-group">
|
<div class="form-group">
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue