1
0
mirror of https://github.com/fspc/BikeShed-1.git synced 2025-04-04 05:33:22 -04:00
BikeShed-1/app/views/bikes/new.html.haml
Jason Denney 2d09aba26a Added submit js to bikes/new view
* Added displayFormErrors utility
* Added 4th option to bike styles “OTHER”
2014-02-08 14:21:20 -05:00

57 lines
2.2 KiB
Plaintext

%h2 Add Bike
%p
.control-group
.controls
%input{id: "shop_id", placeholder: "Shop ID", type: "number", min:0, class: "input-lg" }
.help-block
.control-group
.controls
= select_tag(:bike_brand_id, options_for_select(@brands))
.help-block
.control-group
.controls
%input{id: "model", placeholder: "Model", type: "text", class: "input-lg" }
.help-block
.control-group
.controls
%input{id: "serial_number", placeholder: "Serial Number", type: "text", class: "input-lg" }
.help-block
%p
.btn-group{ "data-toggle" => "buttons-radio"}
%label{ class: "btn btn-default"}
%input{ type: "radio", name: "bike_style", value: 3} RD
%label{ class: "btn btn-default"}
%input{ type: "radio", name: "bike_style", value: 1} MTN
%label{ class: "btn btn-default"}
%input{ type: "radio", name: "bike_style", value: 2} HYB
%label{ class: "btn btn-default"}
%input{ type: "radio", name: "bike_style", value: 4} OTHER
.help-block
.control-group
.controls
= select_tag(:bike_wheel_size, options_for_select(@wheel_sizes), id: :bike_wheel_size_id)
.help-block
%p
.btn-group{ "data-toggle" => "buttons-radio"}
%label{ class: "btn btn-default"}
%input{ type: "radio", name: "bike_condition", value: 2} Poor
%label{ class: "btn btn-default"}
%input{ type: "radio", name: "bike_condition", value: 3} Fair
%label{ class: "btn btn-default"}
%input{ type: "radio", name: "bike_condition", value: 4} Good
%label{ class: "btn btn-default"}
%input{ type: "radio", name: "bike_condition", value: 5} Excellent
.help-block
.control-group
.controls
%input{id: "seat_tube_height", placeholder: "Seat Tube (cm)", type: "number", min: 0, max: 100, class: "input-lg" }
.help-block
-# Commenting this out until description is added to Bike
%p
%input{id: "bike_description", placeholder: "Short description", type: "text", class: "input-lg" }
.control-group
.controls
%input{id: "add_bike_submit", value: "Add Bike", type: "button", class: "btn btn-lg btn-block btn-primary", "data-url" => "#{api_create_bike_path}"}