2023-03-05 17:16:24 +01:00
|
|
|
<.simple_form :let={f} for={@changeset} action={@action}>
|
|
|
|
<.error :if={@changeset.action}>
|
|
|
|
Oops, something went wrong! Please check the errors below.
|
|
|
|
</.error>
|
|
|
|
<.input field={f[:name]} type="text" label="Name" />
|
2023-03-05 23:51:08 +01:00
|
|
|
<.input field={f[:content]} type="textarea" label="Content" />
|
2023-03-05 17:16:24 +01:00
|
|
|
<.input
|
|
|
|
field={f[:visibility]}
|
|
|
|
type="select"
|
|
|
|
label="Visibility"
|
|
|
|
prompt="Choose a value"
|
|
|
|
options={Ecto.Enum.values(Chiya.Channels.Channel, :visibility)}
|
|
|
|
/>
|
|
|
|
<.input field={f[:slug]} type="text" label="Slug" />
|
|
|
|
<:actions>
|
|
|
|
<.button>Save Channel</.button>
|
|
|
|
</:actions>
|
|
|
|
</.simple_form>
|