Current section

Files

Jump to
corex priv templates corex.gen.html new.html.heex
Raw

priv/templates/corex.gen.html/new.html.heex

<%= if layout_mode || layout_theme || layout_locale || scope do %><Layouts.app
flash={@flash}<%= if layout_mode do %>
mode={@mode}<% end %><%= if layout_theme do %>
theme={@theme}<% end %><%= if layout_locale do %>
locale={@locale}
current_path={@current_path}<% end %><%= if scope do %>
<%= scope.assign_key %>={@<%= scope.assign_key %>}<% end %>
>
<% else %><Layouts.app flash={@flash}><% end %>
<article class="layout__article">
<.layout_heading class="layout-heading">
<:title>New <%= schema.human_singular %></:title>
<:subtitle>Use this form to manage <%= schema.singular %> records in your database.</:subtitle>
</.layout_heading>
<.<%= schema.singular %>_form
form={to_form(@changeset, as: :<%= String.to_atom(schema.singular) %>, id: "<%= schema.singular %>-form")}
action={~p"<%= if layout_locale do %>/#{@locale}<% end %><%= scope_assign_route_prefix %><%= schema.route_prefix %>"}
return_to={~p"<%= if layout_locale do %>/#{@locale}<% end %><%= scope_assign_route_prefix %><%= schema.route_prefix %>"}
/>
</article>
</Layouts.app>