add slimselect to select elements with user content

This commit is contained in:
2024-10-26 14:21:00 -04:00
parent 16a5cb9254
commit 7e14f292a6
31 changed files with 576 additions and 477 deletions

View File

@ -129,7 +129,7 @@
{"Français", "fr"},
{"Español", "es"}
],
class: "mx-2 my-1 min-w-md input input-primary col-span-3"
class: "my-1 min-w-md input input-primary col-span-3"
) %>
<%= error_tag(f, :locale, "col-span-3") %>

View File

@ -44,7 +44,9 @@
phx-submit="save"
>
<%= select(f, :tag_id, tag_options(@tags, @container),
class: "text-center col-span-2 input input-primary"
class: "text-center col-span-2 input input-primary",
id: "#{@id}-tag-select",
phx_hook: "SlimSelect"
) %>
<%= error_tag(f, :tag_id, "col-span-3 text-center") %>

View File

@ -21,7 +21,9 @@
<%= label(f, :type_id, gettext("Type"), class: "title text-lg text-primary-600") %>
<%= select(f, :type_id, type_options(@types),
class: "text-center col-span-2 input input-primary"
class: "text-center col-span-2 input input-primary",
id: "pack-form-type-select",
phx_hook: "SlimSelect"
) %>
<%= error_tag(f, :type_id, "col-span-3 text-center") %>
@ -66,7 +68,9 @@
<%= label(f, :container, gettext("Container"), class: "title text-lg text-primary-600") %>
<%= select(f, :container_id, container_options(@containers),
class: "text-center col-span-2 input input-primary"
class: "text-center col-span-2 input input-primary",
id: "pack-form-container-select",
phx_hook: "SlimSelect"
) %>
<%= error_tag(f, :container_id, "col-span-3 text-center") %>

View File

@ -22,7 +22,11 @@
<%= select(
f,
:class,
[{gettext("Rifle"), :rifle}, {gettext("Shotgun"), :shotgun}, {gettext("Pistol"), :pistol}],
[
{gettext("Rifle"), :rifle},
{gettext("Shotgun"), :shotgun},
{gettext("Pistol"), :pistol}
],
class: "text-center col-span-2 input input-primary",
maxlength: 255
) %>