input.uikit.php
Поле «Редактор блоков»
Вызывается из:
Смотрите описание Cms\Root\Form\Field\Base
Исходный код
<?php
print '<div class="gjs" id="' . $Field->id('-uikit') . '"></div>';
if ($Field->name) {
$attributes = $Field->getInputAttributes(array(
'type' => 'hidden',
'name' => $Field->name,
'data-placeholder' => strval($Field->placeholder) !== '' ? htmlspecialchars($Field->placeholder) : null,
'data-required' => $Field->required ? 'Y' : null,
'data-readonly' => $Field->readonly ? 'Y' : null,
'data-disabled' => $Field->disabled ? 'Y' : null,
'value' => $Field->v(),
'id' => $Field->id('-input'),
));
print '<input';
foreach ($attributes as $attributeName => $attributeValue) if ($attributeValue !== null) print ' ' . $attributeName . '="' . $attributeValue . '"';
print '>';
}
?>
<script>
cmsRequire(['form/script/input.uikit'], init => init(document.getElementById(<?=$Field->jId('-input')?>), { el: document.getElementById(<?=$Field->jId('-uikit')?>) }));
</script>