mirror of
https://bitbucket.org/bellord13/kit.git
synced 2026-11-13 19:06:11 +03:00
28 lines
1.2 KiB
PHP
28 lines
1.2 KiB
PHP
<?php
|
|
/**
|
|
* @var \Wt\Core\Templater\Shell $this
|
|
* @var \Wt\Core\Form\Field\DefaultField $field
|
|
*/
|
|
|
|
use Bitrix\Main\Page\Asset;
|
|
use Wt\Core\Templater\Tools;
|
|
\Bitrix\Main\Loader::includeModule('iblock');
|
|
require_once($_SERVER["DOCUMENT_ROOT"]."/bitrix/modules/iblock/prolog.php");
|
|
Bitrix\Main\Page\Asset::getInstance()->addJs('/bitrix/js/iblock/iblock_edit.js');
|
|
Asset::getInstance()->addJs("/bitrix/js/main/core/core.js");
|
|
\Bitrix\Main\UI\Extension::load(array("popup", "ajax", "ui.buttons", "ui.forms", "main.polyfill.core", "color_picker"));
|
|
$bLabel = mb_strlen($field->getLabel());
|
|
$labelAttrs = [];
|
|
if(mb_strlen($field->getId())){
|
|
$labelAttrs['for'] = $field->getId();
|
|
}
|
|
if($bLabel){?><label <?=Tools::getAttrByArray($labelAttrs)?>><?=$field->getLabel()?></label><?}
|
|
$inputAttributes = $field->getAttributes();
|
|
$inputAttributes['data-dirty'] = $field->isDirty()?'true':'false';
|
|
if($field->isMultiple()){
|
|
$inputAttributes['name'] = preg_replace('/\[]$/', '', $inputAttributes['name']) . '[]';
|
|
}
|
|
unset($inputAttributes['options']);
|
|
|
|
_ShowPropertyField($field->getName(), $field->getPropertyEntity()->getRaw(), [], false, false, 50000, $field->getForm()->getName(), false);
|
|
echo "\n\r";
|