MorningPeak/app/views/clients/_form.html.slim

37 lines
1.4 KiB
Plaintext

= form_for @client do |f|
- if @client.errors.any?
#error_explanation
h2 = "#{pluralize(@client.errors.count, "error")} prohibited this client from being saved:"
ul
- @client.errors.full_messages.each do |message|
li = message
.form-horizontal
.form-group
.field
= f.label :name, class: "sr-only"
= f.text_field :name, class: "form-control", placeholder: "Name"
.form-group
.field
= f.label :url, class: "sr-only"
= f.text_field :url, class: "form-control", placeholder: "URL"
.form-group
.field
= f.label :activity, class: "sr-only"
= f.text_field :activity, class: "form-control", placeholder: "Activity"
.form-group
.field
= f.label :contact_reasons, class: "sr-only"
= f.text_area :contact_reasons, class: "form-control", placeholder: "Contact reasons"
.form-horizontal
.form-group
.field
= f.label :user_id, class: "sr-only"
= f.text_field :user_id, class: "form-control", placeholder: "User ID"
.form-group
.field
= f.autocomplete_field :contact, autocomplete_contact_name_clients_path, :id_element => '#client_contact_id', class: "form-control", placeholder: "Main Contact Name"
= f.label :contact_id, class: "sr-only"
= f.text_field :contact_id, class: "form-control sr-only", placeholder: "Main Contact ID"
.actions = f.submit class: "btn btn-success"