2022-02-14 21:21:24 -05:00
|
|
|
<div>
|
2022-02-18 18:21:56 -05:00
|
|
|
<h2 class="mb-8 text-center title text-xl text-primary-600">
|
2022-02-14 21:21:24 -05:00
|
|
|
<%= @title %>
|
|
|
|
</h2>
|
|
|
|
<.form
|
2022-11-07 22:36:38 -05:00
|
|
|
:let={f}
|
2022-02-14 21:21:24 -05:00
|
|
|
for={@changeset}
|
2023-03-30 21:53:52 -04:00
|
|
|
id="type-form"
|
2022-02-14 21:21:24 -05:00
|
|
|
phx-target={@myself}
|
|
|
|
phx-change="validate"
|
|
|
|
phx-submit="save"
|
2022-02-19 18:06:50 -05:00
|
|
|
class="flex flex-col space-y-4 sm:space-y-0 sm:grid sm:grid-cols-3 sm:gap-4 justify-center items-center"
|
2022-02-14 21:21:24 -05:00
|
|
|
>
|
2023-02-04 10:28:13 -05:00
|
|
|
<div
|
2024-06-16 11:47:51 -04:00
|
|
|
:if={@changeset.action && not @changeset.valid?}
|
2023-02-04 10:28:13 -05:00
|
|
|
class="invalid-feedback col-span-3 text-center"
|
|
|
|
>
|
2023-03-23 22:07:25 -04:00
|
|
|
<%= dgettext("errors", "Oops, something went wrong! Please check the errors below.") %>
|
2023-02-04 10:28:13 -05:00
|
|
|
</div>
|
2022-02-14 21:21:24 -05:00
|
|
|
|
2023-03-28 23:08:40 -04:00
|
|
|
<%= label(f, :class, gettext("Class"), class: "title text-lg text-primary-600") %>
|
2023-03-23 22:07:25 -04:00
|
|
|
<%= select(
|
|
|
|
f,
|
2023-03-28 23:08:40 -04:00
|
|
|
:class,
|
2023-03-23 22:07:25 -04:00
|
|
|
[{gettext("Rifle"), :rifle}, {gettext("Shotgun"), :shotgun}, {gettext("Pistol"), :pistol}],
|
|
|
|
class: "text-center col-span-2 input input-primary",
|
|
|
|
maxlength: 255
|
|
|
|
) %>
|
2023-03-28 23:08:40 -04:00
|
|
|
<%= error_tag(f, :class, "col-span-3 text-center") %>
|
2023-03-23 22:07:25 -04:00
|
|
|
|
2022-02-20 20:28:42 -05:00
|
|
|
<%= label(f, :name, gettext("Name"), class: "title text-lg text-primary-600") %>
|
2023-03-19 23:46:42 -04:00
|
|
|
<%= text_input(f, :name,
|
|
|
|
class: "text-center col-span-2 input input-primary",
|
2024-07-28 12:52:41 -04:00
|
|
|
maxlength: 255,
|
|
|
|
phx_debounce: 300
|
2023-03-19 23:46:42 -04:00
|
|
|
) %>
|
2022-02-14 21:21:24 -05:00
|
|
|
<%= error_tag(f, :name, "col-span-3 text-center") %>
|
|
|
|
|
2022-02-20 20:28:42 -05:00
|
|
|
<%= label(f, :desc, gettext("Description"), class: "title text-lg text-primary-600") %>
|
2022-02-14 21:21:24 -05:00
|
|
|
<%= textarea(f, :desc,
|
|
|
|
class: "text-center col-span-2 input input-primary",
|
2024-07-28 12:52:41 -04:00
|
|
|
id: "type-form-desc",
|
|
|
|
phx_debounce: 300,
|
2023-03-18 22:13:32 -04:00
|
|
|
phx_update: "ignore"
|
2022-02-14 21:21:24 -05:00
|
|
|
) %>
|
|
|
|
<%= error_tag(f, :desc, "col-span-3 text-center") %>
|
|
|
|
|
2023-03-23 22:07:25 -04:00
|
|
|
<h2 class="text-center title text-lg text-primary-600 col-span-3">
|
|
|
|
<%= gettext("Dimensions") %>
|
|
|
|
</h2>
|
|
|
|
|
2023-03-28 23:08:40 -04:00
|
|
|
<%= if Changeset.get_field(@changeset, :class) in [:rifle, :pistol] do %>
|
2023-03-23 22:07:25 -04:00
|
|
|
<%= label(f, :cartridge, gettext("Cartridge"), class: "title text-lg text-primary-600") %>
|
|
|
|
<%= text_input(f, :cartridge,
|
|
|
|
class: "text-center col-span-2 input input-primary",
|
|
|
|
maxlength: 255,
|
2024-07-28 12:52:41 -04:00
|
|
|
phx_debounce: 300,
|
2023-03-23 22:07:25 -04:00
|
|
|
placeholder: gettext("5.56x46mm NATO")
|
|
|
|
) %>
|
|
|
|
<%= error_tag(f, :cartridge, "col-span-3 text-center") %>
|
|
|
|
<% else %>
|
|
|
|
<%= hidden_input(f, :cartridge, value: nil) %>
|
|
|
|
<% end %>
|
|
|
|
|
|
|
|
<%= label(
|
|
|
|
f,
|
|
|
|
:caliber,
|
2023-03-28 23:08:40 -04:00
|
|
|
if(Changeset.get_field(@changeset, :class) == :shotgun,
|
2023-03-23 22:07:25 -04:00
|
|
|
do: gettext("Gauge"),
|
|
|
|
else: gettext("Caliber")
|
|
|
|
),
|
|
|
|
class: "title text-lg text-primary-600"
|
|
|
|
) %>
|
|
|
|
<%= text_input(f, :caliber,
|
2022-02-14 21:21:24 -05:00
|
|
|
class: "text-center col-span-2 input input-primary",
|
2023-03-19 23:46:42 -04:00
|
|
|
maxlength: 255,
|
2024-07-28 12:52:41 -04:00
|
|
|
phx_debounce: 300,
|
2023-03-23 22:07:25 -04:00
|
|
|
placeholder: gettext(".223")
|
2022-02-14 21:21:24 -05:00
|
|
|
) %>
|
2023-03-23 22:07:25 -04:00
|
|
|
<%= error_tag(f, :caliber, "col-span-3 text-center") %>
|
2022-02-14 21:21:24 -05:00
|
|
|
|
2023-03-28 23:08:40 -04:00
|
|
|
<%= if Changeset.get_field(@changeset, :class) == :shotgun do %>
|
2023-03-23 22:07:25 -04:00
|
|
|
<%= label(f, :unfired_length, gettext("Unfired shell length"),
|
|
|
|
class: "title text-lg text-primary-600"
|
|
|
|
) %>
|
|
|
|
<%= text_input(f, :unfired_length,
|
|
|
|
class: "text-center col-span-2 input input-primary",
|
2024-07-28 12:52:41 -04:00
|
|
|
maxlength: 255,
|
|
|
|
phx_debounce: 300
|
2023-03-23 22:07:25 -04:00
|
|
|
) %>
|
|
|
|
<%= error_tag(f, :unfired_length, "col-span-3 text-center") %>
|
|
|
|
|
2023-09-07 19:14:42 -04:00
|
|
|
<%= label(f, :brass_height, gettext("Brass height"),
|
|
|
|
class: "title text-lg text-primary-600"
|
|
|
|
) %>
|
2023-03-23 22:07:25 -04:00
|
|
|
<%= text_input(f, :brass_height,
|
|
|
|
class: "text-center col-span-2 input input-primary",
|
2024-07-28 12:52:41 -04:00
|
|
|
maxlength: 255,
|
|
|
|
phx_debounce: 300
|
2023-03-23 22:07:25 -04:00
|
|
|
) %>
|
|
|
|
<%= error_tag(f, :brass_height, "col-span-3 text-center") %>
|
|
|
|
|
2023-09-07 19:14:42 -04:00
|
|
|
<%= label(f, :chamber_size, gettext("Chamber size"),
|
|
|
|
class: "title text-lg text-primary-600"
|
|
|
|
) %>
|
2023-03-23 22:07:25 -04:00
|
|
|
<%= text_input(f, :chamber_size,
|
|
|
|
class: "text-center col-span-2 input input-primary",
|
2024-07-28 12:52:41 -04:00
|
|
|
maxlength: 255,
|
|
|
|
phx_debounce: 300
|
2023-03-23 22:07:25 -04:00
|
|
|
) %>
|
|
|
|
<%= error_tag(f, :chamber_size, "col-span-3 text-center") %>
|
|
|
|
<% else %>
|
|
|
|
<%= hidden_input(f, :unfired_length, value: nil) %>
|
|
|
|
<%= hidden_input(f, :brass_height, value: nil) %>
|
|
|
|
<%= hidden_input(f, :chamber_size, value: nil) %>
|
|
|
|
<% end %>
|
|
|
|
|
|
|
|
<h2 class="text-center title text-lg text-primary-600 col-span-3">
|
|
|
|
<%= gettext("Projectile") %>
|
|
|
|
</h2>
|
|
|
|
|
|
|
|
<%= label(f, :grains, gettext("Grains"), class: "title text-lg text-primary-600") %>
|
|
|
|
<%= number_input(f, :grains,
|
|
|
|
step: "1",
|
2022-02-14 21:21:24 -05:00
|
|
|
class: "text-center col-span-2 input input-primary",
|
2023-03-23 22:07:25 -04:00
|
|
|
min: 1
|
2022-02-14 21:21:24 -05:00
|
|
|
) %>
|
2023-03-23 22:07:25 -04:00
|
|
|
<%= error_tag(f, :grains, "col-span-3 text-center") %>
|
|
|
|
|
2023-04-10 20:08:37 -04:00
|
|
|
<%= if Changeset.get_field(@changeset, :class) in [:rifle, :pistol] do %>
|
|
|
|
<%= label f, :bullet_type, class: "flex title text-lg text-primary-600 space-x-2" do %>
|
|
|
|
<p><%= gettext("Bullet type") %></p>
|
2022-02-14 21:21:24 -05:00
|
|
|
|
2023-04-10 20:08:37 -04:00
|
|
|
<.link
|
|
|
|
href="https://shootersreference.com/reloadingdata/bullet_abbreviations/"
|
|
|
|
class="link"
|
|
|
|
target="_blank"
|
|
|
|
rel="noopener noreferrer"
|
|
|
|
>
|
|
|
|
<i class="fas fa-md fa-external-link-alt"></i>
|
|
|
|
</.link>
|
|
|
|
<% end %>
|
|
|
|
<%= text_input(f, :bullet_type,
|
|
|
|
class: "text-center col-span-2 input input-primary",
|
|
|
|
maxlength: 255,
|
2024-07-28 12:52:41 -04:00
|
|
|
phx_debounce: 300,
|
2023-04-10 20:08:37 -04:00
|
|
|
placeholder: gettext("FMJ")
|
|
|
|
) %>
|
|
|
|
<%= error_tag(f, :bullet_type, "col-span-3 text-center") %>
|
|
|
|
<% else %>
|
|
|
|
<%= hidden_input(f, :bullet_type, value: nil) %>
|
2023-03-23 22:07:25 -04:00
|
|
|
<% end %>
|
2022-02-14 21:21:24 -05:00
|
|
|
|
2023-03-23 22:07:25 -04:00
|
|
|
<%= label(
|
|
|
|
f,
|
|
|
|
:bullet_core,
|
2023-03-28 23:08:40 -04:00
|
|
|
if(Changeset.get_field(@changeset, :class) == :shotgun,
|
2023-03-23 22:07:25 -04:00
|
|
|
do: gettext("Slug core"),
|
|
|
|
else: gettext("Bullet core")
|
|
|
|
),
|
|
|
|
class: "title text-lg text-primary-600"
|
|
|
|
) %>
|
|
|
|
<%= text_input(f, :bullet_core,
|
2022-02-14 21:21:24 -05:00
|
|
|
class: "text-center col-span-2 input input-primary",
|
2023-03-19 23:46:42 -04:00
|
|
|
maxlength: 255,
|
2024-07-28 12:52:41 -04:00
|
|
|
phx_debounce: 300,
|
2023-03-23 22:07:25 -04:00
|
|
|
placeholder: gettext("Steel")
|
2022-02-14 21:21:24 -05:00
|
|
|
) %>
|
2023-03-23 22:07:25 -04:00
|
|
|
<%= error_tag(f, :bullet_core, "col-span-3 text-center") %>
|
|
|
|
|
2023-03-28 23:08:40 -04:00
|
|
|
<%= if Changeset.get_field(@changeset, :class) in [:rifle, :pistol] do %>
|
2023-03-23 22:07:25 -04:00
|
|
|
<%= label(f, :jacket_type, gettext("Jacket type"), class: "title text-lg text-primary-600") %>
|
|
|
|
<%= text_input(f, :jacket_type,
|
|
|
|
class: "text-center col-span-2 input input-primary",
|
|
|
|
maxlength: 255,
|
2024-07-28 12:52:41 -04:00
|
|
|
phx_debounce: 300,
|
2023-03-23 22:07:25 -04:00
|
|
|
placeholder: gettext("Bimetal")
|
|
|
|
) %>
|
|
|
|
<%= error_tag(f, :jacket_type, "col-span-3 text-center") %>
|
|
|
|
<% else %>
|
|
|
|
<%= hidden_input(f, :jacket_type, value: nil) %>
|
|
|
|
<% end %>
|
2022-02-14 21:21:24 -05:00
|
|
|
|
2023-09-07 19:14:42 -04:00
|
|
|
<%= label(f, :case_material, gettext("Case material"),
|
|
|
|
class: "title text-lg text-primary-600"
|
|
|
|
) %>
|
2022-02-14 21:21:24 -05:00
|
|
|
<%= text_input(f, :case_material,
|
|
|
|
class: "text-center col-span-2 input input-primary",
|
2023-03-19 23:46:42 -04:00
|
|
|
maxlength: 255,
|
2024-07-28 12:52:41 -04:00
|
|
|
phx_debounce: 300,
|
2022-02-14 21:21:24 -05:00
|
|
|
placeholder: gettext("Brass")
|
|
|
|
) %>
|
|
|
|
<%= error_tag(f, :case_material, "col-span-3 text-center") %>
|
|
|
|
|
2023-03-28 23:08:40 -04:00
|
|
|
<%= if Changeset.get_field(@changeset, :class) == :shotgun do %>
|
2023-03-23 22:07:25 -04:00
|
|
|
<%= label(f, :wadding, gettext("Wadding"), class: "title text-lg text-primary-600") %>
|
|
|
|
<%= text_input(f, :wadding,
|
|
|
|
class: "text-center col-span-2 input input-primary",
|
2024-07-28 12:52:41 -04:00
|
|
|
maxlength: 255,
|
|
|
|
phx_debounce: 300
|
2023-03-23 22:07:25 -04:00
|
|
|
) %>
|
|
|
|
<%= error_tag(f, :wadding, "col-span-3 text-center") %>
|
2022-02-15 22:33:36 -05:00
|
|
|
|
2023-03-23 22:07:25 -04:00
|
|
|
<%= label(f, :shot_type, gettext("Shot type"), class: "title text-lg text-primary-600") %>
|
|
|
|
<%= text_input(f, :shot_type,
|
|
|
|
class: "text-center col-span-2 input input-primary",
|
|
|
|
maxlength: 255,
|
2024-07-28 12:52:41 -04:00
|
|
|
phx_debounce: 300,
|
2023-03-23 22:07:25 -04:00
|
|
|
placeholder: gettext("Target, bird, buck, etc")
|
|
|
|
) %>
|
|
|
|
<%= error_tag(f, :shot_type, "col-span-3 text-center") %>
|
|
|
|
|
|
|
|
<%= label(f, :shot_material, gettext("Shot material"),
|
|
|
|
class: "title text-lg text-primary-600"
|
|
|
|
) %>
|
|
|
|
<%= text_input(f, :shot_material,
|
|
|
|
class: "text-center col-span-2 input input-primary",
|
2024-07-28 12:52:41 -04:00
|
|
|
maxlength: 255,
|
|
|
|
phx_debounce: 300
|
2023-03-23 22:07:25 -04:00
|
|
|
) %>
|
|
|
|
<%= error_tag(f, :shot_material, "col-span-3 text-center") %>
|
|
|
|
|
|
|
|
<%= label(f, :shot_size, gettext("Shot size"), class: "title text-lg text-primary-600") %>
|
|
|
|
<%= text_input(f, :shot_size,
|
|
|
|
class: "text-center col-span-2 input input-primary",
|
2024-07-28 12:52:41 -04:00
|
|
|
maxlength: 255,
|
|
|
|
phx_debounce: 300
|
2023-03-23 22:07:25 -04:00
|
|
|
) %>
|
|
|
|
<%= error_tag(f, :shot_size, "col-span-3 text-center") %>
|
|
|
|
|
|
|
|
<%= label(f, :load_grains, gettext("Load grains"), class: "title text-lg text-primary-600") %>
|
|
|
|
<%= number_input(f, :load_grains,
|
|
|
|
step: "1",
|
|
|
|
class: "text-center col-span-2 input input-primary",
|
|
|
|
min: 1
|
|
|
|
) %>
|
|
|
|
<%= error_tag(f, :load_grains, "col-span-3 text-center") %>
|
|
|
|
|
|
|
|
<%= label(f, :shot_charge_weight, gettext("Shot charge weight"),
|
|
|
|
class: "title text-lg text-primary-600"
|
|
|
|
) %>
|
|
|
|
<%= text_input(f, :shot_charge_weight,
|
|
|
|
class: "text-center col-span-2 input input-primary",
|
2024-07-28 12:52:41 -04:00
|
|
|
maxlength: 255,
|
|
|
|
phx_debounce: 300
|
2023-03-23 22:07:25 -04:00
|
|
|
) %>
|
|
|
|
<%= error_tag(f, :shot_charge_weight, "col-span-3 text-center") %>
|
|
|
|
<% else %>
|
|
|
|
<%= hidden_input(f, :wadding, value: nil) %>
|
|
|
|
<%= hidden_input(f, :shot_type, value: nil) %>
|
|
|
|
<%= hidden_input(f, :shot_material, value: nil) %>
|
|
|
|
<%= hidden_input(f, :shot_size, value: nil) %>
|
|
|
|
<%= hidden_input(f, :load_grains, value: nil) %>
|
|
|
|
<%= hidden_input(f, :shot_charge_weight, value: nil) %>
|
|
|
|
<% end %>
|
|
|
|
|
|
|
|
<h2 class="text-center title text-lg text-primary-600 col-span-3">
|
|
|
|
<%= gettext("Powder") %>
|
|
|
|
</h2>
|
2022-02-15 22:33:36 -05:00
|
|
|
|
2022-02-20 20:40:24 -05:00
|
|
|
<%= label(f, :powder_type, gettext("Powder type"), class: "title text-lg text-primary-600") %>
|
2023-03-19 23:46:42 -04:00
|
|
|
<%= text_input(f, :powder_type,
|
|
|
|
class: "text-center col-span-2 input input-primary",
|
2024-07-28 12:52:41 -04:00
|
|
|
maxlength: 255,
|
|
|
|
phx_debounce: 300
|
2023-03-19 23:46:42 -04:00
|
|
|
) %>
|
2022-02-15 22:33:36 -05:00
|
|
|
<%= error_tag(f, :powder_type, "col-span-3 text-center") %>
|
|
|
|
|
2023-03-28 23:08:40 -04:00
|
|
|
<%= if Changeset.get_field(@changeset, :class) in [:rifle, :pistol] do %>
|
2023-03-23 22:07:25 -04:00
|
|
|
<%= label(f, :powder_grains_per_charge, gettext("Powder grains per charge"),
|
|
|
|
class: "title text-lg text-primary-600"
|
|
|
|
) %>
|
|
|
|
<%= number_input(f, :powder_grains_per_charge,
|
|
|
|
step: "1",
|
|
|
|
class: "text-center col-span-2 input input-primary",
|
|
|
|
min: 1
|
|
|
|
) %>
|
|
|
|
<%= error_tag(f, :powder_grains_per_charge, "col-span-3 text-center") %>
|
|
|
|
<% else %>
|
|
|
|
<%= hidden_input(f, :powder_grains_per_charge, value: nil) %>
|
|
|
|
<% end %>
|
2022-02-14 21:21:24 -05:00
|
|
|
|
2022-02-20 20:28:42 -05:00
|
|
|
<%= label(f, :pressure, gettext("Pressure"), class: "title text-lg text-primary-600") %>
|
2022-02-14 21:21:24 -05:00
|
|
|
<%= text_input(f, :pressure,
|
|
|
|
class: "text-center col-span-2 input input-primary",
|
2023-03-19 23:46:42 -04:00
|
|
|
maxlength: 255,
|
2024-07-28 12:52:41 -04:00
|
|
|
phx_debounce: 300,
|
2023-03-18 22:13:32 -04:00
|
|
|
placeholder: gettext("+P")
|
2022-02-14 21:21:24 -05:00
|
|
|
) %>
|
|
|
|
<%= error_tag(f, :pressure, "col-span-3 text-center") %>
|
|
|
|
|
2023-03-28 23:08:40 -04:00
|
|
|
<%= if Changeset.get_field(@changeset, :class) == :shotgun do %>
|
2023-03-23 22:07:25 -04:00
|
|
|
<%= label(f, :dram_equivalent, gettext("Dram equivalent"),
|
|
|
|
class: "title text-lg text-primary-600"
|
|
|
|
) %>
|
|
|
|
<%= text_input(f, :dram_equivalent,
|
|
|
|
class: "text-center col-span-2 input input-primary",
|
2024-07-28 12:52:41 -04:00
|
|
|
maxlength: 255,
|
|
|
|
phx_debounce: 300
|
2023-03-23 22:07:25 -04:00
|
|
|
) %>
|
|
|
|
<%= error_tag(f, :dram_equivalent, "col-span-3 text-center") %>
|
|
|
|
<% else %>
|
|
|
|
<%= hidden_input(f, :dram_equivalent, value: nil) %>
|
|
|
|
<% end %>
|
|
|
|
|
2023-03-28 23:08:40 -04:00
|
|
|
<%= if Changeset.get_field(@changeset, :class) in [:rifle, :pistol] do %>
|
2023-03-23 22:07:25 -04:00
|
|
|
<%= label(f, :muzzle_velocity, gettext("Muzzle velocity"),
|
|
|
|
class: "title text-lg text-primary-600"
|
|
|
|
) %>
|
|
|
|
<%= number_input(f, :muzzle_velocity,
|
|
|
|
step: "1",
|
|
|
|
class: "text-center col-span-2 input input-primary",
|
|
|
|
min: 1
|
|
|
|
) %>
|
|
|
|
<%= error_tag(f, :muzzle_velocity, "col-span-3 text-center") %>
|
|
|
|
<% else %>
|
|
|
|
<%= hidden_input(f, :muzzle_velocity, value: nil) %>
|
|
|
|
<% end %>
|
|
|
|
|
|
|
|
<h2 class="text-center title text-lg text-primary-600 col-span-3">
|
|
|
|
<%= gettext("Primer") %>
|
|
|
|
</h2>
|
|
|
|
|
2022-02-20 20:40:24 -05:00
|
|
|
<%= label(f, :primer_type, gettext("Primer type"), class: "title text-lg text-primary-600") %>
|
2022-02-14 21:21:24 -05:00
|
|
|
<%= text_input(f, :primer_type,
|
|
|
|
class: "text-center col-span-2 input input-primary",
|
2023-03-19 23:46:42 -04:00
|
|
|
maxlength: 255,
|
2024-07-28 12:52:41 -04:00
|
|
|
phx_debounce: 300,
|
2023-03-18 22:13:32 -04:00
|
|
|
placeholder: gettext("Boxer")
|
2022-02-14 21:21:24 -05:00
|
|
|
) %>
|
|
|
|
<%= error_tag(f, :primer_type, "col-span-3 text-center") %>
|
|
|
|
|
2022-02-20 20:40:24 -05:00
|
|
|
<%= label(f, :firing_type, gettext("Firing type"), class: "title text-lg text-primary-600") %>
|
2022-02-16 00:10:18 -05:00
|
|
|
<%= text_input(f, :firing_type,
|
|
|
|
class: "text-center col-span-2 input input-primary",
|
2023-03-19 23:46:42 -04:00
|
|
|
maxlength: 255,
|
2024-07-28 12:52:41 -04:00
|
|
|
phx_debounce: 300,
|
2023-03-18 22:13:32 -04:00
|
|
|
placeholder: gettext("Centerfire")
|
2022-02-16 00:10:18 -05:00
|
|
|
) %>
|
|
|
|
<%= error_tag(f, :firing_type, "col-span-3 text-center") %>
|
2022-02-14 21:21:24 -05:00
|
|
|
|
2023-03-23 22:07:25 -04:00
|
|
|
<h2 class="text-center title text-lg text-primary-600 col-span-3">
|
|
|
|
<%= gettext("Attributes") %>
|
|
|
|
</h2>
|
|
|
|
|
2022-02-20 20:28:42 -05:00
|
|
|
<%= label(f, :tracer, gettext("Tracer"), class: "title text-lg text-primary-600") %>
|
2022-02-14 21:21:24 -05:00
|
|
|
<%= checkbox(f, :tracer, class: "text-center col-span-2 checkbox") %>
|
|
|
|
<%= error_tag(f, :tracer, "col-span-3 text-center") %>
|
|
|
|
|
2022-02-20 20:28:42 -05:00
|
|
|
<%= label(f, :incendiary, gettext("Incendiary"), class: "title text-lg text-primary-600") %>
|
2022-02-14 21:21:24 -05:00
|
|
|
<%= checkbox(f, :incendiary, class: "text-center col-span-2 checkbox") %>
|
|
|
|
<%= error_tag(f, :incendiary, "col-span-3 text-center") %>
|
|
|
|
|
2022-02-20 20:28:42 -05:00
|
|
|
<%= label(f, :blank, gettext("Blank"), class: "title text-lg text-primary-600") %>
|
2022-02-14 21:21:24 -05:00
|
|
|
<%= checkbox(f, :blank, class: "text-center col-span-2 checkbox") %>
|
|
|
|
<%= error_tag(f, :blank, "col-span-3 text-center") %>
|
|
|
|
|
2022-02-20 20:28:42 -05:00
|
|
|
<%= label(f, :corrosive, gettext("Corrosive"), class: "title text-lg text-primary-600") %>
|
2022-02-14 21:21:24 -05:00
|
|
|
<%= checkbox(f, :corrosive, class: "text-center col-span-2 checkbox") %>
|
|
|
|
<%= error_tag(f, :corrosive, "col-span-3 text-center") %>
|
|
|
|
|
2023-03-23 22:07:25 -04:00
|
|
|
<h2 class="text-center title text-lg text-primary-600 col-span-3">
|
|
|
|
<%= gettext("Manufacturer") %>
|
|
|
|
</h2>
|
|
|
|
|
2022-02-20 20:40:24 -05:00
|
|
|
<%= label(f, :manufacturer, gettext("Manufacturer"), class: "title text-lg text-primary-600") %>
|
2023-03-19 23:46:42 -04:00
|
|
|
<%= text_input(f, :manufacturer,
|
|
|
|
class: "text-center col-span-2 input input-primary",
|
2024-07-28 12:52:41 -04:00
|
|
|
maxlength: 255,
|
|
|
|
phx_debounce: 300
|
2023-03-19 23:46:42 -04:00
|
|
|
) %>
|
2022-02-14 21:21:24 -05:00
|
|
|
<%= error_tag(f, :manufacturer, "col-span-3 text-center") %>
|
|
|
|
|
2022-02-20 20:28:42 -05:00
|
|
|
<%= label(f, :upc, gettext("UPC"), class: "title text-lg text-primary-600") %>
|
2023-03-19 23:46:42 -04:00
|
|
|
<%= text_input(f, :upc,
|
|
|
|
class: "text-center col-span-2 input input-primary",
|
2024-07-28 12:52:41 -04:00
|
|
|
maxlength: 255,
|
|
|
|
phx_debounce: 300
|
2023-03-19 23:46:42 -04:00
|
|
|
) %>
|
2022-02-15 22:33:36 -05:00
|
|
|
<%= error_tag(f, :upc, "col-span-3 text-center") %>
|
2022-02-14 21:21:24 -05:00
|
|
|
|
|
|
|
<%= submit(dgettext("actions", "Save"),
|
|
|
|
phx_disable_with: dgettext("prompts", "Saving..."),
|
|
|
|
class: "mx-auto col-span-3 btn btn-primary"
|
|
|
|
) %>
|
|
|
|
</.form>
|
|
|
|
</div>
|