Browse Source

lk | removes weight field from clients page & makes bike type requested select dropdown

master
Louis Knapp 9 years ago
parent
commit
9dcf59fece
  1. 1
      app/views/bikes/_fields.html.haml
  2. 26
      app/views/clients/_fields.html.haml
  3. 6
      app/views/clients/_form.html.haml

1
app/views/bikes/_fields.html.haml

@ -30,7 +30,6 @@
.col-sm-6
= f.text_field :color, class: "form-control", disabled: disabled
.col-sm-6
.form-group
= f.label "Mechanic:", class: "col-sm-4 control-label"

26
app/views/clients/_fields.html.haml

@ -1,30 +1,25 @@
- disabled ||= false
- disabled ||= false
.form-horizontal
.form-group
= f.label "First Name", class: "col-sm-2 control-label"
= f.label "First Name", class: "col-sm-2 control-label"
.col-sm-10
= f.text_field :first_name, class: "form-control", disabled: disabled
.form-group
= f.label "Last Name", class: "col-sm-2 control-label"
.col-sm-10
= f.text_field :last_name, class: "form-control", disabled: disabled
.form-group
= f.label "Gender", class: "col-sm-2 control-label"
.col-sm-10
= f.text_field :gender, class: "form-control", disabled: disabled
.form-group
= f.label "Age", class: "col-sm-2 control-label"
.col-sm-10
= f.text_field :age, class: "form-control", disabled: disabled
.form-group
= f.label "Weight", class: "col-sm-2 control-label"
.col-sm-10
= f.text_field :weight, class: "form-control", disabled: disabled
.form-group
= f.label "Application Date:", class: "col-sm-2 control-label"
.col-sm-10
@ -33,14 +28,13 @@
.form-group
= f.label "Type of Bike Requested:", class: "col-sm-2 control-label"
.col-sm-10
= f.text_field :bike_type_requested, class: "form-control", disabled: disabled
= f.select :bike_type_requested, [["BMX", "BMX"], ["Cruiser", "Cruiser"], ["Hybrid", "Hybrid"], ["Mountain", "Mountain"], ["Road", "Road"], ["Touring", "Touring"], ["Track", "Track"], ["Utility", "Utility"], ["Youth", "Youth"]], {}, class: "selectpicker", disabled: disabled
.form-group
= f.label "Will Pay 25$ for Lock & Helmet:", class: "col-sm-2 control-label"
.col-sm-10
= f.check_box :bike_type_requested, disabled: disabled
= f.check_box :will_pay, disabled: disabled
.form-group
= f.label "Helmet", class: "col-sm-2 control-label"
.col-sm-10

6
app/views/clients/_form.html.haml

@ -1,11 +1,11 @@
= form_for @client, html: {class: 'form-horizontal'} do |f|
- if @client.errors.any?
- 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 |msg|
%li= msg
= render 'fields', f: f
%li= msg
= render 'fields', f: f
.row
.actions.col-sm-offset-2
= f.submit class: "btn btn-default"

Loading…
Cancel
Save