__('Checkboxes', __FILE__), // Module Title 'summary' => __('Multiple checkbox toggles', __FILE__), // Module Summary 'version' => 100, 'permanent' => true, ); } public function init() { $this->set('table', false); $this->set('thead', ''); $this->set('optionColumns', 0); parent::init(); $this->set('size', null); // cancel 'size' attribute used by select multiple } public function ___render() { $this->checkDefaultValue(); $out = ''; $table = null; $columns = (int) $this->optionColumns; $inline = $columns === 1 || $columns > 10; $liAttr = ''; $ulClass = ''; if($this->table) { $table = $this->modules->get("MarkupAdminDataTable"); $table->setEncodeEntities(false); if($this->thead) $table->headerRow(explode('|', htmlspecialchars($this->thead, ENT_QUOTES, 'UTF-8'))); } else if($columns) { if($inline) { $ulClass = 'InputfieldCheckboxesFloated'; } else { $liWidth = round(100 / $columns)-1; // 1% padding-right added from stylesheet $liAttr = " style='width: {$liWidth}%;'"; $ulClass = 'InputfieldCheckboxesColumns'; } $ulClass .= " ui-helper-clearfix"; } else { $ulClass = 'InputfieldCheckboxesStacked'; } if(!$table) $out = "\n