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

20 lines
725 B
Plaintext

= simple_form_for @profile do |f|
= f.error_notification
= f.input :name
= f.input :info , label: "Link to Homapage"
= render "merged/form/editor" , object: @profile , field: :bio, form: f
= f.input :kind, :as => :hidden
.flex.h-16.mt-2
= image_tag(@profile.picture_url , class: "align-middle mr-2") if @profile.picture?
= f.input :picture , as: :file , input_html: {wrapper_class: "w-full"},
label: (@profile.picture.blank? ? "Add picture" : "Change picture")
= f.hidden_field :picture_cache
.flex.justify-between.mt-4
%button.bg-cyan-200{class: button_classes}
= f.submit 'Save'
%button.bg-cyan-200{class: button_classes}
= link_to 'Cancel', member_path(current_member)