HEX
Server: Apache
System: Linux dev.epsylon.net 3.10.0-1160.144.1.el7.tuxcare.els2.x86_64 #1 SMP Sun Feb 15 11:22:42 UTC 2026 x86_64
User: nexper (1054)
PHP: 8.2.30
Disabled: exec,passthru,shell_exec,system
Upload Files
File: /home/nexper/public_html/crm/custom/include/generic/SugarWidgets/SugarWidgetSubPanelCheck.php
<?php
if(!defined('sugarEntry') || !sugarEntry) die('Not A Valid Entry Point');

include_once('include/generic/SugarWidgets/SugarWidgetField.php');


class SugarWidgetSubPanelCheck extends SugarWidgetField
{
    function displayListPlain($layout_def) {

        $value= $this->_get_list_value($layout_def);

        if (isset($layout_def['widget_type']) && $layout_def['widget_type'] =='checkbox') {

            if ($value != '' &&  ($value == 'on' || intval($value) == 1 || $value == 'yes'))
            {
                return "&nbsp;<input name='checkbox_display' class='checkbox' type='checkbox' disabled='true' checked>";
            }
            //Modification to allow checkboxes to be displayed correctly in subpanel
            if ($layout_def['checkbox_value']=='true'){
                return "&nbsp;<input name='".$layout_def['module']."checkbox_display[]' class='checkbox' type='checkbox' id='".$layout_def['module']."checkbox_display_id[]' value=\"".$layout_def['fields']['ID']."\" onclick=''>";
            }

            return "&nbsp;<input name='checkbox_display' class='checkbox' type='checkbox' disabled='true'>";
        }
        return $value;
    }

}