Use Fluxon components for record edit form

This commit is contained in:
Claudio Ortolina
2025-05-01 20:30:44 +01:00
parent cfe357239b
commit 584c5cf3e0
2 changed files with 5 additions and 9 deletions
-2
View File
@@ -8,8 +8,6 @@
The heroicons installation itself is managed by your mix.exs */
@plugin "../vendor/heroicons";
@plugin "@tailwindcss/forms";
@custom-variant phx-click-loading (.phx-click-loading&, .phx-click-loading &);
@custom-variant phx-submit-loading (.phx-submit-loading&, .phx-submit-loading &);
@custom-variant phx-change-loading (.phx-change-loading&, .phx-change-loading &);
@@ -35,7 +35,7 @@ defmodule MusicLibraryWeb.FormComponent do
phx-auto-recover="recover_form"
phx-submit="save"
>
<div class="sm:columns-2">
<div class="sm:columns-2 space-y-2">
<Fluxon.Components.Select.select
field={@form[:type]}
label={gettext("Type")}
@@ -47,10 +47,9 @@ defmodule MusicLibraryWeb.FormComponent do
options={formats_with_labels()}
/>
</div>
<.input
input_class="font-mono"
<Fluxon.Components.Input.input
class="font-mono"
field={@form[:musicbrainz_id]}
type="text"
label={gettext("MusicBrainz ID")}
/>
<Fluxon.Components.Select.select
@@ -59,11 +58,10 @@ defmodule MusicLibraryWeb.FormComponent do
options={selected_release_id_options(@record)}
/>
<div class="sm:columns-2">
<.input field={@form[:release_date]} type="text" label={gettext("Release Date")} />
<.input
<Fluxon.Components.Input.input field={@form[:release_date]} label={gettext("Release Date")} />
<Fluxon.Components.DatePicker.date_time_picker
:if={@show_purchased_at}
field={@form[:purchased_at]}
type="datetime-local"
label={gettext("Purchased at")}
/>
</div>