chiya/lib/chiya_web/controllers/channel_html/channel_form.html.heex

26 lines
768 B
Text
Raw Normal View History

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" />
<.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)}
/>
2023-04-07 22:01:43 +02:00
<.input
field={f[:layout]}
type="select"
label="Layout"
prompt="Choose a value"
options={Ecto.Enum.values(Chiya.Channels.Channel, :layout)}
/>
2023-03-05 17:16:24 +01:00
<.input field={f[:slug]} type="text" label="Slug" />
<:actions>
<.button>Save Channel</.button>
</:actions>
</.simple_form>