Conditionally show purchased at in edit form
This commit is contained in:
@@ -43,7 +43,12 @@ defmodule MusicLibraryWeb.RecordLive.FormComponent do
|
|||||||
/>
|
/>
|
||||||
</div>
|
</div>
|
||||||
<.input field={@form[:release]} type="text" label={gettext("Release")} />
|
<.input field={@form[:release]} type="text" label={gettext("Release")} />
|
||||||
<.input field={@form[:purchased_at]} type="datetime-local" label={gettext("Purchased at")} />
|
<.input
|
||||||
|
:if={@show_purchased_at}
|
||||||
|
field={@form[:purchased_at]}
|
||||||
|
type="datetime-local"
|
||||||
|
label={gettext("Purchased at")}
|
||||||
|
/>
|
||||||
<div phx-drop-target={@uploads.cover_data.ref}>
|
<div phx-drop-target={@uploads.cover_data.ref}>
|
||||||
<.label for={@uploads.cover_data.ref}>
|
<.label for={@uploads.cover_data.ref}>
|
||||||
<%= gettext("Cover art") %>
|
<%= gettext("Cover art") %>
|
||||||
|
|||||||
@@ -167,6 +167,7 @@
|
|||||||
id={@record.id}
|
id={@record.id}
|
||||||
title={@page_title}
|
title={@page_title}
|
||||||
action={@live_action}
|
action={@live_action}
|
||||||
|
show_purchased_at={true}
|
||||||
record={@record}
|
record={@record}
|
||||||
patch={~p"/records"}
|
patch={~p"/records"}
|
||||||
/>
|
/>
|
||||||
|
|||||||
@@ -83,6 +83,7 @@
|
|||||||
id={@record.id}
|
id={@record.id}
|
||||||
title={@page_title}
|
title={@page_title}
|
||||||
action={@live_action}
|
action={@live_action}
|
||||||
|
show_purchased_at={true}
|
||||||
record={@record}
|
record={@record}
|
||||||
patch={~p"/records/#{@record}"}
|
patch={~p"/records/#{@record}"}
|
||||||
/>
|
/>
|
||||||
|
|||||||
@@ -167,6 +167,7 @@
|
|||||||
id={@record.id}
|
id={@record.id}
|
||||||
title={@page_title}
|
title={@page_title}
|
||||||
action={@live_action}
|
action={@live_action}
|
||||||
|
show_purchased_at={false}
|
||||||
record={@record}
|
record={@record}
|
||||||
patch={~p"/wishlist"}
|
patch={~p"/wishlist"}
|
||||||
/>
|
/>
|
||||||
|
|||||||
@@ -82,6 +82,7 @@
|
|||||||
id={@record.id}
|
id={@record.id}
|
||||||
title={@page_title}
|
title={@page_title}
|
||||||
action={@live_action}
|
action={@live_action}
|
||||||
|
show_purchased_at={false}
|
||||||
record={@record}
|
record={@record}
|
||||||
patch={~p"/wishlist/#{@record}"}
|
patch={~p"/wishlist/#{@record}"}
|
||||||
/>
|
/>
|
||||||
|
|||||||
Reference in New Issue
Block a user