comfycamp/lib/comfycamp_web/controllers/notes_html/note_form.html.heex

19 lines
497 B
Text
Raw Normal View History

2024-07-29 16:19:47 +05:00
<.simple_form :let={f} for={@changeset} action={@action}>
<.input field={f[:title]} type="text" label="Заголовок" />
<.input field={f[:markdown]} type="textarea" label="Содержание (markdown)" />
<:actions>
<.button>Сохранить</.button>
</:actions>
</.simple_form>
<%= if @changeset.data.id do %>
<.link
href={~p"/admin/notes/#{@changeset.data}"}
method="DELETE"
data-confirm="Вы уверены?"
>
Удалить
</.link>
<% end %>