[Rt-commit] rt branch, 5.0/use-checkbox-class-for-checkboxes, created. rt-5.0.0-188-g47c6edf396

Craig Kaiser craig at bestpractical.com
Tue Jan 5 16:55:23 EST 2021


The branch, 5.0/use-checkbox-class-for-checkboxes has been created
        at  47c6edf3962676fdb7061cf4b53b4dfeff27acb7 (commit)

- Log -----------------------------------------------------------------
commit 47c6edf3962676fdb7061cf4b53b4dfeff27acb7
Author: craig kaiser <craig at bestpractical.com>
Date:   Tue Jan 5 16:54:49 2021 -0500

    Use checkbox class for multi select list input
    
    The "custom-radio" input class should only be used for single value list
    inputs.

diff --git a/share/html/Elements/EditCustomFieldSelect b/share/html/Elements/EditCustomFieldSelect
index 13c4c1f2f3..f963d8dc69 100644
--- a/share/html/Elements/EditCustomFieldSelect
+++ b/share/html/Elements/EditCustomFieldSelect
@@ -71,7 +71,7 @@
 %   while ( my $value = $CFVs->Next ) {
 %     my $content = $value->Name;
 %     my $labelid = "$name-". $value->id;
-<div data-name="<% $value->Category || '' %>" class="custom-control custom-radio">
+<div data-name="<% $value->Category || '' %>" class="custom-control custom-<% ( $MaxValues == 1 && $RenderType eq 'List' ) ? 'radio' : 'checkbox' %>">
   <input class="custom-control-input"  type="<% $checktype %>" name="<% $name %>" id="<% $labelid %>" value="<% $content %>" <% $default{ lc $content }? ' checked="checked"' : '' |n%> />
   <label class="custom-control-label" for="<% $labelid %>"><% $content %></label><br />
 </div>

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


More information about the rt-commit mailing list