[Rt-commit] rt branch 5.0/shredder-boolean-argument-input-value created. rt-5.0.5-107-g73e4a30f39

BPS Git Server git at git.bestpractical.com
Thu Jan 4 17:44:56 UTC 2024


This is an automated email from the git hooks/post-receive script. It was
generated because a ref change was pushed to the repository containing
the project "rt".

The branch, 5.0/shredder-boolean-argument-input-value has been created
        at  73e4a30f39dd78c1f84da101a3c0f7421c1839ea (commit)

- Log -----------------------------------------------------------------
commit 73e4a30f39dd78c1f84da101a3c0f7421c1839ea
Author: sunnavy <sunnavy at bestpractical.com>
Date:   Thu Jan 4 12:34:31 2024 -0500

    Fix shredder boolean argument inputs
    
    Previously they couldn't be actually checked, because of the empty input
    values. This commit corrects both the value and checked status.

diff --git a/share/html/Admin/Tools/Shredder/Elements/PluginArguments b/share/html/Admin/Tools/Shredder/Elements/PluginArguments
index a06ee80fbe..0bfb2a374c 100644
--- a/share/html/Admin/Tools/Shredder/Elements/PluginArguments
+++ b/share/html/Admin/Tools/Shredder/Elements/PluginArguments
@@ -54,7 +54,7 @@ $Plugin => ''
 %  if( $plugin_obj->ArgIsBoolean( $a ) ) {
   <&| /Elements/LabeledValue, Label => "" &>
       <div class="custom-control custom-checkbox">
-        <input type="checkbox" id="<% "$Plugin:$a" %>" name="<% "$Plugin:$a" %>" class="custom-control-input" value="<% $ARGS{ "$Plugin:$a" } || '' %>" />
+        <input type="checkbox" id="<% "$Plugin:$a" %>" name="<% "$Plugin:$a" %>" class="custom-control-input" value="1" <% $ARGS{ "$Plugin:$a" } ? 'checked="checked"' : '' |n %> />
         <label class="custom-control-label" for="<% "$Plugin:$a" %>"><% loc($a) %></label>
         <span class="hints d-block"><% $arguments_help{$a}->{help} |n%></span>
       </div>

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


hooks/post-receive
-- 
rt


More information about the rt-commit mailing list