fix entiry layouts

This commit is contained in:
2023-01-16 19:23:26 +02:00
parent 37164b534d
commit 3447b44299
6 changed files with 60 additions and 52 deletions

View File

@ -1,16 +1,11 @@
= simple_form_for @entity do |f|
- if @entity.errors.any?
#error_explanation
%h2= "#{pluralize(@entity.errors.count, "error")} prohibited this entity from being saved:"
%ul
- @entity.errors.full_messages.each do |message|
%li= message
= f.error_notification
.field
= f.input :name
.field
= f.input :ha_id , collection: Entity.ha_entities
.field
= f.input :member_id , collection: Member.all.collect{|m| [m.name , m.id ]}
.actions{class: button_classes}
= f.submit 'Save'
= f.input :name
= f.input :ha_id , collection: Entity.ha_entities
= f.input :member_id , collection: Member.all.collect{|m| [m.email , m.id ]}
.flex.justify-between.mt-3
.actions{class: button_classes}
= f.submit 'Save'
= link_to 'Back', entities_path , class: "mt-3"