forked from shibao/cannery
improve templates
This commit is contained in:
@ -3,20 +3,17 @@
|
||||
<%= dgettext("actions", "Register") %>
|
||||
</h1>
|
||||
|
||||
<%= form_for @changeset,
|
||||
Routes.user_registration_path(@conn, :create),
|
||||
[
|
||||
class:
|
||||
"flex flex-col space-y-4 sm:space-y-0 sm:grid sm:grid-cols-3 sm:gap-4 justify-center items-center"
|
||||
],
|
||||
fn f -> %>
|
||||
<%= if @changeset.action && not @changeset.valid? do %>
|
||||
<div class="alert alert-danger col-span-3">
|
||||
<p>
|
||||
<%= dgettext("errors", "Oops, something went wrong! Please check the errors below.") %>
|
||||
</p>
|
||||
</div>
|
||||
<% end %>
|
||||
<.form
|
||||
:let={f}
|
||||
for={@changeset}
|
||||
action={Routes.user_registration_path(@conn, :create)}
|
||||
class="flex flex-col space-y-4 sm:space-y-0 sm:grid sm:grid-cols-3 sm:gap-4 justify-center items-center"
|
||||
>
|
||||
<div :if={@changeset.action && not @changeset.valid?()} class="alert alert-danger col-span-3">
|
||||
<p>
|
||||
<%= dgettext("errors", "Oops, something went wrong! Please check the errors below.") %>
|
||||
</p>
|
||||
</div>
|
||||
|
||||
<%= if @invite do %>
|
||||
<%= hidden_input(f, :invite_token, value: @invite.token) %>
|
||||
@ -40,7 +37,7 @@
|
||||
<%= error_tag(f, :locale) %>
|
||||
|
||||
<%= submit(dgettext("actions", "Register"), class: "mx-auto btn btn-primary col-span-3") %>
|
||||
<% end %>
|
||||
</.form>
|
||||
|
||||
<hr class="hr" />
|
||||
|
||||
|
Reference in New Issue
Block a user