11 $fileDialogs =
array();
18 $APPLICATION->AddHeadScript(
'/bitrix/js/fileman/comp_params_manager/component_params_manager.js');
19 $APPLICATION->SetAdditionalCss(
'/bitrix/js/fileman/comp_params_manager/component_params_manager.css');
21 if (!isset(
$config[
'requestUrl']))
23 $config[
'requestUrl'] =
'/bitrix/admin/fileman_component_params.php';
28 $config[
'id'] =
'bx_comp_params_manager_'.mb_substr(uniqid(mt_rand(),
true), 0, 4);
34 BX.message(<?=CUtil::PhpToJSObject($mess_lang,
false);?>);
35 if (window.BXComponentParamsManager)
37 window.oBXComponentParamsManager =
new BXComponentParamsManager(<?=CUtil::PhpToJSObject(
$config)?>);
41 window.oBXComponentParamsManager =
new top.BXComponentParamsManager(<?=CUtil::PhpToJSObject(
$config)?>);
43 top.oBXComponentParamsManager = window.oBXComponentParamsManager;
49 "bitrix:main.colorpicker",
51 Array(
"SHOW_BUTTON" =>
"N"),
58 if (isset(
$_REQUEST[
'component_params_manager']))
60 $reqId = intval(
$_REQUEST[
'component_params_manager']);
62 'component_name' =>
$_REQUEST[
'component_name'] ??
null,
63 'component_template' =>
$_REQUEST[
'component_template'] ??
null,
64 'site_template' =>
$_REQUEST[
'site_template'] ??
null,
65 'current_values' =>
$_REQUEST[
'current_values'] ??
null,
68 $requestData[
'component_name'],
69 $requestData[
'component_template'],
70 $requestData[
'site_template'],
71 $requestData[
'current_values']
74 $templateMatch =
false;
78 $result[
'templates'][
$i][
'NAME'] == $requestData[
'component_template']
79 || ($requestData[
'component_template'] ==
'' &&
$result[
'templates'][
$i][
'NAME'] ==
'.default')
82 $templateMatch =
true;
86 if (!$templateMatch &&
$l > 0)
89 $requestData[
'component_name'],
90 $result[
'templates'][0][
'NAME'],
91 $requestData[
'site_template'],
92 $requestData[
'current_values']
99 window.__bxResult[
'<?= $reqId?>'] = <?=CUtil::PhpToJSObject(
$result)?>;
112 'templates' =>
array()
116 if(!empty($siteTemplate))
119 while($siteTempl = $dbst->Fetch())
120 $arSiteTemplates[$siteTempl[
'ID']] = $siteTempl[
'NAME'];
123 foreach($arTemplates as
$k => $templ)
125 $showTemplateName = ($templ[
"TEMPLATE"] !==
'' && $arSiteTemplates[$templ[
"TEMPLATE"]] <>
'') ? $arSiteTemplates[$templ[
"TEMPLATE"]] :
GetMessage(
"PAR_MAN_DEF_TEMPLATE");
126 $arTemplates[
$k][
'DISPLAY_NAME'] = $templ[
'NAME'].
' ('.$showTemplateName.
')';
129 $arTemplateProps =
array();
130 if (is_array($arTemplates))
148 if (!isset($arProps[
'GROUPS']) || !is_array($arProps[
'GROUPS']))
150 $arProps[
'GROUPS'] =
array();
152 if (!isset($arProps[
'PARAMETERS']) || !is_array($arProps[
'PARAMETERS']))
154 $arProps[
'PARAMETERS'] =
array();
158 foreach ($arProps[
'GROUPS'] as
$k => $arGroup)
161 $result[
'groups'][] = $arGroup;
164 foreach ($arProps[
'PARAMETERS'] as
$k => $arParam)
166 $arParam[
'ID'] = preg_replace(
"/[^a-zA-Z0-9_-]/is",
"_",
$k);
167 if (!isset($arParam[
'PARENT']))
169 $arParam[
'PARENT'] =
'ADDITIONAL_SETTINGS';
171 $result[
'parameters'][] = $arParam;
173 if (($arParam[
'TYPE'] ??
null) ==
'FILE')
175 self::$fileDialogs[] =
array(
176 'NAME' => $arParam[
'ID'],
177 'TARGET' => isset($arParam[
'FD_TARGET']) ? $arParam[
'FD_TARGET'] :
'F',
178 'EXT' => isset($arParam[
'FD_EXT']) ? $arParam[
'FD_EXT'] :
'',
179 'UPLOAD' => isset($arParam[
'FD_UPLOAD']) && $arParam[
'FD_UPLOAD'] && $arParam[
'FD_TARGET'] ==
'F',
180 'USE_ML' => isset($arParam[
'FD_USE_MEDIALIB']) && $arParam[
'FD_USE_MEDIALIB'],
181 'ONLY_ML' => isset($arParam[
'FD_USE_ONLY_MEDIALIB']) && $arParam[
'FD_USE_ONLY_MEDIALIB'],
182 'ML_TYPES' => isset($arParam[
'FD_MEDIALIB_TYPES']) ? $arParam[
'FD_MEDIALIB_TYPES'] :
false
187 if (!isset(
$result[
'tooltips'][$arParam[
'ID'].
'_TIP']))
192 $result[
'tooltips'][$arParam[
'ID'].
'_TIP'] = $tip;
203 $cName = str_replace(
":",
"/", $cName);
204 $lang =
$lang ? preg_replace(
"/[^a-zA-Z0-9_]/is",
"",
$lang) : LANGUAGE_ID;
205 $filePath =
"/bitrix/components/".$cName;
207 $arTooltips =
array();
210 if (
$lang !=
"en" &&
$lang !=
"ru" && file_exists($fname))
216 if (file_exists($fname))
227 'CompParManSelectOther' =>
GetMessage(
'PAR_MAN_SELECT_OTHER'),
228 'CompParManNoValue' =>
GetMessage(
'PAR_MAN_SELECT_NO_VALUE'),
229 'CompParManSearch' =>
GetMessage(
'PAR_MAN_SEARCH'),
230 'NoSearchResults' =>
GetMessage(
'PAR_MAN_NO_SEARCH_RESULTS'),
231 'TemplateGroup' =>
GetMessage(
'PAR_MAN_TEMPLATE_GROUP'),
232 'DefTemplate' =>
GetMessage(
'PAR_MAN_DEF_TEMPLATE')
241 $fd = self::$fileDialogs[
$i];
244 $MLRes = CMedialib::ShowBrowseButton(
246 'mode' => $fd[
'ONLY_ML'] ?
'medialib' :
'select',
248 'event' =>
"BX_FD_".$fd[
'NAME'],
249 'id' =>
"bx_fd_input_".mb_strtolower($fd[
'NAME']),
250 'MedialibConfig' =>
array(
251 "event" =>
"bx_ml_event_".$fd[
'NAME'],
252 "arResultDest" => Array(
"FUNCTION_NAME" =>
"BX_FD_ONRESULT_".$fd[
'NAME']),
253 "types" => $fd[
'ML_TYPES']
255 'bReturnResult' =>
true
258 ?><script>window._bxMlBrowseButton_<?= mb_strtolower($fd[
'NAME'])?> =
'<?= CUtil::JSEscape($MLRes)?>';</script><?
263 "event" =>
"BX_FD_".$fd[
'NAME'],
264 "arResultDest" => Array(
"FUNCTION_NAME" =>
"BX_FD_ONRESULT_".$fd[
'NAME']),
266 "select" => $fd[
'TARGET'],
268 "showUploadTab" => $fd[
'UPLOAD'],
269 "showAddToMenuTab" =>
false,
270 "fileFilter" => $fd[
'EXT'],
271 "allowAllFiles" =>
true,
static ShowScript($arConfig)
static DisplayFileDialogsScripts()
static Init($config=array())
static FetchHelp($componentName, $lang=false)
static GetComponentProperties($name='', $template='', $siteTemplate='', $currentValues=array())
static GetTemplateProps($componentName, $templateName, $siteTemplate="", $arCurrentValues=array())
static GetComponentDescr($componentName)
static GetTemplatesList($componentName, $currentTemplate=false)
static GetComponentProps($componentName, $arCurrentValues=array(), $templateProperties=array())
static GetList($arOrder=array(), $arFilter=array(), $arSelect=false)
</td ></tr ></table ></td ></tr >< tr >< td class="bx-popup-label bx-width30"><?=GetMessage("PAGE_NEW_TAGS")?> array( $site)
bx_acc_lim_group_list limitGroupList[] multiple<?=$group[ 'ID']?> ID selected margin top
if($request->isPost() && $currentAction !==null &&check_bitrix_sessid()) $currentValues
$_SERVER["DOCUMENT_ROOT"]
if(!defined('SITE_ID')) $lang
IncludeModuleLangFile($filepath, $lang=false, $bReturnArray=false)
GetMessage($name, $aReplace=null)
__IncludeLang($path, $bReturnArray=false, $bFileChecked=false)
</p ></td >< td valign=top style='border-top:none;border-left:none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;padding:0cm 2.0pt 0cm 2.0pt;height:9.0pt'>< p class=Normal align=center style='margin:0cm;margin-bottom:.0001pt;text-align:center;line-height:normal'>< a name=ТекстовоеПоле54 ></a ><?=($taxRate > count( $arTaxList) > 0) ? $taxRate."%"