MorningPeak/app/views/bills/_form.html.slim
2015-07-24 22:53:51 +02:00

43 lines
1.5 KiB
Plaintext

= form_for @bill do |f|
- if @bill.errors.any?
#error_explanation
h2 = "#{pluralize(@bill.errors.count, "error")} prohibited this bill from being saved:"
ul
- @bill.errors.full_messages.each do |message|
li = message
.form-horizontal
.form-group
.field
= f.label :client_id, class: "sr-only"
= f.text_field :client_id, class: "form-control", placeholder: "#{t('.client_id')}"
.form-group
.field
= f.label :title, class: "sr-only"
= f.text_field :title, class: "form-control", placeholder: "#{t('.title')}"
.form-group
.field
= f.label :description, class: "sr-only"
= f.text_area :description, class: "form-control", placeholder: "#{t('.description')}"
.form-inline
.form-group
.field
= f.label :amount, class: "sr-only"
= f.number_field :amount, class: "form-control", placeholder: "#{t('.amount')}"
.form-group
.field
= f.label t('.is_paid')
br
= f.check_box :paid, class: "form-control", placeholder: "#{t('.is_paid')}"
.form-inline
.form-group
.field
= f.label :emission_date, class: "sr-only"
= f.text_field :emission_date, class: "form-control form-date", placeholder: "#{t('.e_date')}"
.form-group
.field
= f.label :due_date, class: "sr-only"
= f.text_field :due_date, class: "form-control form-date", placeholder: "#{t('.d_date')}"
.actions = f.submit class: "btn btn-success"