You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@whimsical.apache.org by cu...@apache.org on 2019/05/28 13:27:22 UTC

[whimsy] branch master updated: Improve styling; prevent extraneous text around checkradio controls

This is an automated email from the ASF dual-hosted git repository.

curcuru pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/whimsy.git


The following commit(s) were added to refs/heads/master by this push:
     new 9a1ba6e  Improve styling; prevent extraneous text around checkradio controls
9a1ba6e is described below

commit 9a1ba6e6631c202ebd504b1bdb6ed2d7746ce742
Author: Shane Curcuru <as...@shanecurcuru.org>
AuthorDate: Tue May 28 09:27:13 2019 -0400

    Improve styling; prevent extraneous text around checkradio controls
---
 lib/whimsy/asf/forms.rb | 7 ++++---
 1 file changed, 4 insertions(+), 3 deletions(-)

diff --git a/lib/whimsy/asf/forms.rb b/lib/whimsy/asf/forms.rb
index 04deaaa..9d797db 100644
--- a/lib/whimsy/asf/forms.rb
+++ b/lib/whimsy/asf/forms.rb
@@ -43,11 +43,12 @@ class Wunderbar::HtmlMarkup
   end
 
   # Utility function for divs around form controls, including help
+  # Note: passes :groupclass thru to input-group control for styling
   def _whimsy_control_wrapper(**args)
     _div.form_group do
       _label.control_label.col_sm_3 args[:label], for: "#{args[:name]}"
       _div.col_sm_9 do
-        _div.input_group do
+        _div! class: "input-group #{args[:groupclass]}" do
           yield
           _whimsy_forms_iconlink(args)
         end
@@ -154,14 +155,14 @@ class Wunderbar::HtmlMarkup
       if args[:options].kind_of?(Array)
         args[:options].each do |val|
           checked = true if args[:selected] && args[:selected].include?(val.to_s)
-          _input type: args[:type], name: args[:name], id: args[:id], value: val, class: args[:class], aria_describedby: args[:aria_describedby], checked: checked do
+          _input! type: args[:type], name: args[:name], id: args[:id], value: val, class: args[:class], aria_describedby: args[:aria_describedby], checked: checked do
             _! val
           end
         end
       elsif args[:options].kind_of?(Hash)
         args[:options].each do |val, disp|
           checked = true if args[:selected] && args[:selected].include?(val.to_s)
-          _input type: args[:type], name: args[:name], id: args[:id], value: val, class: args[:class], aria_describedby: args[:aria_describedby], checked: checked do
+          _input! type: args[:type], name: args[:name], id: args[:id], value: val, class: args[:class], aria_describedby: args[:aria_describedby], checked: checked do
             _! disp
           end
         end