[Rt-commit] rt branch, 4.4/widget-improvements, updated. rt-4.4.1-4-gc566c73

Shawn Moore shawn at bestpractical.com
Tue Aug 15 14:49:36 EDT 2017


The branch, 4.4/widget-improvements has been updated
       via  c566c731b3480d70dbcee4b92c8558d153763106 (commit)
      from  30996a8036e66f8f1787754ebf17ef9d1e662b7c (commit)

Summary of changes:
 share/html/Widgets/Form/Boolean | 7 ++++++-
 1 file changed, 6 insertions(+), 1 deletion(-)

- Log -----------------------------------------------------------------
commit c566c731b3480d70dbcee4b92c8558d153763106
Author: Shawn M Moore <shawn at bestpractical.com>
Date:   Tue Aug 15 18:49:11 2017 +0000

    Make booleans with RadioStyle use true/false logic
    
    Rather than tri-value

diff --git a/share/html/Widgets/Form/Boolean b/share/html/Widgets/Form/Boolean
index 86120bf..d42deb6 100644
--- a/share/html/Widgets/Form/Boolean
+++ b/share/html/Widgets/Form/Boolean
@@ -78,15 +78,20 @@ $CurrentValue => undef,
     <input type="radio" name="<% $Name %>" value="1" <% $CurrentValue? ' checked="checked"': '' |n %> />\
     <% loc('Yes') %>
 </label>
+% if ($Default) {
 <label>
     <input type="radio" name="<% $Name %>" value="0" <% defined $CurrentValue && !$CurrentValue? ' checked="checked"': '' |n %> />\
     <% loc('No') %>
 </label>
-% if ($Default) {
 <label>
     <input type="radio" name="<% $Name %>" value="__empty_value__" <% !defined $CurrentValue? ' checked="checked"': '' |n %> />\
     <% $DefaultLabel %>
 </label>
+% } else {
+<label>
+    <input type="radio" name="<% $Name %>" value="0" <% !$CurrentValue? ' checked="checked"': '' |n %> />\
+    <% loc('No') %>
+</label>
 % }
 % }
 </%METHOD>

-----------------------------------------------------------------------


More information about the rt-commit mailing list