forked from shibao/cannery
fix changeset errors
This commit is contained in:
parent
3996e8413c
commit
850fdd908e
@ -12,7 +12,7 @@
|
|||||||
phx-change="validate"
|
phx-change="validate"
|
||||||
phx-submit="save"
|
phx-submit="save"
|
||||||
>
|
>
|
||||||
<%= unless @changeset.valid? do %>
|
<%= if @changeset.action && not @changeset.valid? do %>
|
||||||
<div class="invalid-feedback col-span-3 text-center">
|
<div class="invalid-feedback col-span-3 text-center">
|
||||||
<%= changeset_errors(@changeset) %>
|
<%= changeset_errors(@changeset) %>
|
||||||
</div>
|
</div>
|
||||||
|
@ -12,7 +12,7 @@
|
|||||||
phx-submit="save"
|
phx-submit="save"
|
||||||
class="grid grid-cols-3 justify-center items-center space-y-4"
|
class="grid grid-cols-3 justify-center items-center space-y-4"
|
||||||
>
|
>
|
||||||
<%= unless @changeset.valid? do %>
|
<%= if @changeset.action && not @changeset.valid? do %>
|
||||||
<div class="invalid-feedback col-span-3 text-center">
|
<div class="invalid-feedback col-span-3 text-center">
|
||||||
<%= changeset_errors(@changeset) %>
|
<%= changeset_errors(@changeset) %>
|
||||||
</div>
|
</div>
|
||||||
|
@ -11,7 +11,7 @@
|
|||||||
phx-submit="save"
|
phx-submit="save"
|
||||||
class="grid grid-cols-3 justify-center items-center space-y-4"
|
class="grid grid-cols-3 justify-center items-center space-y-4"
|
||||||
>
|
>
|
||||||
<%= unless @changeset.valid? do %>
|
<%= if @changeset.action && not @changeset.valid? do %>
|
||||||
<div class="invalid-feedback col-span-3 text-center">
|
<div class="invalid-feedback col-span-3 text-center">
|
||||||
<%= changeset_errors(@changeset) %>
|
<%= changeset_errors(@changeset) %>
|
||||||
</div>
|
</div>
|
||||||
|
@ -11,7 +11,7 @@
|
|||||||
phx-change="validate"
|
phx-change="validate"
|
||||||
phx-submit="save"
|
phx-submit="save"
|
||||||
>
|
>
|
||||||
<%= unless @changeset.valid? do %>
|
<%= if @changeset.action && not @changeset.valid? do %>
|
||||||
<div class="invalid-feedback col-span-3 text-center">
|
<div class="invalid-feedback col-span-3 text-center">
|
||||||
<%= changeset_errors(@changeset) %>
|
<%= changeset_errors(@changeset) %>
|
||||||
</div>
|
</div>
|
||||||
|
@ -11,7 +11,7 @@
|
|||||||
phx-change="validate"
|
phx-change="validate"
|
||||||
phx-submit="save"
|
phx-submit="save"
|
||||||
>
|
>
|
||||||
<%= unless @changeset.valid? do %>
|
<%= if @changeset.action && not @changeset.valid? do %>
|
||||||
<div class="invalid-feedback col-span-3 text-center">
|
<div class="invalid-feedback col-span-3 text-center">
|
||||||
<%= changeset_errors(@changeset) %>
|
<%= changeset_errors(@changeset) %>
|
||||||
</div>
|
</div>
|
||||||
|
@ -12,7 +12,7 @@
|
|||||||
phx-change="validate"
|
phx-change="validate"
|
||||||
phx-submit="save"
|
phx-submit="save"
|
||||||
>
|
>
|
||||||
<%= unless @changeset.valid? do %>
|
<%= if @changeset.action && not @changeset.valid? do %>
|
||||||
<div class="invalid-feedback col-span-3 text-center">
|
<div class="invalid-feedback col-span-3 text-center">
|
||||||
<%= changeset_errors(@changeset) %>
|
<%= changeset_errors(@changeset) %>
|
||||||
</div>
|
</div>
|
||||||
|
@ -41,7 +41,7 @@ defmodule CanneryWeb.TagLive.FormComponent do
|
|||||||
phx-change="validate"
|
phx-change="validate"
|
||||||
phx-submit="save"
|
phx-submit="save"
|
||||||
>
|
>
|
||||||
<%= unless @changeset.valid? do %>
|
<%= if @changeset.action && not @changeset.valid? do %>
|
||||||
<div class="invalid-feedback col-span-3 text-center">
|
<div class="invalid-feedback col-span-3 text-center">
|
||||||
<%= changeset_errors(@changeset) %>
|
<%= changeset_errors(@changeset) %>
|
||||||
</div>
|
</div>
|
||||||
|
@ -7,7 +7,7 @@
|
|||||||
Routes.user_registration_path(@conn, :create),
|
Routes.user_registration_path(@conn, :create),
|
||||||
[class: "flex flex-col justify-center items-center space-y-4"],
|
[class: "flex flex-col justify-center items-center space-y-4"],
|
||||||
fn f -> %>
|
fn f -> %>
|
||||||
<%= unless @changeset.valid? do %>
|
<%= if @changeset.action && not @changeset.valid? do %>
|
||||||
<div class="alert alert-danger">
|
<div class="alert alert-danger">
|
||||||
<p>
|
<p>
|
||||||
<%= dgettext("errors", "Oops, something went wrong! Please check the errors below.") %>
|
<%= dgettext("errors", "Oops, something went wrong! Please check the errors below.") %>
|
||||||
|
@ -7,7 +7,7 @@
|
|||||||
Routes.user_reset_password_path(@conn, :update, @token),
|
Routes.user_reset_password_path(@conn, :update, @token),
|
||||||
[class: "flex flex-col justify-center items-center space-y-4"],
|
[class: "flex flex-col justify-center items-center space-y-4"],
|
||||||
fn f -> %>
|
fn f -> %>
|
||||||
<%= unless @changeset.valid? do %>
|
<%= if @changeset.action && not @changeset.valid? do %>
|
||||||
<div class="alert alert-danger">
|
<div class="alert alert-danger">
|
||||||
<p>
|
<p>
|
||||||
<%= dgettext("errors", "Oops, something went wrong! Please check the errors below.") %>
|
<%= dgettext("errors", "Oops, something went wrong! Please check the errors below.") %>
|
||||||
|
Loading…
Reference in New Issue
Block a user