diff --git a/lib/cannery_web/components/add_shot_group_component.html.heex b/lib/cannery_web/components/add_shot_group_component.html.heex index eeb685d9..d079472a 100644 --- a/lib/cannery_web/components/add_shot_group_component.html.heex +++ b/lib/cannery_web/components/add_shot_group_component.html.heex @@ -12,7 +12,7 @@ phx-change="validate" phx-submit="save" > - <%= unless @changeset.valid? do %> + <%= if @changeset.action && not @changeset.valid? do %>
<%= changeset_errors(@changeset) %>
diff --git a/lib/cannery_web/live/ammo_group_live/form_component.html.heex b/lib/cannery_web/live/ammo_group_live/form_component.html.heex index 0e6bbcf9..5baee65b 100644 --- a/lib/cannery_web/live/ammo_group_live/form_component.html.heex +++ b/lib/cannery_web/live/ammo_group_live/form_component.html.heex @@ -12,7 +12,7 @@ phx-submit="save" class="grid grid-cols-3 justify-center items-center space-y-4" > - <%= unless @changeset.valid? do %> + <%= if @changeset.action && not @changeset.valid? do %>
<%= changeset_errors(@changeset) %>
diff --git a/lib/cannery_web/live/ammo_type_live/form_component.html.heex b/lib/cannery_web/live/ammo_type_live/form_component.html.heex index 654927bb..3fe52544 100644 --- a/lib/cannery_web/live/ammo_type_live/form_component.html.heex +++ b/lib/cannery_web/live/ammo_type_live/form_component.html.heex @@ -11,7 +11,7 @@ phx-submit="save" class="grid grid-cols-3 justify-center items-center space-y-4" > - <%= unless @changeset.valid? do %> + <%= if @changeset.action && not @changeset.valid? do %>
<%= changeset_errors(@changeset) %>
diff --git a/lib/cannery_web/live/container_live/form_component.html.heex b/lib/cannery_web/live/container_live/form_component.html.heex index 32f6fa55..a51975d9 100644 --- a/lib/cannery_web/live/container_live/form_component.html.heex +++ b/lib/cannery_web/live/container_live/form_component.html.heex @@ -11,7 +11,7 @@ phx-change="validate" phx-submit="save" > - <%= unless @changeset.valid? do %> + <%= if @changeset.action && not @changeset.valid? do %>
<%= changeset_errors(@changeset) %>
diff --git a/lib/cannery_web/live/invite_live/form_component.html.heex b/lib/cannery_web/live/invite_live/form_component.html.heex index 3a204adb..97f228ec 100644 --- a/lib/cannery_web/live/invite_live/form_component.html.heex +++ b/lib/cannery_web/live/invite_live/form_component.html.heex @@ -11,7 +11,7 @@ phx-change="validate" phx-submit="save" > - <%= unless @changeset.valid? do %> + <%= if @changeset.action && not @changeset.valid? do %>
<%= changeset_errors(@changeset) %>
diff --git a/lib/cannery_web/live/range_live/form_component.html.heex b/lib/cannery_web/live/range_live/form_component.html.heex index fe1238f4..b3a4508d 100644 --- a/lib/cannery_web/live/range_live/form_component.html.heex +++ b/lib/cannery_web/live/range_live/form_component.html.heex @@ -12,7 +12,7 @@ phx-change="validate" phx-submit="save" > - <%= unless @changeset.valid? do %> + <%= if @changeset.action && not @changeset.valid? do %>
<%= changeset_errors(@changeset) %>
diff --git a/lib/cannery_web/live/tag_live/form_component.ex b/lib/cannery_web/live/tag_live/form_component.ex index 8ed6a033..dd1122f9 100644 --- a/lib/cannery_web/live/tag_live/form_component.ex +++ b/lib/cannery_web/live/tag_live/form_component.ex @@ -41,7 +41,7 @@ defmodule CanneryWeb.TagLive.FormComponent do phx-change="validate" phx-submit="save" > - <%= unless @changeset.valid? do %> + <%= if @changeset.action && not @changeset.valid? do %>
<%= changeset_errors(@changeset) %>
diff --git a/lib/cannery_web/templates/user_registration/new.html.heex b/lib/cannery_web/templates/user_registration/new.html.heex index fe87f270..e4b3a13c 100644 --- a/lib/cannery_web/templates/user_registration/new.html.heex +++ b/lib/cannery_web/templates/user_registration/new.html.heex @@ -7,7 +7,7 @@ Routes.user_registration_path(@conn, :create), [class: "flex flex-col justify-center items-center space-y-4"], fn f -> %> - <%= unless @changeset.valid? do %> + <%= if @changeset.action && not @changeset.valid? do %>

<%= dgettext("errors", "Oops, something went wrong! Please check the errors below.") %> diff --git a/lib/cannery_web/templates/user_reset_password/edit.html.heex b/lib/cannery_web/templates/user_reset_password/edit.html.heex index acf55ad9..667a33bf 100644 --- a/lib/cannery_web/templates/user_reset_password/edit.html.heex +++ b/lib/cannery_web/templates/user_reset_password/edit.html.heex @@ -7,7 +7,7 @@ Routes.user_reset_password_path(@conn, :update, @token), [class: "flex flex-col justify-center items-center space-y-4"], fn f -> %> - <%= unless @changeset.valid? do %> + <%= if @changeset.action && not @changeset.valid? do %>

<%= dgettext("errors", "Oops, something went wrong! Please check the errors below.") %>