Files
FHC-Core/application/widgets/html/CheckboxWidget.php
T
Paolo e4160088e8 - Added headers where they were missing
- Added comments where needed
- Beautified the code where needed, more readable and more compliant to CS
- loadResource function in helper fhc_helper.php is not using anymore CI
- Moved all constants from UDFWidget to UDFLib
- Added constant SORT to UDFLib
- Renamed constant REGEX_LANGUAGE to FE_REGEX_LANGUAGE in UDFLib
- Better formatting and indentation of the code of WidgetLib (more compliant to CS)
- Added missing validation attributes to HTML widgets
- Added constant HTML_DEFAULT_VALUE to CheckboxWidget
- Unset parameter multiple in DropdownWidget constructor
- Changed value of constant REQUIRED in widget HTMLWidget
- Added protected property $htmlParameters to widget HTMLWidget
  (it works as alias to $this->_args[HTMLWidget::HTML_ARG_NAME] -> better code)
- Replaced $this->_args[HTMLWidget::HTML_ARG_NAME] with $this->htmlParameters in the widgets
- Changed the CSS class label[udf-required=true]::after to label[required-field=true]::after in widgets.css
- Better use of constants in UDFWidget: constants from HTMLWidget are used only for the HTML parameters,
  while constants from UDFLib are used only for UDF parameters
2017-08-17 11:51:40 +02:00

24 lines
654 B
PHP

<?php
/**
* It exends the Widget class to represent an HTML dropdown
*/
class CheckboxWidget extends HTMLWidget
{
// Name of the property that will be used to store the value attribute of the option tag
const VALUE_FIELD = 'value';
// Name of the property that will be used to store the value between the option tags
const DESCRIPTION_FIELD = 'description';
// Value of value attribute of the checkbox
const CHECKBOX_VALUE = 'true';
// Default checkbox value
const HTML_DEFAULT_VALUE = false;
/**
* Loads the view that renders a checkbox
*/
protected function loadCheckboxView()
{
$this->view('widgets/checkbox', $this->_args);
}
}