Make country select searchable in registrar form

This commit is contained in:
Martin Lensment 2014-10-07 17:04:25 +03:00
parent fd74733931
commit e3d8ea088b
6 changed files with 11 additions and 1 deletions

View file

@ -1,4 +1,5 @@
ready = ->
$('.selectize').selectize();
$(document).ready(ready)
$(document).on('page:load', ready)

View file

@ -7,6 +7,8 @@
#= require typeahead.bundle.min
#= require autocomplete
#= require jquery.nested_attributes
#= require selectize
#= require app
NProgress.configure
showSpinner: false

View file

@ -4,4 +4,6 @@
@import "nprogress-bootstrap";
@import "bootstrap-ext";
@import "typeaheadjs";
@import "selectize";
@import "selectize.bootstrap3";
@import "app";

View file

@ -21,7 +21,7 @@
.col-md-6.text-left
.form-group
= f.label :country_id
= f.select :country_id, options_for_select(Country.all.map{|x| [x.name, x.id]}, @registrar.country_id), {}, {class: 'form-control'}
= f.select :country_id, options_for_select(Country.all.map{|x| [x.name, x.id]}, @registrar.country_id), {}, {class: 'form-control selectize'}
.form-group
= f.label :address
= f.text_field(:address, class: 'form-control')