forked from fixin.me/fixin.me
Display errors for table-embedeed forms
This commit is contained in:
@@ -1,4 +1,6 @@
|
||||
<%= yield %>
|
||||
|
||||
<%# Some views may convert ActiveRecord errors to flashes, render at the end. %>
|
||||
<%= turbo_stream.update :flashes do %>
|
||||
<%= render_flash_messages %>
|
||||
<% end %>
|
||||
<%= yield %>
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
<%= fields_for @unit do |form| %>
|
||||
<%= tabular_fields_for @unit do |form| %>
|
||||
<%= tag.tr id: dom_id(@unit), class: "form", onkeydown: "processKey(event)",
|
||||
data: {link_id: link_id} do %>
|
||||
|
||||
|
||||
@@ -1,2 +1,3 @@
|
||||
<%= turbo_stream.close_form @unit %>
|
||||
<%= turbo_stream.update :flashes %>
|
||||
<%#= turbo_stream.focus link_id %>
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
<div class="main">
|
||||
<%= tabular_form_for resource, url: user_confirmation_path do |f| %>
|
||||
<%= labelled_form_for resource, url: user_confirmation_path do |f| %>
|
||||
<%= f.email_field :email, required: true, size: 30, autofocus: true, autocomplete: "email",
|
||||
value: (resource.pending_reconfirmation? ? resource.unconfirmed_email : resource.email) %>
|
||||
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
<div class="main">
|
||||
<%= tabular_form_for resource, url: user_password_path, html: {method: :put} do |f| %>
|
||||
<%= labelled_form_for resource, url: user_password_path, html: {method: :put} do |f| %>
|
||||
<%= f.hidden_field :reset_password_token, label: false %>
|
||||
|
||||
<%= f.password_field :password, label: t(".new_password"), required: true, size: 30,
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
<div class="main">
|
||||
<%= tabular_form_for resource, url: user_password_path do |f| %>
|
||||
<%= labelled_form_for resource, url: user_password_path do |f| %>
|
||||
<%= f.email_field :email, required: true, size: 30, autofocus: true, autocomplete: "email" %>
|
||||
|
||||
<%= f.submit t(:recover_password) %>
|
||||
|
||||
@@ -9,7 +9,7 @@
|
||||
</div>
|
||||
<% end %>
|
||||
|
||||
<%= tabular_form_for resource, url: registration_path(resource), html: {method: :patch} do |f| %>
|
||||
<%= labelled_form_for resource, url: registration_path(resource), html: {method: :patch} do |f| %>
|
||||
<%= f.email_field :email, size: 30, autofocus: true, autocomplete: "off" %>
|
||||
<% if f.object.pending_reconfirmation? %>
|
||||
<%= f.text_field :unconfirmed_email, readonly: true, tabindex: -1,
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
<div class="main">
|
||||
<%= tabular_form_for resource, url: user_registration_path do |f| %>
|
||||
<%= labelled_form_for resource, url: user_registration_path do |f| %>
|
||||
<%= f.email_field :email, required: true, size: 30, autofocus: true, autocomplete: "email" %>
|
||||
<%= f.password_field :password, required: true, size: 30,
|
||||
minlength: @minimum_password_length, autocomplete: "new-password",
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
<div class="main">
|
||||
<%= tabular_form_for resource, url: user_session_path do |f| %>
|
||||
<%= labelled_form_for resource, url: user_session_path do |f| %>
|
||||
<%= f.email_field :email, required: true, size: 30, autofocus: true, autocomplete: "email" %>
|
||||
<%= f.password_field :password, required: true, size: 30, minlength: @minimum_password_length,
|
||||
autocomplete: "current-password" %>
|
||||
|
||||
@@ -4,7 +4,7 @@
|
||||
</div>
|
||||
<% end %>
|
||||
|
||||
<%= tabular_form_for @user do |f| %>
|
||||
<%= labelled_form_for @user do |f| %>
|
||||
<%= f.email_field :email, readonly: true %>
|
||||
<% if f.object.pending_reconfirmation? %>
|
||||
<%= f.email_field :unconfirmed_email, readonly: true,
|
||||
|
||||
Reference in New Issue
Block a user