aboutsummaryrefslogtreecommitdiffstats
path: root/app/inputs/boolean_input.rb
diff options
context:
space:
mode:
authorAlban Peignier2015-05-21 17:17:21 +0200
committerAlban Peignier2015-05-21 17:19:11 +0200
commit8dc301b503ae261c788f6d0109ed54fc3b71dc58 (patch)
tree37185d8b5824d1cfdc6a754fa9226d8afb099e1a /app/inputs/boolean_input.rb
parent035ad69d0cfc71526ada775ce74e9509a8a2feb4 (diff)
downloadchouette-core-8dc301b503ae261c788f6d0109ed54fc3b71dc58.tar.bz2
Add customized Formtastic BooleanInput to align label like other inputs
Diffstat (limited to 'app/inputs/boolean_input.rb')
-rw-r--r--app/inputs/boolean_input.rb9
1 files changed, 9 insertions, 0 deletions
diff --git a/app/inputs/boolean_input.rb b/app/inputs/boolean_input.rb
new file mode 100644
index 000000000..a2b9b92ca
--- /dev/null
+++ b/app/inputs/boolean_input.rb
@@ -0,0 +1,9 @@
+class BooleanInput < Formtastic::Inputs::BooleanInput
+ def label_with_nested_checkbox
+ builder.label(
+ method,
+ label_text,
+ label_html_options.merge(class: "label")
+ ) << "" << check_box_html
+ end
+end