add picture to user
This commit is contained in:
@ -1,5 +1,5 @@
|
||||
.flex.flex-col
|
||||
= form_for @member do |f|
|
||||
= form_for @member do |f|
|
||||
.flex.flex-col
|
||||
- if @member.errors.any?
|
||||
#error_explanation
|
||||
%h2= "#{pluralize(@member.errors.count, "error")} prohibited this member from being saved:"
|
||||
@ -7,14 +7,23 @@
|
||||
- @member.errors.full_messages.each do |message|
|
||||
%li= message
|
||||
|
||||
.grid.grid-cols-2.m-20.gap-10
|
||||
.field
|
||||
= f.label :name
|
||||
= f.text_field :name
|
||||
.field
|
||||
= f.label :public
|
||||
= f.check_box :public
|
||||
.field
|
||||
= f.label :picture
|
||||
= f.file_field :picture
|
||||
-if @member.picture
|
||||
%div.overflow-hidden
|
||||
.my-5 Currently
|
||||
= image_tag @member.picture, class: "object-contain h-40"
|
||||
|
||||
.field
|
||||
= f.label :Bio
|
||||
= f.rich_text_area :bio
|
||||
.actions
|
||||
= f.submit 'Save'
|
||||
.flex.justify-center.actions
|
||||
= f.submit 'Save'
|
||||
|
Reference in New Issue
Block a user