MorningPeak/app/views/bills/_form.html.slim
2016-01-30 23:06:48 +01:00

44 lines
1.7 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.autocomplete_field :client, autocomplete_client_name_bills_path, :id_element => '#bill_client_id', class: "form-control", placeholder: "Client Name"
= f.label :client_id, class: "sr-only"
= f.text_field :client_id, class: "form-control sr-only", 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"