volunteers/app/views/stories/edit.html.haml
2023-01-18 12:40:19 +02:00

17 lines
660 B
Plaintext

.grid.grid-cols-3
%div
%div
%h1 Editing story
= simple_form_for @story do |f|
= f.error_notification
= f.input :picture , as: :file , label: (@story.picture.blank? ? "Add picture" : "Change picture")
= f.input :header
= f.input :text , input_html: {rows: rows(@story.text)}
= f.input :happened , wrapper_class: "flex mt-4 align-center"
%button.mt-6.bg-cyan-200.mr-3.inline-block.rounded-lg.px-4.py-3.text-md.font-medium.border.border-gray-400
= f.submit 'Save'
%button.ml-20.mr-3.inline-block.rounded-lg.px-4.py-3.text-md.font-medium.border.border-gray-400
= link_to 'Back', @story
%div