mirror of
https://github.com/FH-Complete/FHC-Core.git
synced 2026-06-02 20:59:28 +00:00
e4160088e8
- 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
40 lines
1.8 KiB
PHP
40 lines
1.8 KiB
PHP
<?php HTMLWidget::printStartBlock(${HTMLWidget::HTML_ARG_NAME}); ?>
|
|
|
|
<div class="div-table">
|
|
<div class="div-row">
|
|
<?php
|
|
if (isset(${HTMLWidget::HTML_ARG_NAME}[HTMLWidget::LABEL]))
|
|
{
|
|
?>
|
|
<div class="div-cell width-150px valign-middle">
|
|
<label
|
|
for="<?php echo ${HTMLWidget::HTML_ARG_NAME}[HTMLWidget::HTML_ID]; ?>"
|
|
<?php HTMLWidget::printAttribute(${HTMLWidget::HTML_ARG_NAME}, HTMLWidget::REQUIRED); ?>
|
|
>
|
|
<?php echo ${HTMLWidget::HTML_ARG_NAME}[HTMLWidget::LABEL]; ?>
|
|
</label>
|
|
</div>
|
|
<?php
|
|
}
|
|
?>
|
|
<div class="div-cell width-150px">
|
|
<input
|
|
type="text"
|
|
<?php HTMLWidget::printAttribute(${HTMLWidget::HTML_ARG_NAME}, HTMLWidget::HTML_ID); ?>
|
|
<?php HTMLWidget::printAttribute(${HTMLWidget::HTML_ARG_NAME}, HTMLWidget::HTML_NAME); ?>
|
|
<?php HTMLWidget::printAttribute(${HTMLWidget::HTML_ARG_NAME}, TextfieldWidget::SIZE); ?>
|
|
<?php HTMLWidget::printAttribute(${HTMLWidget::HTML_ARG_NAME}, HTMLWidget::PLACEHOLDER); ?>
|
|
<?php HTMLWidget::printAttribute(${HTMLWidget::HTML_ARG_NAME}, HTMLWidget::REQUIRED); ?>
|
|
<?php HTMLWidget::printAttribute(${HTMLWidget::HTML_ARG_NAME}, HTMLWidget::MIN_VALUE); ?>
|
|
<?php HTMLWidget::printAttribute(${HTMLWidget::HTML_ARG_NAME}, HTMLWidget::MAX_VALUE); ?>
|
|
<?php HTMLWidget::printAttribute(${HTMLWidget::HTML_ARG_NAME}, HTMLWidget::MIN_LENGTH); ?>
|
|
<?php HTMLWidget::printAttribute(${HTMLWidget::HTML_ARG_NAME}, HTMLWidget::MAX_LENGTH); ?>
|
|
<?php HTMLWidget::printAttribute(${HTMLWidget::HTML_ARG_NAME}, HTMLWidget::REGEX); ?>
|
|
<?php HTMLWidget::printAttribute(${HTMLWidget::HTML_ARG_NAME}, HTMLWidget::TITLE); ?>
|
|
value="<?php echo ${TextfieldWidget::VALUE}; ?>"
|
|
>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
|
|
<?php HTMLWidget::printEndBlock(${HTMLWidget::HTML_ARG_NAME}); ?>
|