ez-pro/s1/include/blocks/consent/bxconsent.php
2025-11-13 19:04:05 +03:00

33 lines
882 B
PHP

<?php
if (!defined('B_PROLOG_INCLUDED') || B_PROLOG_INCLUDED !== true) {
exit;
}
// options from TSolution\Functions::showBlockHtml
$arOptions = $arConfig['PARAMS'];
if (!$arOptions['OPTION_CODE']) {
return;
}
$APPLICATION->IncludeComponent(
'bitrix:main.userconsent.request',
'main',
[
'AUTO_SAVE' => 'Y',
'COMPOSITE_FRAME_MODE' => 'A',
'COMPOSITE_FRAME_TYPE' => 'AUTO',
'ID' => TSolution\Utils::getAgreementIdByOption($arOptions['OPTION_CODE']),
'IS_CHECKED' => TSolution::GetFrontParametrValue('LICENCE_CHECKED'),
'IS_LOADED' => 'N',
'INPUT_NAME' => $arOptions['INPUT_NAME'] ?? 'licence',
'REPLACE' => [
'button_caption' => $arOptions['SUBMIT_TEXT'] ?? 'Send',
'fields' => $arOptions['REPLACE_FIELDS'] ?? [],
],
],
false,
['HIDE_ICONS' => 'Y']
);