Files
mozo-backend/app/views/lists/_form.html.slim
T
2012-08-24 16:20:03 +02:00

27 lines
1.2 KiB
Plaintext

= form_for @list, html: {class: 'form-horizontal' } do |f|
= render 'error_messages', target: @list
.control-group class=(@list.errors[:state].any? ? 'error' : nil)
= f.label :state, class: 'control-label'
.controls
= f.text_field :state, class: 'text_field'
.control-group class=(@list.errors[:need_help].any? ? 'error' : nil)
= f.label :need_help, class: 'control-label'
.controls
= f.check_box :need_help, class: 'check_box'
.control-group class=(@list.errors[:needs_payment].any? ? 'error' : nil)
= f.label :needs_payment, class: 'control-label'
.controls
= f.check_box :needs_payment, class: 'check_box'
.control-group class=(@list.errors[:closed_at].any? ? 'error' : nil)
= f.label :closed_at, class: 'control-label'
.controls
= f.text_field :closed_at, class: 'text_field'
.control-group class=(@list.errors[:table_id].any? ? 'error' : nil)
= f.label :table_id, Table.model_name.human, class: 'control-label'
.controls
= f.select :table_id, options_for_select(@tables.map{|a| [a.number, a.id]}), include_blank: nil
.form-actions
= f.submit nil, class: 'btn btn-primary'
'
= link_to t("helpers.links.cancel"), lists_path, class: 'btn'