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

32 lines
970 B
Text
Raw Normal View History

2023-03-05 17:23:16 +01:00
<.simple_form :let={f} for={@changeset} action={@action}>
<.error :if={@changeset.action}>
Oops, something went wrong! Please check the errors below.
</.error>
2023-07-20 20:30:51 +02:00
<.input field={f[:name]} type="text" />
2023-07-24 18:39:25 +02:00
<.input field={f[:content]} type="textarea" label="Content" rows="15" class="font-mono" />
2023-03-05 17:23:16 +01:00
<.input field={f[:slug]} type="text" label="Slug" />
<.input field={f[:published_at]} type="datetime-local" label="Published at" />
2023-03-07 19:57:28 +01:00
<.input
field={f[:kind]}
type="select"
label="Kind"
prompt="Choose a value"
options={Ecto.Enum.values(Chiya.Notes.Note, :kind)}
/>
2023-03-05 17:23:16 +01:00
<.input field={f[:url]} type="text" label="Url" />
2023-04-10 19:18:27 +02:00
<.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}
/>
2023-04-10 19:18:27 +02:00
2023-03-05 17:23:16 +01:00
<:actions>
<.button>Save Note</.button>
</:actions>
</.simple_form>