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 20:47:44 UTC
[whimsy] branch master updated: Bootstrap wraps in
label.radio-inline for formatting
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 aab76ba Bootstrap wraps in label.radio-inline for formatting
aab76ba is described below
commit aab76ba3ee3cd01787d2a0076d4ba9be3b46c53c
Author: Shane Curcuru <as...@shanecurcuru.org>
AuthorDate: Tue May 28 16:47:36 2019 -0400
Bootstrap wraps in label.radio-inline for formatting
---
lib/whimsy/asf/forms.rb | 12 ++++++++----
1 file changed, 8 insertions(+), 4 deletions(-)
diff --git a/lib/whimsy/asf/forms.rb b/lib/whimsy/asf/forms.rb
index 9d797db..35a5d2e 100644
--- a/lib/whimsy/asf/forms.rb
+++ b/lib/whimsy/asf/forms.rb
@@ -155,15 +155,19 @@ 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
- _! val
+ _label class: "#{args[:type]}-inline" 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
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
- _! disp
+ _label class: "#{args[:type]}-inline" 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
end
end