hubfeenix.fi/app/views/events/_form.html.haml
2023-06-12 15:47:54 +03:00

24 lines
910 B
Plaintext

= simple_form_for @event do |f|
= f.error_notification
= f.input :name
= f.input :info , label: "Link to event"
= render "merged/form/editor" , object: @event , field: :text, form: f
.grid.grid-cols-2.gap-10
= f.input :start_date
= f.input :end_date
= f.input :profile_id , as: :hidden
.flex.h-16.mt-2
= image_tag(@event.picture_url , class: "align-middle mr-2") if @event.picture?
= f.input :picture , as: :file , input_html: {wrapper_class: "w-full"},
label: (@event.picture.blank? ? "Add picture" : "Change picture")
= f.hidden_field :picture_cache
.flex.justify-between
%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'
= link_to member_path(current_member) do
.mt-6.ml-20.mr-3.inline-block.rounded-lg.px-4.py-3.text-md.font-medium.border.border-gray-400
Back