Packages

Athena Event Logistics - Backend / Web

Current section

Files

Jump to
athena_logistics lib athena_web admin templates movement form.html.heex
Raw

lib/athena_web/admin/templates/movement/form.html.heex

<%= form_for @changeset, @action, fn f -> %>
<%= if @changeset.action do %>
<div class="alert alert-danger">
<p>
<%= gettext("Oops, something went wrong! Please check the errors below.") %>
</p>
</div>
<% end %>
<%= label(f, :source_location_id, gettext("source location")) %>
<%= select(f, :source_location_id, Enum.map(@locations, &{&1.name, &1.id}),
prompt: gettext("supply")
) %>
<%= error_tag(f, :source_location_id) %>
<%= label(f, :destination_location_id, gettext("destination location")) %>
<%= select(f, :destination_location_id, Enum.map(@locations, &{&1.name, &1.id}),
prompt: gettext("consumption")
) %>
<%= error_tag(f, :destination_location_id) %>
<%= label(f, :amount, gettext("amount")) %>
<%= number_input(f, :amount) %>
<%= error_tag(f, :amount) %>
<div>
<%= "save" |> gettext |> submit %>
</div>
<% end %>