This is a example application using Simple Form and Bootstrap.
An example application is running:
📺 https://simple-form-bootstrap.herokuapp.com/
MIT License. Copyright 2020 Rafael França. Copyright 2009-2019 Plataformatec.
Example application with SimpleForm and Twitter Bootstrap
Home Page: https://simple-form-bootstrap.herokuapp.com
License: MIT License
This is a example application using Simple Form and Bootstrap.
An example application is running:
📺 https://simple-form-bootstrap.herokuapp.com/
MIT License. Copyright 2020 Rafael França. Copyright 2009-2019 Plataformatec.
ActionView::Template::Error (kramdown has no parser to handle the specified input format: GFM):
14:
15: <%# move modals to bottom %>
16: <%= render partial: "shared/modal", locals: { id: "modal-bootstrap", title: "Bootstrap",
17: content: render_source(File.read(File.join(Rails.root, 'app/views/exampleas/verticals/_bootstrap.html.erb'))) } %>
18:
19: <%= render partial: "shared/modal", locals: { id: "modal-simpleform", title: "Simple Form",
20: content: render_source(File.read(File.join(Rails.root, 'app/views/examples/verticals/_form.html.erb'))) } %>
Hi!
I am the maintainer of three gems similar to this one that make it easier to use Twitter Bootstrap in Ruby projects (https://github.com/krautcomputing/rails-bootstrap-navbar, https://github.com/krautcomputing/bootstrap-navbar, https://github.com/krautcomputing/middleman-bootstrap-navbar).
I was thinking about moving all those gems to a separate organisation (like "bootstrap-ruby") and wanted to get some feedback from other maintainers of similar gems (and the community at large) if that makes sense and if we could use this to make it easier for people to find gems to work with Bootstrap in Ruby (Rails, Sinatra, etc.)
I think it would also invite other people to contribute to those projects if they were united in a central organisation.
What do you think?
Would you be willing to move this repo to such an organisation as well?
The example site linked in the readme is not working.
wrong issue. Sorry for the creation
Hello,
the link in the About section of the Index page is dead.
Maybe you want to update it like you did here: e94574d
It would be great to have initial support for Bootstrap 3 as the inputs are different.
Just to mention that your example website is not working, seems like maybe you have to restart your heroku deployment
Is the simple_form initializer provided in this project incompatible with gem 'client_side_validations' ?
I get errors saying it cannot find
method `error_class' for SimpleForm:Module
Havent digger into simple_form that much but when you do a
= simple_form_for @invite, :wrapper => :inline, :validate => true do |f|
It throws this error
Any help on this would be greatly appreciated
Great implementation!
works wonders in development - but when I do a 'rake assets:precompile' - I get
variable @baseLineHeight is undefined
I go to vendor/assets/bootstrap/lib and run
lessc bootstrap.less > ../bootstrap.css
which caters for a freshly baked bootstrap.css - but how do I get that darn thing muscled into the assets?
But again - who am I to complain! This is pretty awesome implementation - thx for sharing!
Parabéns, , wrapper: :horizontal_form
just works. F******t time saver. Thank you.
My inputs look to be generated twice, but there is only one <input>
element in the DOM. The problem is actually coming from the class form-control
that make a mess.
Here is the JS bin for you to better understand the issue here, it looks exactly the same as in my application.
JS bin:
http://jsbin.com/kesemaqi/4/edit?html,output
Initializer based on your bootstrap version and merged with my application simple_form initializer.
Simple form initializer:
http://pastebin.com/pvpxUCCW
view
.container.club
.row
.col-md-12.col-sm-12.well
%p= t('new_club_explanation')
= simple_form_for @club, wrapper: :vertical_form, validate: true, url: wizard_path, method: :put, html: { role: 'form' } do |f|
.col-md-4
= f.input :name, validate: true, placeholder: 'Enter club name', input_html: {autofocus: 'autofocus', class: 'form-control'}
= f.input :description, placeholder: 'Enter club description', input_html: {class: 'form-control'}
.actions
= f.submit class: 'btn btn-primary', value: t('next')
- # TODO Btn should restart the frame => goto choices view.
= button_tag t('cancel'), type: 'button', class: 'btn btn-reverse'
Okay, so now I'll explain what I already tried.
I know that the problem is coming from the form-control
class.
form-control
from the input, then the input is still duplicated but don't use a bootstrap style anymore. (You can try on the live JS bin)b.wrapper tag: 'div' do |ba|
ba.use :input, class: 'form-control'
to
b.wrapper tag: 'div' do |ba|
ba.use :input
As you can see (http://jsbin.com/kesemaqi/5/edit?html,output), the view become more or less normal.
I'm wondering what's wrong, because I use your wrappers. Is it because I'm using simple_form 2.1
? I would like to understand what's wrong before change the wrappers.
Thanks.
Hello Guys,
I'm trying to disable and enable action with checkbox on the post form.
And I don't know much about javascript or JQuery.
And I'm trying to do this action a lot and I don't how to do it, I'm programming alone. So if anyone could help me with this. I will appreciate!
I'm using a Rails 4.2.8 and jquery-rails-4.3.1 versions.
my form: app/views/posts/_form.html.slim
= simple_form_for(@post, :html => { :multipart => true }) do |f|
= f.input :publish,
label: "Publish?",
as: :boolean,
label_html: { class: "publish-check" },
input_html: { checked: false },
remote: true
= f.input :published_at, disabled: true, hint: 'You cannot publish your post.',label: "Publish Post at:"
I'm trying to put this on the file app/assets/javascript/_form.coffee
it's alright or I need to put on another file?
$(document).on "turbolinks:load", ->
$checkbox = $('[id^="post_publish"]')
$select = $('.post_published_at')
$checkbox.change (e) ->
$select.prop 'disabled', !$checkbox.is(':checked')
return
return
This field published_at it's a date time.
So I think now I need to put some array, the id's generated it's like id="post_published_at_1i"
and until id="post_published_at_5i"
Alright, I tried my luck with getting check boxes and option boxes support.
If you present the html necessary as haml then it would look like this:
.clearfix
%label
.input
%ul.inputs-list
%li
%label
%input
%li
%label
%input
So the wrapper configuration would need to look like something like this:
config.wrappers :inline, :class => 'clearfix', :error_class => :error do |b|
b.use :placeholder
b.use :label # how to get the label of all options boxes?
b.use :tag => 'div', :class => 'input' do |ba|
# how to use conditionally this (if many field)...
ba.use :tag => 'ul', :class => '.inputs-list' do |bc|
bb.use :tag => 'li' do |input|
bc.use :label do |input|
input.use :input
end
end
end
ba.use :input # ...or this if this is single field?
ba.use :error, :tag => :span, :class => :'help-inline'
ba.use :hint, :tag => :span, :class => :'help-block'
end
end
My questions:
b.use :label
to show the label of the option group?ba.use :input
when it is a single text field?I would really appreciate some hints and tips.
Hi,
I'm trying to use an horizontal_form
for a simple input with a label and I'm trying to change the size of the input by using bootstrap class but it doesn't work. By looking in details the code the grid_wrapper
has the following class col-sm-9
and despite the fact that I try to use grid_wrapper_html
to specify a bootstrap class the initial is still present.
Is there any way of replace this value with my own without creating a custom wrapper?
Thanks in advance.
$ rails g scaffold post
/home/user/demo/config/initializers/simple_form.rb:153:in block in <top (required)>': undefined method
boolean_label_class=' for SimpleForm:Module (NoMethodError)
from /home/user/.rvm/gems/ruby-2.1.0@demo/gems/simple_form-3.0.2/lib/simple_form.rb:216:in setup' from /home/user/demo/config/initializers/simple_form.rb:2:in
<top (required)>'
from /home/user/.rvm/gems/ruby-2.1.0@demo/gems/activesupport-4.1.0/lib/active_support/dependencies.rb:241:in load' from /home/user/.rvm/gems/ruby-2.1.0@demo/gems/activesupport-4.1.0/lib/active_support/dependencies.rb:241:in
block in load'
from /home/user/.rvm/gems/ruby-2.1.0@demo/gems/activesupport-4.1.0/lib/active_support/dependencies.rb:232:in load_dependency' from /home/user/.rvm/gems/ruby-2.1.0@demo/gems/activesupport-4.1.0/lib/active_support/dependencies.rb:241:in
load'
from /home/user/.rvm/gems/ruby-2.1.0@demo/gems/railties-4.1.0/lib/rails/engine.rb:648:in block in load_config_initializer' from /home/user/.rvm/gems/ruby-2.1.0@demo/gems/activesupport-4.1.0/lib/active_support/notifications.rb:161:in
instrument'
from /home/user/.rvm/gems/ruby-2.1.0@demo/gems/railties-4.1.0/lib/rails/engine.rb:647:in load_config_initializer' from /home/user/.rvm/gems/ruby-2.1.0@demo/gems/railties-4.1.0/lib/rails/engine.rb:612:in
block (2 levels) in class:Engine'
from /home/user/.rvm/gems/ruby-2.1.0@demo/gems/railties-4.1.0/lib/rails/engine.rb:611:in each' from /home/user/.rvm/gems/ruby-2.1.0@demo/gems/railties-4.1.0/lib/rails/engine.rb:611:in
block in class:Engine'
from /home/user/.rvm/gems/ruby-2.1.0@demo/gems/railties-4.1.0/lib/rails/initializable.rb:30:in instance_exec' from /home/user/.rvm/gems/ruby-2.1.0@demo/gems/railties-4.1.0/lib/rails/initializable.rb:30:in
run'
from /home/user/.rvm/gems/ruby-2.1.0@demo/gems/railties-4.1.0/lib/rails/initializable.rb:55:in block in run_initializers' from /home/user/.rvm/rubies/ruby-2.1.0/lib/ruby/2.1.0/tsort.rb:226:in
block in tsort_each'
from /home/user/.rvm/rubies/ruby-2.1.0/lib/ruby/2.1.0/tsort.rb:348:in block (2 levels) in each_strongly_connected_component' from /home/user/.rvm/rubies/ruby-2.1.0/lib/ruby/2.1.0/tsort.rb:418:in
block (2 levels) in each_strongly_connected_component_from'
from /home/user/.rvm/rubies/ruby-2.1.0/lib/ruby/2.1.0/tsort.rb:427:in each_strongly_connected_component_from' from /home/user/.rvm/rubies/ruby-2.1.0/lib/ruby/2.1.0/tsort.rb:417:in
block in each_strongly_connected_component_from'
from /home/user/.rvm/gems/ruby-2.1.0@demo/gems/railties-4.1.0/lib/rails/initializable.rb:44:in each' from /home/user/.rvm/gems/ruby-2.1.0@demo/gems/railties-4.1.0/lib/rails/initializable.rb:44:in
tsort_each_child'
from /home/user/.rvm/rubies/ruby-2.1.0/lib/ruby/2.1.0/tsort.rb:411:in call' from /home/user/.rvm/rubies/ruby-2.1.0/lib/ruby/2.1.0/tsort.rb:411:in
each_strongly_connected_component_from'
from /home/user/.rvm/rubies/ruby-2.1.0/lib/ruby/2.1.0/tsort.rb:347:in block in each_strongly_connected_component' from /home/user/.rvm/rubies/ruby-2.1.0/lib/ruby/2.1.0/tsort.rb:345:in
each'
from /home/user/.rvm/rubies/ruby-2.1.0/lib/ruby/2.1.0/tsort.rb:345:in call' from /home/user/.rvm/rubies/ruby-2.1.0/lib/ruby/2.1.0/tsort.rb:345:in
each_strongly_connected_component'
from /home/user/.rvm/rubies/ruby-2.1.0/lib/ruby/2.1.0/tsort.rb:224:in tsort_each' from /home/user/.rvm/rubies/ruby-2.1.0/lib/ruby/2.1.0/tsort.rb:205:in
tsort_each'
from /home/user/.rvm/gems/ruby-2.1.0@demo/gems/railties-4.1.0/lib/rails/initializable.rb:54:in run_initializers' from /home/user/.rvm/gems/ruby-2.1.0@demo/gems/railties-4.1.0/lib/rails/application.rb:288:in
initialize!'
from /home/user/demo/config/environment.rb:5:in <top (required)>' from /home/user/.rvm/gems/ruby-2.1.0@demo/gems/spring-1.1.3/lib/spring/application.rb:92:in
require'
from /home/user/.rvm/gems/ruby-2.1.0@demo/gems/spring-1.1.3/lib/spring/application.rb:92:in preload' from /home/user/.rvm/gems/ruby-2.1.0@demo/gems/spring-1.1.3/lib/spring/application.rb:140:in
serve'
from /home/user/.rvm/gems/ruby-2.1.0@demo/gems/spring-1.1.3/lib/spring/application.rb:128:in block in run' from /home/user/.rvm/gems/ruby-2.1.0@demo/gems/spring-1.1.3/lib/spring/application.rb:122:in
loop'
from /home/user/.rvm/gems/ruby-2.1.0@demo/gems/spring-1.1.3/lib/spring/application.rb:122:in run' from /home/user/.rvm/gems/ruby-2.1.0@demo/gems/spring-1.1.3/lib/spring/application/boot.rb:18:in
<top (required)>'
from /home/user/.rvm/rubies/ruby-2.1.0/lib/ruby/site_ruby/2.1.0/rubygems/core_ext/kernel_require.rb:55:in require' from /home/user/.rvm/rubies/ruby-2.1.0/lib/ruby/site_ruby/2.1.0/rubygems/core_ext/kernel_require.rb:55:in
require'
from -e:1:in `
Hi, i found that removing in this line https://github.com/rafaelfranca/simple_form-bootstrap/blob/master/config/initializers/simple_form_bootstrap.rb#L90 ".col-sm-9" lead to correct position.
For now this "bug"? also visible in http://simple-form-bootstrap.plataformatec.com.br/ in "Simple Form: Horizontal Form" panel
I cloned and tested this repo locally. The dropdown menu item 'Examples' is not working.
We have a mature app using simple_form with Bootstrap 3. We are developing a new set of features where we would like to use Bootstrap 4 or maybe even 5 depending on when we launch the features, with the goal of eventually transitioning the old v3 views to use whatever new version we settle on.
Is there any suggested way of doing this? One option I guess would be to customize all of the wrappers in the generated simple_form bootstrap initializer (e.g. add a bs4_
prefix or something like that and then explicity add wrapper: :bs4_vertical_form
or whatever in each call to simple form. I would like to avoid this if possible, but not if it's the only sane way.
I guess another option would be to remove the initializers and create two separate form builders and move all the initialization configuration code into the initialize
method of each form builder. That's probably not great for performance but it may not be enough of an issue to matter.
Does anyone have any other ideas or suggestions? Thanks in advance.
hey folks, super excited you're putting these two great libraries together. Awesome job.
The only form element I've had some troubles with so far is a datetime select. Without any further customization the select's are far too big and awkward looking. We can of course customize the individual fields to use the 'medium' and 'small' classes to better lay out the dropdowns, but I'm not sure how you'd do that from simple_form itself.
If this makes no sense, check out this pic: https://skitch.com/jackdempsey3rd/gkn7g/untitled
the bottom is the normal generated result, the top is what it looks like once I go back and add some small classes to the elements. Any thoughts?
(should probably point out that adding
:input_html => {:class => :small}
does help, but the month select is just barely too big for this. I guess a configuration to edit the html of each resulting element would be needed to support this...perhaps that's overkill/not desired tho.
Hi I have a question about your example and don't know how to contact you and thus post here.
In your code :
app/views/articles/_form.html.erb
Line 85:
<%= f.input :content, :input_html => { :class => "span6" } %>
In the browser, this line will generate a TEXT AREA, while I could not found why.
Coz in Line 24:
<%= f.input :name, :input_html => { :class => "span6" },
It has same code, but it is a Input text field.
Why?? It drives me crazy......
Thanks
Could it be, that:
data-date-viewmode="years"
does not work correctly?
Hi team,
we just released Rails 9001. To help us to find regression and make the final release
an awesome release for everyone, I'm here humbly asking you to test your project with this
Release Candidate.
We are planing the final release to 2014-03-20, so it would be great if you test it before
this date.
If you find any regression please open an issue on GitHub mentioning me and with the title starting
with:
[Regression 9001]
Thanks in advance.
The option config.browser_validations is set to false by default and 'recommended due to some quirks from different browsers.'
Is there any documentation on what browsers or what quirks to be on the lookout for that were identified as a reason to choose keeping this option as a default? I'm not looking for an exhaustive list, but any direction on the issues to look out for would be appreciated as I couldn't turn up anything in a google search or past issues.
It looks like this was originally true but changes back just shy of a decade ago related to error styling: ffac64e
and documentation was updated in 2014: cbeeb3b#diff-523378c56f55355a780b4524e2ee91f1b93de9a7fc9ae8395739e805eb187089R202
Hi
What does the url setting do?
url: create_horizontal_examples_url
http://stackoverflow.com/questions/24838052/what-does-url-in-simple-form-do
I could not find any information about it in the documents.
I just inserted some info and hit "Update article", so boom... Internal Error server.
test
I have added a StackOverflow question here:
Simple_Form: Use fieldset/legend for radio buttons / checkboxes
I think it should be considered for a next simple_form-bootstrap release.
when using a simple boolean field :
<%= f.input :published, :as => :boolean, %>
and a form-vertical
the label is displayed ABOVE the check box .... which is not nice ...
as it should be displayed inline, i.e. after the check box
but using
f.input :published, :as => :boolean, :inline_label => true, :label => false
display it nice ..
is it the way to do it ?
It seems that the Bootstrap gem is not fully compatible with Rails 7.
I see in this example app that you use both the Bootstrap gem and ImportMaps.
Can we get rid of one of them (e.g. remove the gem and use only ImportMaps)?
Or does SimpleForm require the gem?
Hi,
Trying to start the server, I'm getting this error:
/media/Projects/Kha6wa/kha6wa/config/initializers/simple_form.rb:3:in block in <top (required)>': undefined method
wrappers' for SimpleForm:Module (NoMethodError)
from /opt/ruby-1.9.2-p290/lib/ruby/gems/1.9.1/gems/simple_form-1.5.2/lib/simple_form.rb:143:in setup' from /media/Projects/Kha6wa/kha6wa/config/initializers/simple_form.rb:2:in
<top (required)>'
from /opt/ruby-1.9.2-p290/lib/ruby/gems/1.9.1/gems/activesupport-3.1.1/lib/active_support/dependencies.rb:234:in load' from /opt/ruby-1.9.2-p290/lib/ruby/gems/1.9.1/gems/activesupport-3.1.1/lib/active_support/dependencies.rb:234:in
block in load'
from /opt/ruby-1.9.2-p290/lib/ruby/gems/1.9.1/gems/activesupport-3.1.1/lib/active_support/dependencies.rb:223:in block in load_dependency' from /opt/ruby-1.9.2-p290/lib/ruby/gems/1.9.1/gems/activesupport-3.1.1/lib/active_support/dependencies.rb:640:in
new_constants_in'
from /opt/ruby-1.9.2-p290/lib/ruby/gems/1.9.1/gems/activesupport-3.1.1/lib/active_support/dependencies.rb:223:in load_dependency' from /opt/ruby-1.9.2-p290/lib/ruby/gems/1.9.1/gems/activesupport-3.1.1/lib/active_support/dependencies.rb:234:in
load'
from /opt/ruby-1.9.2-p290/lib/ruby/gems/1.9.1/gems/railties-3.1.1/lib/rails/engine.rb:556:in block (2 levels) in <class:Engine>' from /opt/ruby-1.9.2-p290/lib/ruby/gems/1.9.1/gems/railties-3.1.1/lib/rails/engine.rb:555:in
each'
from /opt/ruby-1.9.2-p290/lib/ruby/gems/1.9.1/gems/railties-3.1.1/lib/rails/engine.rb:555:in block in <class:Engine>' from /opt/ruby-1.9.2-p290/lib/ruby/gems/1.9.1/gems/railties-3.1.1/lib/rails/initializable.rb:30:in
instance_exec'
from /opt/ruby-1.9.2-p290/lib/ruby/gems/1.9.1/gems/railties-3.1.1/lib/rails/initializable.rb:30:in run' from /opt/ruby-1.9.2-p290/lib/ruby/gems/1.9.1/gems/railties-3.1.1/lib/rails/initializable.rb:55:in
block in run_initializers'
from /opt/ruby-1.9.2-p290/lib/ruby/gems/1.9.1/gems/railties-3.1.1/lib/rails/initializable.rb:54:in each' from /opt/ruby-1.9.2-p290/lib/ruby/gems/1.9.1/gems/railties-3.1.1/lib/rails/initializable.rb:54:in
run_initializers'
from /opt/ruby-1.9.2-p290/lib/ruby/gems/1.9.1/gems/railties-3.1.1/lib/rails/application.rb:96:in initialize!' from /opt/ruby-1.9.2-p290/lib/ruby/gems/1.9.1/gems/railties-3.1.1/lib/rails/railtie/configurable.rb:30:in
method_missing'
from /media/Projects/Kha6wa/kha6wa/config/environment.rb:7:in <top (required)>' from /opt/ruby-1.9.2-p290/lib/ruby/gems/1.9.1/gems/activesupport-3.1.1/lib/active_support/dependencies.rb:240:in
require'
from /opt/ruby-1.9.2-p290/lib/ruby/gems/1.9.1/gems/activesupport-3.1.1/lib/active_support/dependencies.rb:240:in block in require' from /opt/ruby-1.9.2-p290/lib/ruby/gems/1.9.1/gems/activesupport-3.1.1/lib/active_support/dependencies.rb:223:in
block in load_dependency'
from /opt/ruby-1.9.2-p290/lib/ruby/gems/1.9.1/gems/activesupport-3.1.1/lib/active_support/dependencies.rb:640:in new_constants_in' from /opt/ruby-1.9.2-p290/lib/ruby/gems/1.9.1/gems/activesupport-3.1.1/lib/active_support/dependencies.rb:223:in
load_dependency'
from /opt/ruby-1.9.2-p290/lib/ruby/gems/1.9.1/gems/activesupport-3.1.1/lib/active_support/dependencies.rb:240:in require' from /media/Projects/Kha6wa/kha6wa/config.ru:4:in
block in
instance_eval' from /opt/ruby-1.9.2-p290/lib/ruby/gems/1.9.1/gems/rack-1.3.4/lib/rack/builder.rb:51:in
initialize'new' from /media/Projects/Kha6wa/kha6wa/config.ru:1:in
'eval' from /opt/ruby-1.9.2-p290/lib/ruby/gems/1.9.1/gems/rack-1.3.4/lib/rack/builder.rb:40:in
parse_file'app' from /opt/ruby-1.9.2-p290/lib/ruby/gems/1.9.1/gems/railties-3.1.1/lib/rails/commands/server.rb:46:in
app'wrapped_app' from /opt/ruby-1.9.2-p290/lib/ruby/gems/1.9.1/gems/rack-1.3.4/lib/rack/server.rb:252:in
start'start' from /opt/ruby-1.9.2-p290/lib/ruby/gems/1.9.1/gems/railties-3.1.1/lib/rails/commands.rb:54:in
block in <top (required)>'tap' from /opt/ruby-1.9.2-p290/lib/ruby/gems/1.9.1/gems/railties-3.1.1/lib/rails/commands.rb:49:in
<top (required)>'require' from script/rails:6:in
'You will know better than I, but I would like to know if it would be good for us to upgrade the Rails version here.
https://simple-form-bootstrap.herokuapp.com/ is broken.
Hi.
I thought that this project was a gem so I tried to add it in my gemfile:
gem 'simple_form-bootstrap', github: 'rafaelfranca/simple_form-bootstrap'
But it doesn't works, probably because this is actually a project and not a gem.
I know that this is not released yet, but I would like to give a try to the dev version.
I would appreciate to kown how use it, because I have no idea how to use it, yet.
Thanks.
I tried many ways , but I never get the %span and input inline, always a br between them
.row
.col-sm-3.col-md-3.col-lg-3
= f.label :email
= f.input :email, :wrapper => :bootstrap3_prepend, :label => false, :required => false do
%span.add-on %
= f.input_field :email, { :readonly => true}
.row
.col-sm-3.col-md-3.col-lg-3
= f.label :email
= f.input :email, :wrapper => :bootstrap3_append , :label => false, :required => false do
= f.input_field :email, { :readonly => true}
%span.add-on %
defined in initializer
config.wrappers :bootstrap3_prepend, tag: 'div', class: 'control-group', error_class: 'has-error' do |b|
b.use :html5
b.use :placeholder
b.wrapper tag: 'div', class: 'controls' do |input|
input.wrapper tag: 'div', class: 'input-prepend' do |prepend|
prepend.use :label , class: 'addon'
prepend.use :input
end
input.use :hint, wrap_with: { tag: 'span', class: 'help-block' }
input.use :error, wrap_with: { tag: 'span', class: 'help-block has-error' }
end
end
config.wrappers :bootstrap3_append, tag: 'div', class: 'form-group', error_class: 'has-error' do |b|
b.use :html5
b.use :placeholder
b.wrapper tag: 'div', class: 'controls' do |input|
input.wrapper tag: 'div', class: 'input-append' do |append|
append.use :input
append.use :label , class: 'addon'
end
input.use :hint, wrap_with: { tag: 'span', class: 'help-block' }
input.use :error, wrap_with: { tag: 'span', class: 'help-block has-error' }
end
end
what is missing ?
Hey @rafaelfranca 👋
Of curse, this is a demo application but what do you think setup depfu with some clicks to automatically receive dependency and relevant security updates. I volunteer to check the incoming updates.
Heroku would also support automatic deploys, this would be a nice addition.
Hi, this is great! I can't, however make it properly work with a single checkbox in devise:
<h2>Sign in</h2>
<%= simple_form_for(resource, :as => resource_name, :url => session_path(resource_name),
:wrapper => "inline") do |f| %>
<%= f.input :email, :hint => "Your E-mail address" %>
<%= f.input :password %>
<%= f.input :remember_me, :as => :boolean if devise_mapping.rememberable? %>
<%= f.button :submit, "Sign in", :class => "primary" %>
<% end %>
<%= render :partial => "devise/shared/links" %>
I can see the input and the label properly aligned, but the checkbox itself seems to be floating around. Any clues?
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.