This commit is contained in:
2023-11-15 23:20:58 +03:00
parent a0c185aeda
commit 747f52cace
4 changed files with 94 additions and 0 deletions
+18
View File
@@ -0,0 +1,18 @@
<?php
/**
* @var \Wt\Core\Templater\Shell $this
* @var \Wt\Core\Form\Field\DefaultField $field
*/
use Wt\Core\Templater\Tools;
$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';
?><input <?=Tools::getAttrByArray($inputAttributes)?>><?
echo "\n\r";