chiya/lib/chiya_web/controllers/note_html/note_form.html.heex

22 lines
772 B
Text

<.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" />
<.input field={f[:slug]} type="text" label="Slug" />
<.input field={f[:published_at]} type="datetime-local" label="Published at" />
<.input field={f[:kind]} type="text" label="Kind" />
<.input field={f[:url]} type="text" label="Url" />
<.input
field={f[:channels]}
type="select"
label="Channel"
multiple={true}
options={@channels}
value={selected_channels(@changeset)}
/>
<:actions>
<.button>Save Note</.button>
</:actions>
</.simple_form>