diff --git a/lib/generators/simple_form/templates/config/initializers/simple_form_bootstrap.rb b/lib/generators/simple_form/templates/config/initializers/simple_form_bootstrap.rb index 0178fd53..8036836c 100644 --- a/lib/generators/simple_form/templates/config/initializers/simple_form_bootstrap.rb +++ b/lib/generators/simple_form/templates/config/initializers/simple_form_bootstrap.rb @@ -57,7 +57,7 @@ SimpleForm.setup do |config| b.optional :pattern b.optional :min_max b.optional :readonly - b.use :label, class: 'form-control-label' + b.use :label b.use :input, class: 'form-control', error_class: 'is-invalid', valid_class: 'is-valid' b.use :full_error, wrap_with: { tag: 'div', class: 'invalid-feedback' } b.use :hint, wrap_with: { tag: 'small', class: 'form-text text-muted' } @@ -116,7 +116,7 @@ SimpleForm.setup do |config| config.wrappers :vertical_multi_select, tag: 'div', class: 'form-group', error_class: 'form-group-invalid', valid_class: 'form-group-valid' do |b| b.use :html5 b.optional :readonly - b.use :label, class: 'form-control-label' + b.use :label b.wrapper tag: 'div', class: 'd-flex flex-row justify-content-between align-items-center' do |ba| ba.use :input, class: 'form-control mx-1', error_class: 'is-invalid', valid_class: 'is-valid' end @@ -177,7 +177,7 @@ SimpleForm.setup do |config| config.wrappers :horizontal_collection, item_wrapper_class: 'form-check', tag: 'div', class: 'form-group row', error_class: 'form-group-invalid', valid_class: 'form-group-valid' do |b| b.use :html5 b.optional :readonly - b.use :label, class: 'col-sm-3 form-control-label' + b.use :label, class: 'col-sm-3 col-form-label' b.wrapper :grid_wrapper, tag: 'div', class: 'col-sm-9' do |ba| ba.use :input, class: 'form-check-input', error_class: 'is-invalid', valid_class: 'is-valid' ba.use :full_error, wrap_with: { tag: 'div', class: 'invalid-feedback d-block' } @@ -189,7 +189,7 @@ SimpleForm.setup do |config| config.wrappers :horizontal_collection_inline, item_wrapper_class: 'form-check form-check-inline', tag: 'div', class: 'form-group row', error_class: 'form-group-invalid', valid_class: 'form-group-valid' do |b| b.use :html5 b.optional :readonly - b.use :label, class: 'col-sm-3 form-control-label' + b.use :label, class: 'col-sm-3 col-form-label' b.wrapper :grid_wrapper, tag: 'div', class: 'col-sm-9' do |ba| ba.use :input, class: 'form-check-input', error_class: 'is-invalid', valid_class: 'is-valid' ba.use :full_error, wrap_with: { tag: 'div', class: 'invalid-feedback d-block' } @@ -204,7 +204,7 @@ SimpleForm.setup do |config| b.optional :maxlength b.optional :minlength b.optional :readonly - b.use :label, class: 'col-sm-3 form-control-label' + b.use :label, class: 'col-sm-3 col-form-label' b.wrapper :grid_wrapper, tag: 'div', class: 'col-sm-9' do |ba| ba.use :input, error_class: 'is-invalid', valid_class: 'is-valid' ba.use :full_error, wrap_with: { tag: 'div', class: 'invalid-feedback d-block' } @@ -216,7 +216,7 @@ SimpleForm.setup do |config| config.wrappers :horizontal_multi_select, tag: 'div', class: 'form-group row', error_class: 'form-group-invalid', valid_class: 'form-group-valid' do |b| b.use :html5 b.optional :readonly - b.use :label, class: 'col-sm-3 control-label' + b.use :label, class: 'col-sm-3 col-form-label' b.wrapper :grid_wrapper, tag: 'div', class: 'col-sm-9' do |ba| ba.wrapper tag: 'div', class: 'd-flex flex-row justify-content-between align-items-center' do |bb| bb.use :input, class: 'form-control mx-1', error_class: 'is-invalid', valid_class: 'is-valid' @@ -232,7 +232,7 @@ SimpleForm.setup do |config| b.use :placeholder b.optional :readonly b.optional :step - b.use :label, class: 'col-sm-3 form-control-label' + b.use :label, class: 'col-sm-3 col-form-label' b.wrapper :grid_wrapper, tag: 'div', class: 'col-sm-9' do |ba| ba.use :input, class: 'form-control-range', error_class: 'is-invalid', valid_class: 'is-valid' ba.use :full_error, wrap_with: { tag: 'div', class: 'invalid-feedback d-block' } @@ -326,7 +326,7 @@ SimpleForm.setup do |config| b.optional :maxlength b.optional :minlength b.optional :readonly - b.use :label, class: 'form-control-label' + b.use :label b.wrapper :custom_file_wrapper, tag: 'div', class: 'custom-file' do |ba| ba.use :input, class: 'custom-file-input', error_class: 'is-invalid', valid_class: 'is-valid' ba.use :label, class: 'custom-file-label' @@ -339,7 +339,7 @@ SimpleForm.setup do |config| config.wrappers :custom_multi_select, tag: 'div', class: 'form-group', error_class: 'form-group-invalid', valid_class: 'form-group-valid' do |b| b.use :html5 b.optional :readonly - b.use :label, class: 'form-control-label' + b.use :label b.wrapper tag: 'div', class: 'd-flex flex-row justify-content-between align-items-center' do |ba| ba.use :input, class: 'custom-select mx-1', error_class: 'is-invalid', valid_class: 'is-valid' end @@ -353,7 +353,7 @@ SimpleForm.setup do |config| b.use :placeholder b.optional :readonly b.optional :step - b.use :label, class: 'form-control-label' + b.use :label b.use :input, class: 'custom-range', error_class: 'is-invalid', valid_class: 'is-valid' b.use :full_error, wrap_with: { tag: 'div', class: 'invalid-feedback d-block' } b.use :hint, wrap_with: { tag: 'small', class: 'form-text text-muted' } @@ -370,7 +370,7 @@ SimpleForm.setup do |config| # b.optional :pattern # b.optional :min_max # b.optional :readonly - # b.use :label, class: 'form-control-label' + # b.use :label # b.wrapper :input_group_tag, tag: 'div', class: 'input-group' do |ba| # ba.optional :prepend # ba.use :input, class: 'form-control', error_class: 'is-invalid', valid_class: 'is-valid' @@ -393,7 +393,7 @@ SimpleForm.setup do |config| b.optional :min_max b.optional :readonly b.use :input, class: 'form-control', error_class: 'is-invalid', valid_class: 'is-valid' - b.use :label, class: 'form-control-label' + b.use :label b.use :full_error, wrap_with: { tag: 'div', class: 'invalid-feedback' } b.use :hint, wrap_with: { tag: 'small', class: 'form-text text-muted' } end @@ -403,7 +403,7 @@ SimpleForm.setup do |config| b.use :html5 b.optional :readonly b.use :input, class: 'custom-select custom-select-lg', error_class: 'is-invalid', valid_class: 'is-valid' - b.use :label, class: 'form-control-label' + b.use :label b.use :full_error, wrap_with: { tag: 'div', class: 'invalid-feedback' } b.use :hint, wrap_with: { tag: 'small', class: 'form-text text-muted' } end