diff --git a/lib/lokal_web/templates/user_registration/new.html.heex b/lib/lokal_web/templates/user_registration/new.html.heex index 4718a19..efd16e0 100644 --- a/lib/lokal_web/templates/user_registration/new.html.heex +++ b/lib/lokal_web/templates/user_registration/new.html.heex @@ -5,7 +5,7 @@ <%= form_for @changeset, Routes.user_registration_path(@conn, :create), [class: "flex flex-col justify-center items-center space-y-4"], fn f -> %> - <%= if @changeset.action do %> + <%= if @changeset.action && not(@changeset.valid?) do %>

Oops, something went wrong! Please check the errors below.

@@ -24,7 +24,7 @@ <%= error_tag f, :password %> <%= submit "Register", class: "btn btn-primary" %> - +
@@ -34,4 +34,4 @@ class: "btn btn-primary" %>
<% end %> - \ No newline at end of file + diff --git a/lib/lokal_web/templates/user_reset_password/edit.html.heex b/lib/lokal_web/templates/user_reset_password/edit.html.heex index 1404edd..7d1c570 100644 --- a/lib/lokal_web/templates/user_reset_password/edit.html.heex +++ b/lib/lokal_web/templates/user_reset_password/edit.html.heex @@ -5,7 +5,7 @@ <%= form_for @changeset, Routes.user_reset_password_path(@conn, :update, @token), [class: "flex flex-col justify-center items-center space-y-4"], fn f -> %> - <%= if @changeset.action do %> + <%= if @changeset.action && not(@changeset.valid?) do %>

Oops, something went wrong! Please check the errors below.

@@ -24,9 +24,9 @@ <%= error_tag f, :password_confirmation %> <%= submit "Reset password", class: "btn btn-primary" %> - +
- +
<%= link "Register", to: Routes.user_registration_path(@conn, :new), class: "btn btn-primary" %> @@ -34,4 +34,4 @@ class: "btn btn-primary" %>
<% end %> - \ No newline at end of file +