mirror of
https://github.com/FH-Complete/FHC-Core.git
synced 2026-06-05 22:29:27 +00:00
42 lines
1.2 KiB
PHP
42 lines
1.2 KiB
PHP
<?php Widget::printStartBlock(${Widget::HTML_ARG_NAME}); ?>
|
|
<?php
|
|
if (isset(${Widget::HTML_ARG_NAME}[UDFWidgetTpl::LABEL]))
|
|
{
|
|
?>
|
|
<label for="<?php echo ${Widget::HTML_ARG_NAME}[Widget::HTML_ID]; ?>">
|
|
<?php echo ${Widget::HTML_ARG_NAME}[UDFWidgetTpl::LABEL]; ?>
|
|
</label>
|
|
<?php
|
|
}
|
|
?>
|
|
<fieldset
|
|
<?php Widget::printAttribute(${Widget::HTML_ARG_NAME}, Widget::HTML_ID); ?>
|
|
<?php Widget::printAttribute(${Widget::HTML_ARG_NAME}, UDFWidgetTpl::REQUIRED); ?>
|
|
<?php Widget::printAttribute(${Widget::HTML_ARG_NAME}, UDFWidgetTpl::REGEX); ?>
|
|
<?php Widget::printAttribute(${Widget::HTML_ARG_NAME}, UDFWidgetTpl::TITLE); ?>
|
|
>
|
|
<?php
|
|
$elements = ${CheckboxWidget::WIDGET_DATA_ELEMENTS_ARRAY_NAME};
|
|
$checkedElement = ${CheckboxWidget::CHECKED_ELEMENT};
|
|
|
|
foreach($elements as $element)
|
|
{
|
|
$checked = '';
|
|
|
|
if ($element->{CheckboxWidget::VALUE_FIELD} == $checkedElement)
|
|
{
|
|
$checked = 'checked';
|
|
}
|
|
?>
|
|
<input
|
|
type="checkbox"
|
|
<?php Widget::printAttribute(${Widget::HTML_ARG_NAME}, Widget::HTML_NAME); ?>
|
|
value="<?php echo $element->{CheckboxWidget::VALUE_FIELD}; ?>"
|
|
<?php echo $checked; ?>
|
|
>
|
|
<?php echo $element->{CheckboxWidget::DESCRIPTION_FIELD}; ?>
|
|
<?php
|
|
}
|
|
?>
|
|
</fieldset>
|
|
<?php Widget::printEndBlock(${Widget::HTML_ARG_NAME}); ?>
|