Commit 29aa78a7 authored by Nikolay Krasinsky's avatar Nikolay Krasinsky

Modify methods for printing fields for forms (do no show in test-drive)

parent 8ca86867
......@@ -99,7 +99,7 @@ class CDFAIblockFormTemplateTools
* @param bool $bFromForm
* @param bool $addAttr - массив дополнительных атрибутов, array(название => значение)
*/
public static function printField(array $arIblockField, $value, $bFromForm=false, $addAttr = false)
public static function printField(array $arIblockField, $value, $bFromForm=false, $addAttr = false, $moreFilter = false)
{
$obIblockField = new CDFAIblockFormField($arIblockField, 'PROPERTY['.$arIblockField["ID"].']', $value);
if (is_array($addAttr) && !empty($addAttr)) {
......@@ -108,7 +108,12 @@ class CDFAIblockFormTemplateTools
$strAddAttr .= ' '.$attrName.'="'.$attrVal.'"';
}
$strAddAttr .= ' id';
echo str_replace('id', $strAddAttr, $obIblockField->getInputField($bFromForm));
if ($moreFilter) {
$echoStr = $obIblockField->getInputField($bFromForm, true, $moreFilter);
} else {
$echoStr = $obIblockField->getInputField($bFromForm);
}
echo str_replace('id', $strAddAttr, $echoStr);
} else {
echo $obIblockField->getInputField($bFromForm);
}
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment