MorningPeak/app/views/contacts/_form.html.slim
Arthur Poulet b33dd3f3cc Update all forms for admin
- forms are full bootstraped
- datepicker in jquery for date fields
- installation of jquery ui
2015-07-21 07:21:58 +02:00

54 lines
1.9 KiB
Plaintext

= form_for @contact do |f|
- if @contact.errors.any?
#error_explanation
h2 = "#{pluralize(@contact.errors.count, "error")} prohibited this contact from being saved:"
ul
- @contact.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: "Client ID"
.form-inline
.form-group
.field
= f.label :name, class: "sr-only"
= f.text_field :name, class: "form-control", placeholder: "Name"
.form-group
.field
= f.label :phone, class: "sr-only"
= f.text_field :phone, class: "form-control", placeholder: "Phone"
.form-group
.field
= f.label :email, class: "sr-only"
= f.text_field :email, class: "form-control", placeholder: "Email"
.form-inline
.form-group
.field
= f.label :region, class: "sr-only"
= f.text_field :region, class: "form-control", placeholder: "Region"
.form-group
.field
= f.label :department, class: "sr-only"
= f.text_field :department, class: "form-control", placeholder: "Department"
.form-group
.field
= f.label :postal_code, class: "sr-only"
= f.text_field :postal_code, class: "form-control", placeholder: "Postal Code"
.form-horizontal
.form-group
.field
= f.label :address, class: "sr-only"
= f.text_area :address, class: "form-control", placeholder: "Address"
.form-group
.field
= f.label :note, class: "sr-only"
= f.text_area :note, class: "form-control", placeholder: "Note"
.form-group
.field
= f.label :view_at, class: "sr-only"
= f.text_field :view_at, class: "form-control form-date", placeholder: "View at"
.actions = f.submit class: "btn btn-success"