mirror of
https://github.com/fspc/bike-database.git
synced 2026-09-16 08:31:39 -04:00
add datepicker and selectpicker
This commit is contained in:
@@ -16,3 +16,4 @@
|
||||
//= require_tree .
|
||||
//= require bootstrap
|
||||
//= require bootstrap-datepicker
|
||||
//= require bootstrap-select
|
||||
|
||||
@@ -0,0 +1,3 @@
|
||||
$(function() {
|
||||
$( ".datepicker" ).datepicker();
|
||||
});
|
||||
@@ -0,0 +1,3 @@
|
||||
$(function() {
|
||||
$('.selectpicker').selectpicker();
|
||||
});
|
||||
@@ -12,4 +12,5 @@
|
||||
*= require bootstrap
|
||||
*= require_tree .
|
||||
*= require datepicker
|
||||
*= require bootstrap-select
|
||||
*/
|
||||
|
||||
@@ -1,2 +1,3 @@
|
||||
class Volunteer < ActiveRecord::Base
|
||||
validates :name, presence: true
|
||||
end
|
||||
|
||||
@@ -8,7 +8,7 @@
|
||||
.form-group
|
||||
= f.label "Bike Entry Date:", class: "col-sm-2 control-label"
|
||||
.col-sm-10
|
||||
= f.text_field :entry_date, class: "form-control", disabled: disabled
|
||||
= f.text_field :entry_date, class: "form-control datepicker", disabled: disabled
|
||||
|
||||
.form-group
|
||||
= f.label "Brand:", class: "col-sm-2 control-label"
|
||||
@@ -38,12 +38,12 @@
|
||||
.form-group
|
||||
= f.label "Type:", class: "col-sm-2 control-label"
|
||||
.col-sm-10
|
||||
= f.text_field :bike_type, class: "form-control", disabled: disabled
|
||||
= f.select :bike_type, [["BMX", "BMX"], ["Cruiser", "Cruiser"], ["Hybrid", "Hybrid"], ["Mountain", "Mountain"], ["Road", "Road"], ["Touring", "Touring"], ["Track", "Track"], ["Utility", "Utility"]], {}, class: "selectpicker", disabled: disabled
|
||||
|
||||
.form-group
|
||||
= f.label "Purpose:", class: "col-sm-2 control-label"
|
||||
.col-sm-10
|
||||
= f.select :purpose, [["Freecyclery", "Freecyclery"], ["Sale", "Sale"]], class: "selectpicker", disabled: disabled
|
||||
= f.select :purpose, [["Freecyclery", "Freecyclery"], ["Sale", "Sale"]], {}, class: "selectpicker", disabled: disabled
|
||||
|
||||
.form-group
|
||||
= f.label "Serial Number", class: "col-sm-2 control-label"
|
||||
@@ -73,4 +73,6 @@
|
||||
.form-group
|
||||
= f.label "Price", class: "col-sm-2 control-label"
|
||||
.col-sm-10
|
||||
= f.text_field :price, class: "form-control", disabled: disabled
|
||||
.input-group
|
||||
%span.input-group-addon $
|
||||
= f.text_field :price, class: "form-control", disabled: disabled
|
||||
|
||||
Reference in New Issue
Block a user