mirror of
https://github.com/FH-Complete/FHC-Core.git
synced 2026-06-01 20:29:29 +00:00
9c84558f5f
- Removed the private method _isAllowed from application/controllers/widgets/UDF.php - Removed required permissions from views application/views/system/fas_udf.php and application/views/system/infocenter/zgvpruefungen.php - Widget views application/views/widgets/checkbox, dropdown, textarea and textfield now they print the attribute disabled - Added constant DISABLED to application/widgets/html/HTMLWidget.php - Removed private property _requiredPermissions from application/widgets/udf/UDFWidget.php - application/widgets/udf/UDFWidget.php does not check permissions anymore and does not store them anymore - Added constants PERMISSION_TYPE_READ and PERMISSION_TYPE_WRITE to application/libraries/UDFLib.php - Removed constant PERMISSION_TYPE from application/libraries/UDFLib.php - Removed public method isAllowed from application/libraries/UDFLib.php - Added private methods _readAllowed, _writeAllowed, _setRequiredPermissions and _setReadOnly to application/libraries/UDFLib.php - UDFLib->displayUDFWidget now checks if permissions are declared in the UDF JSON and if the user is allowed to read and write such UDF - UDFLib->saveUDFs now checks if the user has the permissions to write such UDF - Now the UDFs are even displayed in read only mode
44 lines
1.4 KiB
PHP
44 lines
1.4 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-label valign-middle width-150px">
|
|
<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-data width-30px">
|
|
<input
|
|
type="checkbox"
|
|
<?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}, HTMLWidget::REQUIRED); ?>
|
|
<?php HTMLWidget::printAttribute(${HTMLWidget::HTML_ARG_NAME}, HTMLWidget::TITLE); ?>
|
|
<?php HTMLWidget::printAttribute(${HTMLWidget::HTML_ARG_NAME}, HTMLWidget::DISABLED, false); ?>
|
|
<?php
|
|
$checked = '';
|
|
if (${CheckboxWidget::VALUE_FIELD} === true)
|
|
{
|
|
$checked = 'checked';
|
|
}
|
|
?>
|
|
<?php echo $checked; ?>
|
|
value="<?php echo CheckboxWidget::CHECKBOX_VALUE; ?>"
|
|
>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
|
|
<?php HTMLWidget::printEndBlock(${HTMLWidget::HTML_ARG_NAME}); ?>
|
|
|