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

30 lines
964 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" rows="15" />
<.input field={f[:slug]} type="text" label="Slug" />
<.input field={f[:published_at]} type="datetime-local" label="Published at" />
<.input
field={f[:kind]}
type="select"
label="Kind"
prompt="Choose a value"
options={Ecto.Enum.values(Chiya.Notes.Note, :kind)}
/>
<.input field={f[:url]} type="text" label="Url" />
<.input field={f[:tags_string]} type="text" label="Tags" value={tags_to_string(@tags)} />
<.input
field={f[:channels]}
type="select"
label="Channel"
multiple={true}
options={@channels}
value={@selected_channels}
/>
<:actions>
<.button>Save Note</.button>
</:actions>
</.simple_form>