pinchflat/lib/pinchflat_web/controllers/media_sources/channel_html/new.html.heex
2024-01-23 11:09:22 -08:00

22 lines
678 B
Text

<.header>
New Channel
<:subtitle>Use this form to manage channel records in your database.</:subtitle>
</.header>
<.simple_form :let={f} for={@changeset} action={~p"/media_sources/channels"}>
<.error :if={@changeset.action}>
Oops, something went wrong! Please check the errors below.
</.error>
<.input
field={f[:media_profile_id]}
options={Enum.map(@media_profiles, &{&1.name, &1.id})}
type="select"
label="Media Profile"
/>
<.input field={f[:channel_url]} type="text" label="Channel URL" />
<:actions>
<.button>Save Channel</.button>
</:actions>
</.simple_form>
<.back navigate={~p"/media_sources/channels"}>Back to channels</.back>