aboutsummaryrefslogtreecommitdiffstats
path: root/config/initializers
diff options
context:
space:
mode:
authorGuillaume2017-11-23 17:13:09 +0100
committerGuillaume2017-11-23 17:13:19 +0100
commitc83002d8f281384244dc9c11432e2eb648b99b3b (patch)
treeefae0f2b8e40ae53c3688a3dc84082425fbd7ffc /config/initializers
parent21382e70b654215325a045627c563224943fdd83 (diff)
downloadchouette-core-c83002d8f281384244dc9c11432e2eb648b99b3b.tar.bz2
Refs #4824, #4825 update old form views to new layout with simple_form, add permissions for create an edit in line and network controller
Diffstat (limited to 'config/initializers')
-rw-r--r--config/initializers/simple_form_bootstrap.rb11
1 files changed, 11 insertions, 0 deletions
diff --git a/config/initializers/simple_form_bootstrap.rb b/config/initializers/simple_form_bootstrap.rb
index d90ea6398..4b9bd320d 100644
--- a/config/initializers/simple_form_bootstrap.rb
+++ b/config/initializers/simple_form_bootstrap.rb
@@ -132,6 +132,17 @@ SimpleForm.setup do |config|
ba.use :hint, wrap_with: { tag: 'p', class: 'help-block small' }
end
end
+
+ config.wrappers :multi_select_inline, tag: 'div', class: 'form-group', error_class: 'has-error' do |b|
+ b.use :html5
+ b.optional :readonly
+ b.use :label, class: 'control-label'
+ b.wrapper tag: 'div', class: 'form-inline col-sm-8 col-xs-7' do |ba|
+ ba.use :input, class: 'form-control'
+ ba.use :error, wrap_with: {tag: 'span', class: 'help-block small'}
+ ba.use :hint, wrap_with: {tag: 'p', class: 'help-block small'}
+ end
+ end
# Wrappers for forms and inputs using the Bootstrap toolkit.
# Check the Bootstrap docs (http://getbootstrap.com)
# to learn about the different styles for forms and inputs,