diff --git a/app/views/bikes/_fields.html.haml b/app/views/bikes/_fields.html.haml index da1d8f3..5c489ee 100644 --- a/app/views/bikes/_fields.html.haml +++ b/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" diff --git a/app/views/clients/_fields.html.haml b/app/views/clients/_fields.html.haml index e1e8cb9..83df7a3 100644 --- a/app/views/clients/_fields.html.haml +++ b/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 diff --git a/app/views/clients/_form.html.haml b/app/views/clients/_form.html.haml index 2f052ae..44d6596 100644 --- a/app/views/clients/_form.html.haml +++ b/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"