Change default generator classes to .form-inputs and .form-actions
Makes it easier to integrate with bootstrap. Related to #424
This commit is contained in:
parent
04f70e8a5d
commit
612c0067cf
|
@ -30,6 +30,8 @@
|
|||
and is backported inside SimpleForm builder extensions.
|
||||
More info in [#215](https://github.com/plataformatec/simple_form/issues/215)
|
||||
* Add `item_wrapper_class` configuration option for collection radio buttons / check boxes inputs.
|
||||
* Change default generator templates to use .form-inputs and .form-actions classes in wrapper divs.
|
||||
(the latter is the default in bootstrap, so this makes it easier to integrate).
|
||||
|
||||
### deprecation
|
||||
* Deprecate part of the old configuration API in favor of the wrapper API which allows you to customize your inputs
|
||||
|
|
|
@ -1,13 +1,13 @@
|
|||
<%%= simple_form_for(@<%= singular_table_name %>) do |f| %>
|
||||
<%%= f.error_notification %>
|
||||
|
||||
<div class="inputs">
|
||||
<div class="form-inputs">
|
||||
<%- attributes.each do |attribute| -%>
|
||||
<%%= f.<%= attribute.reference? ? :association : :input %> :<%= attribute.name %> %>
|
||||
<%- end -%>
|
||||
</div>
|
||||
|
||||
<div class="actions">
|
||||
<div class="form-actions">
|
||||
<%%= f.button :submit %>
|
||||
</div>
|
||||
<%% end %>
|
||||
|
|
|
@ -1,10 +1,10 @@
|
|||
= simple_form_for(@<%= singular_table_name %>) do |f|
|
||||
= f.error_notification
|
||||
|
||||
.inputs
|
||||
.form-inputs
|
||||
<%- attributes.each do |attribute| -%>
|
||||
= f.<%= attribute.reference? ? :association : :input %> :<%= attribute.name %>
|
||||
<%- end -%>
|
||||
|
||||
.actions
|
||||
.form-actions
|
||||
= f.button :submit
|
||||
|
|
|
@ -1,10 +1,10 @@
|
|||
= simple_form_for(@<%= singular_table_name %>) do |f|
|
||||
= f.error_notification
|
||||
|
||||
.inputs
|
||||
.form-inputs
|
||||
<%- attributes.each do |attribute| -%>
|
||||
= f.<%= attribute.reference? ? :association : :input %> :<%= attribute.name %>
|
||||
<%- end -%>
|
||||
|
||||
.actions
|
||||
.form-actions
|
||||
= f.button :submit
|
||||
|
|
Loading…
Reference in New Issue