Use Fluxon components for record edit form
This commit is contained in:
@@ -8,8 +8,6 @@
|
|||||||
The heroicons installation itself is managed by your mix.exs */
|
The heroicons installation itself is managed by your mix.exs */
|
||||||
@plugin "../vendor/heroicons";
|
@plugin "../vendor/heroicons";
|
||||||
|
|
||||||
@plugin "@tailwindcss/forms";
|
|
||||||
|
|
||||||
@custom-variant phx-click-loading (.phx-click-loading&, .phx-click-loading &);
|
@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-submit-loading (.phx-submit-loading&, .phx-submit-loading &);
|
||||||
@custom-variant phx-change-loading (.phx-change-loading&, .phx-change-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-auto-recover="recover_form"
|
||||||
phx-submit="save"
|
phx-submit="save"
|
||||||
>
|
>
|
||||||
<div class="sm:columns-2">
|
<div class="sm:columns-2 space-y-2">
|
||||||
<Fluxon.Components.Select.select
|
<Fluxon.Components.Select.select
|
||||||
field={@form[:type]}
|
field={@form[:type]}
|
||||||
label={gettext("Type")}
|
label={gettext("Type")}
|
||||||
@@ -47,10 +47,9 @@ defmodule MusicLibraryWeb.FormComponent do
|
|||||||
options={formats_with_labels()}
|
options={formats_with_labels()}
|
||||||
/>
|
/>
|
||||||
</div>
|
</div>
|
||||||
<.input
|
<Fluxon.Components.Input.input
|
||||||
input_class="font-mono"
|
class="font-mono"
|
||||||
field={@form[:musicbrainz_id]}
|
field={@form[:musicbrainz_id]}
|
||||||
type="text"
|
|
||||||
label={gettext("MusicBrainz ID")}
|
label={gettext("MusicBrainz ID")}
|
||||||
/>
|
/>
|
||||||
<Fluxon.Components.Select.select
|
<Fluxon.Components.Select.select
|
||||||
@@ -59,11 +58,10 @@ defmodule MusicLibraryWeb.FormComponent do
|
|||||||
options={selected_release_id_options(@record)}
|
options={selected_release_id_options(@record)}
|
||||||
/>
|
/>
|
||||||
<div class="sm:columns-2">
|
<div class="sm:columns-2">
|
||||||
<.input field={@form[:release_date]} type="text" label={gettext("Release Date")} />
|
<Fluxon.Components.Input.input field={@form[:release_date]} label={gettext("Release Date")} />
|
||||||
<.input
|
<Fluxon.Components.DatePicker.date_time_picker
|
||||||
:if={@show_purchased_at}
|
:if={@show_purchased_at}
|
||||||
field={@form[:purchased_at]}
|
field={@form[:purchased_at]}
|
||||||
type="datetime-local"
|
|
||||||
label={gettext("Purchased at")}
|
label={gettext("Purchased at")}
|
||||||
/>
|
/>
|
||||||
</div>
|
</div>
|
||||||
|
|||||||
Reference in New Issue
Block a user