Update the Book form to show the label for Publisher.

This commit is contained in:
2025-04-20 17:46:02 +03:00
parent 34bf021962
commit 7c4eb2357c
2 changed files with 15 additions and 10 deletions
@@ -33,10 +33,13 @@ defmodule DecentralisedBookIndexWeb.BookLive.FormComponent do
label="Language"
/>
<.input field={@form[:page_count]} type="number" label="Page count" />
<.selected_publisher
publisher_form={@form[:publisher_id]}
notify_component={@myself}
/>
<div>
<.label>Publisher</.label>
<.selected_publisher
publisher_form={@form[:publisher_id]}
notify_component={@myself}
/>
</div>
<.input
field={@form[:published]}
type="date"
@@ -60,10 +63,13 @@ defmodule DecentralisedBookIndexWeb.BookLive.FormComponent do
label="Language"
/>
<.input field={@form[:page_count]} type="number" label="Page count" />
<.selected_publisher
publisher_form={@form[:publisher_id]}
notify_component={@myself}
/>
<div>
<.label>Publisher</.label>
<.selected_publisher
publisher_form={@form[:publisher_id]}
notify_component={@myself}
/>
</div>
<.input
field={@form[:published]}
type="date"
@@ -90,7 +96,6 @@ defmodule DecentralisedBookIndexWeb.BookLive.FormComponent do
<.live_component
id="select-publisher"
module={SelectPublisher}
action={:edit}
current_user={@current_user}
notify_component={@myself}
/>