Update Bootstrap references URLs and name
For what is worth we are still supporting v2, so its worth to keep this up to date. Closes #925.
This commit is contained in:
parent
868b22e41e
commit
1d85b03463
|
@ -43,23 +43,23 @@ Also, if you want to use the country select, you will need the
|
||||||
gem 'country_select'
|
gem 'country_select'
|
||||||
```
|
```
|
||||||
|
|
||||||
### Twitter Bootstrap
|
### Bootstrap
|
||||||
|
|
||||||
**Simple Form** can be easily integrated to the [Twitter Bootstrap](http://twitter.github.com/bootstrap).
|
**Simple Form** can be easily integrated to the [Bootstrap](http://getbootstrap.com/2.3.2/) 2.3.
|
||||||
To do that you have to use the `bootstrap` option in the install generator, like this:
|
To do that you have to use the `bootstrap` option in the install generator, like this:
|
||||||
|
|
||||||
```console
|
```console
|
||||||
rails generate simple_form:install --bootstrap
|
rails generate simple_form:install --bootstrap
|
||||||
```
|
```
|
||||||
|
|
||||||
You have to be sure that you added a copy of the [Twitter Bootstrap](http://twitter.github.com/bootstrap)
|
You have to be sure that you added a copy of the [Bootstrap](http://getbootstrap.com/2.3.2/)
|
||||||
assets on your application.
|
assets on your application.
|
||||||
|
|
||||||
For more information see the generator output, our
|
For more information see the generator output, our
|
||||||
[example application code](https://github.com/rafaelfranca/simple_form-bootstrap) and
|
[example application code](https://github.com/rafaelfranca/simple_form-bootstrap) and
|
||||||
[the live example app](http://simple-form-bootstrap.plataformatec.com.br/).
|
[the live example app](http://simple-form-bootstrap.plataformatec.com.br/).
|
||||||
|
|
||||||
**NOTE**: **Simple Form** integration requires Twitter Bootstrap version 2.0 or higher.
|
**NOTE**: **Simple Form** integration requires Bootstrap version 2.3.
|
||||||
|
|
||||||
### Zurb Foundation 3
|
### Zurb Foundation 3
|
||||||
|
|
||||||
|
|
|
@ -4,12 +4,12 @@ module SimpleForm
|
||||||
desc "Copy SimpleForm default files"
|
desc "Copy SimpleForm default files"
|
||||||
source_root File.expand_path('../templates', __FILE__)
|
source_root File.expand_path('../templates', __FILE__)
|
||||||
class_option :template_engine, desc: 'Template engine to be invoked (erb, haml or slim).'
|
class_option :template_engine, desc: 'Template engine to be invoked (erb, haml or slim).'
|
||||||
class_option :bootstrap, type: :boolean, desc: 'Add the Twitter Bootstrap wrappers to the SimpleForm initializer.'
|
class_option :bootstrap, type: :boolean, desc: 'Add the Bootstrap wrappers to the SimpleForm initializer.'
|
||||||
class_option :foundation, type: :boolean, desc: 'Add the Zurb Foundation 3 wrappers to the SimpleForm initializer.'
|
class_option :foundation, type: :boolean, desc: 'Add the Zurb Foundation 3 wrappers to the SimpleForm initializer.'
|
||||||
|
|
||||||
def info_bootstrap
|
def info_bootstrap
|
||||||
return if options.bootstrap? || options.foundation?
|
return if options.bootstrap? || options.foundation?
|
||||||
puts "SimpleForm 2 supports Twitter Bootstrap and Zurb Foundation 3. If you want "\
|
puts "SimpleForm 2 supports Bootstrap and Zurb Foundation 3. If you want "\
|
||||||
"a configuration that is compatible with one of these frameworks, then please " \
|
"a configuration that is compatible with one of these frameworks, then please " \
|
||||||
"re-run this generator with --bootstrap or --foundation as an option."
|
"re-run this generator with --bootstrap or --foundation as an option."
|
||||||
end
|
end
|
||||||
|
|
|
@ -1,7 +1,7 @@
|
||||||
===============================================================================
|
===============================================================================
|
||||||
|
|
||||||
Be sure to have a copy of the Bootstrap stylesheet available on your
|
Be sure to have a copy of the Bootstrap stylesheet available on your
|
||||||
application, you can get it on http://twitter.github.com/bootstrap.
|
application, you can get it on http://getbootstrap.com/2.3.2/.
|
||||||
|
|
||||||
Inside your views, use the 'simple_form_for' with one of the Bootstrap form
|
Inside your views, use the 'simple_form_for' with one of the Bootstrap form
|
||||||
classes, '.form-horizontal', '.form-inline', '.form-search' or
|
classes, '.form-horizontal', '.form-inline', '.form-search' or
|
||||||
|
|
|
@ -37,8 +37,8 @@ SimpleForm.setup do |config|
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
# Wrappers for forms and inputs using the Twitter Bootstrap toolkit.
|
# Wrappers for forms and inputs using the Bootstrap toolkit.
|
||||||
# Check the Bootstrap docs (http://twitter.github.com/bootstrap)
|
# Check the Bootstrap docs (http://getbootstrap.com/2.3.2/)
|
||||||
# to learn about the different styles for forms and inputs,
|
# to learn about the different styles for forms and inputs,
|
||||||
# buttons and other elements.
|
# buttons and other elements.
|
||||||
config.default_wrapper = :bootstrap
|
config.default_wrapper = :bootstrap
|
||||||
|
|
Loading…
Reference in New Issue