volunteers/app/views/members/edit.html.haml

30 lines
1.3 KiB
Plaintext
Raw Normal View History

2023-01-22 14:37:39 +01:00
%script{:src => "https://cdn.jsdelivr.net/npm/vue@2.7.14/dist/vue.js"}
%script{:src => "https://cdn.jsdelivr.net/npm/marked/marked.min.js"}
2023-01-23 11:50:22 +01:00
.flex.justify-center.m-5.m-5.md:m-12.lg:m-20
.flex.flex-col.text-center
2023-01-22 19:29:10 +01:00
%h1.text-4xl Edit your profile
2022-12-20 16:05:26 +01:00
2023-01-23 11:50:22 +01:00
.flex.justify-center.m-5.m-5.md:m-12.lg:m-20
.flex.flex-col.text-center{class: "w-full md:w-10/12"}
2023-01-25 23:47:27 +01:00
The Picture box is landscape with ratio 3/4.
2023-01-23 11:50:22 +01:00
= simple_form_for @member do |f|
.grid.grid-cols-1.md:grid-cols-2.gap-10
2023-01-22 19:29:10 +01:00
= render "merged/form/editor" , object: @member , field: :bio, form: f
.info.mr-8
.text-red-700= f.error_notification
= f.input :name
.grid.grid-cols-2.gap-10
= f.input :arrived
= f.input :left
2023-01-25 23:47:27 +01:00
.flex.h-16.mt-2.col-span-2
= image_tag(@member.picture_url , class: "align-middle mr-4") if @member.picture?
.w-full= f.input :picture , as: :file ,
2023-01-22 19:29:10 +01:00
label: (@member.picture.blank? ? "Add picture" : "Change picture")
= f.hidden_field :picture_cache
.flex.justify-center.actions.m-10
= f.button :button, "Update", class: button_classes + " bg-cyan-200"
= link_to member_path(@member) do
%button.ml-10{type: :submit, class: button_classes}
Back