1C-Bitrix
25.700.0
Загрузка...
Поиск...
Не найдено
admin_tabcontrol.php
См. документацию.
1
<?php
8
9
use
Bitrix\Main\Web\Uri
;
10
use
Bitrix\Main\Web\Json
;
11
12
/*Tab Control*/
13
class
CAdminTabControl
14
{
15
var
$name
,
$unique_name
;
16
var
$tabs
=
array
();
17
var
$selectedTab
;
18
var
$tabIndex
= 0;
19
var
$bButtons
=
false
;
20
var
$arButtonsParams
= [];
21
var
$bCanExpand
;
22
var
$bPublicModeBuffer
=
false
;
23
var
$bShowSettings
=
false
;
24
var
$publicModeBuffer_id
;
25
27
var
$customTabber
;
28
29
var
$bPublicMode
=
false
;
30
var
$isPublicFrame
=
false
;
31
var
$publicObject
=
'BX.WindowManager.Get()'
;
32
33
var
$AUTOSAVE
=
null
;
34
protected
$tabEvent
=
false
;
35
36
var
$isSidePanel
=
false
;
37
var
$publicSidePanel
=
false
;
38
var
$isShownSidePanelFields
=
false
;
39
40
public
function
__construct
(
$name
,
$tabs
,
$bCanExpand
=
true
, $bDenyAutoSave =
false
)
41
{
43
global
$APPLICATION
;
44
45
//array(array("DIV"=>"", "TAB"=>"", "ICON"=>, "TITLE"=>"", "ONSELECT"=>"javascript"), ...)
46
if
(is_array(
$tabs
))
47
{
48
$this->tabs =
$tabs
;
49
}
50
$this->name =
$name
;
51
$this->unique_name =
$name
.
"_"
.md5(
$APPLICATION
->GetCurPage());
52
53
global
$adminSidePanelHelper
;
54
$this->publicSidePanel = (is_object(
$adminSidePanelHelper
) &&
$adminSidePanelHelper
->isPublicSidePanel());
55
$this->bPublicMode = defined(
'BX_PUBLIC_MODE'
) &&
BX_PUBLIC_MODE
== 1;
56
$this->bCanExpand = !$this->bPublicMode && (bool)
$bCanExpand
;
57
58
$this->
SetSelectedTab
();
59
60
if
(!$bDenyAutoSave &&
CAutoSave::Allowed
())
61
{
62
$this->AUTOSAVE =
new
CAutoSave
();
63
}
64
65
$this->isSidePanel = ((isset(
$_REQUEST
[
"IFRAME"
]) &&
$_REQUEST
[
"IFRAME"
] ===
"Y"
) &&
66
isset(
$_REQUEST
[
"IFRAME_TYPE"
]) &&
$_REQUEST
[
"IFRAME_TYPE"
] ===
"SIDE_SLIDER"
);
67
$this->isPublicFrame = $this->isSidePanel && (isset(
$_REQUEST
[
"IFRAME_TYPE"
]) &&
68
$_REQUEST
[
"IFRAME_TYPE"
] ===
"PUBLIC_FRAME"
);
69
}
70
71
function
SetPublicMode
($jsObject =
false
)
72
{
73
$this->bPublicMode =
true
;
74
$this->bShowSettings =
false
;
75
$this->bCanExpand =
false
;
76
$this->bPublicModeBuffer =
true
;
77
78
if
($jsObject)
79
$this->publicObject = $jsObject;
80
}
81
85
function
AddTabs
(&
$customTabber
)
86
{
87
if
(!$this->customTabber)
88
{
89
$this->customTabber =
$customTabber
;
90
91
$arCustomTabs = $this->customTabber->GetTabs();
92
if
($arCustomTabs && is_array($arCustomTabs))
93
{
94
$arTabs =
array
();
95
$i
= 0;
96
foreach
($this->tabs as $value)
97
{
98
foreach
($arCustomTabs as $key1 => $value1)
99
{
100
if
(array_key_exists(
"SORT"
, $value1) && intval($value1[
"SORT"
]) ==
$i
)
101
{
102
$arTabs[] = array_merge($value1,
array
(
"CUSTOM"
=>
"Y"
));
103
unset($arCustomTabs[$key1]);
104
}
105
}
106
107
$arTabs[] = $value;
108
$i
++;
109
}
110
111
foreach
($arCustomTabs as $value1)
112
$arTabs[] = array_merge($value1,
array
(
"CUSTOM"
=>
"Y"
));
113
114
$this->tabs = $arTabs;
115
$this->
SetSelectedTab
();
116
}
117
}
118
}
119
120
function
OnAdminTabControlBegin
()
121
{
122
if
(!$this->tabEvent)
123
{
124
foreach
(
GetModuleEvents
(
"main"
,
"OnAdminTabControlBegin"
,
true
) as $arEvent)
125
ExecuteModuleEventEx
($arEvent,
array
(&$this));
126
$this->tabEvent =
true
;
127
}
128
}
129
130
function
SetSelectedTab
()
131
{
132
$this->selectedTab = $this->tabs[0][
"DIV"
];
133
if
(isset(
$_REQUEST
[$this->name.
"_active_tab"
]))
134
{
135
foreach($this->tabs as $tab)
136
{
137
if($tab[
"DIV"
] == $_REQUEST[$this->name.
"_active_tab"
])
138
{
139
$this->selectedTab = $_REQUEST[$this->name.
"_active_tab"
];
140
break;
141
}
142
}
143
}
144
}
145
146
function
Begin
()
147
{
148
$hkInst = CHotKeys::getInstance();
149
150
$this->
OnAdminTabControlBegin
();
151
$this->tabIndex = 0;
152
153
$this->
SetSelectedTab
();
154
155
if
(!$this->bPublicMode)
156
{
157
?>
158
<div
class
=
"adm-detail-block"
id
=
"<?=$this->name?>_layout"
>
159
<div
class
=
"adm-detail-tabs-block<?=$this->bShowSettings?' adm-detail-tabs-block-settings':''?>"
id
=
"<?=$this->name?>_tabs"
>
160
<?
161
}
162
163
$len =
count
($this->tabs);
164
$tabs_html =
''
;
165
foreach
($this->tabs as
$key
=> $tab)
166
{
167
$bSelected = ($tab[
"DIV"
] == $this->selectedTab);
168
$tabs_html .=
'<span title="'
.($tab[
"TITLE"
] ??
''
).$hkInst->GetTitle(
"tab-container"
).
'" '
.
169
'id="tab_cont_'
.$tab[
"DIV"
].
'" '
.
170
'class="adm-detail-tab'
.($bSelected ?
' adm-detail-tab-active'
:
''
).(
$key
==$len-1?
' adm-detail-tab-last'
:
''
).
'" '
.
171
'onclick="'
.$this->name.
'.SelectTab(\''
.$tab[
"DIV"
].
'\'
);
">'.htmlspecialcharsex($tab["
TAB
"]).'</span>';
172
}
173
174
$tabs_html .= $this->ShowTabButtons();
175
176
if (!$this->bPublicMode)
177
{
178
echo $tabs_html;
179
?>
180
</div>
181
<div class="
adm-detail-content-wrap
">
182
<?
183
}
184
else
185
{
186
echo '
187
<script>
188
'.$this->publicObject.'.SetHead(\''.CUtil::JSEscape($tabs_html).'\');
189
';
190
if ($this->AUTOSAVE)
191
{
192
echo '
193
'.$this->publicObject.'.setAutosave();
194
';
195
}
196
echo '
197
</script>
198
';
199
if ($this->bPublicModeBuffer)
200
{
201
$this->publicModeBuffer_id = 'bx_tab_control_'.RandString(6);
202
echo '<div id="
'.$this->publicModeBuffer_id.'
" style="
display
: none;
">';
203
}
204
}
205
}
206
207
function ShowTabButtons()
208
{
209
$s = '';
210
if (!$this->bPublicMode)
211
{
212
if(count($this->tabs) > 1 && $this->bCanExpand/* || $this->AUTOSAVE*/)
213
{
214
$s .= '<div class="
adm-detail-
title
-setting
" onclick="
'.$this->name.'
.ToggleTabs();
" title="
'.GetMessage("admin_lib_expand_tabs").'
" id="
'.$this->name.'
_expand_link
"><span class="
adm-detail-
title
-setting-btn adm-detail-
title
-expand
"></span></div>';
215
}
216
}
217
return $s;
218
}
219
220
function BeginNextTab($options = array())
221
{
222
if ($this->AUTOSAVE)
223
$this->AUTOSAVE->Init();
224
225
//end previous tab
226
$this->EndTab();
227
228
if($this->tabIndex >= count($this->tabs))
229
return;
230
231
$css = '';
232
if ($this->tabs[$this->tabIndex]["
DIV
"] <> $this->selectedTab)
233
$css .= 'display:none; ';
234
235
echo '<div class="
adm-detail-content
'.(isset($options["className"]) ? " ".$options["className"] : "").'
"
236
id="
'.$this->tabs[$this->tabIndex]["DIV"].'
"'.($css != '' ? ' style="
'.$css.'
"' : '').'>';
237
238
/*if($this->tabs[$this->tabIndex]["
ICON
"] <> "
")
239
echo '
240
<td class="
icon
"><div id="
'.$this->tabs[$this->tabIndex]["ICON"].'
"></div></td>
241
';*/
242
243
if (!isset($options["
showTitle
"]) || $options["
showTitle
"] === true)
244
{
245
echo '<div class="
adm-detail-
title
">'.($this->tabs[$this->tabIndex]["
TITLE
"] ?? '').'</div>';
246
}
247
248
echo '
249
<div class="
adm-detail-content-item-block
">
250
<table class="
adm-detail-content-table edit-table
" id="
'.$this->tabs[$this->tabIndex]["DIV"].'
_edit_table
">
251
<tbody>
252
';
253
if(array_key_exists("
CUSTOM
", $this->tabs[$this->tabIndex]) && $this->tabs[$this->tabIndex]["
CUSTOM
"] == "
Y
")
254
{
255
$this->customTabber->ShowTab($this->tabs[$this->tabIndex]["
DIV
"]);
256
$this->tabIndex++;
257
$this->BeginNextTab();
258
}
259
elseif(array_key_exists("
CONTENT
", $this->tabs[$this->tabIndex]))
260
{
261
echo $this->tabs[$this->tabIndex]["
CONTENT
"];
262
$this->tabIndex++;
263
$this->BeginNextTab();
264
}
265
else
266
{
267
$this->tabIndex++;
268
}
269
}
270
271
function EndTab()
272
{
273
if(
274
$this->tabIndex < 1
275
|| $this->tabIndex > count($this->tabs)
276
|| isset($this->tabs[$this->tabIndex-1]["
_closed
"]) && $this->tabs[$this->tabIndex-1]["
_closed
"] === true
277
)
278
{
279
return;
280
}
281
282
echo '
283
</tbody>
284
</table>
285
</div>
286
</div>
287
';
288
289
$this->tabs[$this->tabIndex-1]["
_closed
"] = true;
290
}
291
295
function Buttons($aParams=false)
296
{
297
$hkInst = CHotKeys::getInstance();
298
299
while($this->tabIndex < count($this->tabs))
300
$this->BeginNextTab();
301
302
$this->bButtons = true;
303
if($aParams === false)
304
$this->arButtonsParams = [];
305
else
306
$this->arButtonsParams = $aParams;
307
308
//end previous tab
309
$this->EndTab();
310
311
if (!$this->bPublicMode)
312
{
313
echo '<div class="adm-detail-content-btns-wrap
" id="
'.$this->name.'
_buttons_div
"><div class="
adm-detail-content-btns
">';
314
}
315
316
if (isset($_REQUEST['subdialog']) && $_REQUEST['subdialog'])
317
{
318
echo '<input type="
hidden
" name="
suffix
" value="
'.mb_substr($GLOBALS['
obJSPopup
']->suffix, 1).'
" />';
319
echo '<input type="
hidden
" name="
subdialog
" value="
Y
" />';
320
}
321
322
if($aParams !== false)
323
{
324
$aParams["
ajaxMode
"] = ($aParams["
ajaxMode
"] ?? true);
325
326
if (!$this->isShownSidePanelFields)
327
{
328
$this->getSidePanelFields();
329
}
330
331
if ($this->bPublicMode)
332
{
333
if(isset($_REQUEST['from_module']) && $_REQUEST['from_module'] <> '')
334
{
335
echo '<input type="
hidden
" name="
from_module
" value="
'.htmlspecialcharsbx($_REQUEST['
from_module
']).'
" />';
336
}
337
338
if (isset($aParams['buttons']) && is_array($aParams['buttons']))
339
{
340
echo '
341
<input type="
hidden
" name="
bxpublic
" value="
Y
" />
342
<script>'.$this->publicObject.'.SetButtons(' . Json::encode($aParams['buttons']) . ');</script>
343
';
344
}
345
else
346
{
347
echo '
348
<input type="
hidden
" name="
bxpublic
" value="
Y
" /><input type="
hidden
" name="
save
" value="
Y
" />
349
<script>'.$this->publicObject.'.SetButtons(['.$this->publicObject.'.btnSave, '.$this->publicObject.'.btnCancel]);</script>
350
';
351
}
352
}
353
elseif($this->isSidePanel && $aParams["
ajaxMode
"])
354
{
355
$this->getAjaxButtons($aParams);
356
}
357
else
358
{
359
$aParams['btnSave'] = $aParams['btnSave'] ?? true;
360
$aParams['btnApply'] = $aParams['btnApply'] ?? true;
361
$aParams['btnCancel'] = $aParams['btnCancel'] ?? true;
362
$aParams['btnSaveAndAdd'] = $aParams['btnSaveAndAdd'] ?? false;
363
364
$disable = isset($aParams['disabled']) && $aParams['disabled'] === true
365
? ' disabled data-btn-disabled="
Y
"'
366
: ''
367
;
368
369
if($aParams["
btnSave
"] !== false)
370
{
371
echo '<input' . $disable .' type="
submit
" name="
save
" value="
'.GetMessage("admin_lib_edit_save").'
" title="
'.GetMessage("admin_lib_edit_save_title").$hkInst->GetTitle("Edit_Save_Button").'
" class="
adm-btn-save
" />';
372
echo $hkInst->PrintJSExecs($hkInst->GetCodeByClassName("
Edit_Save_Button
"));
373
}
374
if($aParams["
btnApply
"] !== false)
375
{
376
echo '<input' . $disable .' type="
submit
" name="
apply
" value="
'.GetMessage("admin_lib_edit_apply").'
" title="
'.GetMessage("admin_lib_edit_apply_title").$hkInst->GetTitle("Edit_Apply_Button").'
" />';
377
echo $hkInst->PrintJSExecs($hkInst->GetCodeByClassName("
Edit_Apply_Button
"));
378
}
379
if($aParams["
btnCancel
"] !== false && !empty($aParams["
back_url
"]) && !preg_match('/(javascript|data)[\s\0-\13]*:/i', $aParams["
back_url
"]))
380
{
381
echo '<input' . $disable . ' type="
button
" value="
'.GetMessage("admin_lib_edit_cancel").'
" name="
cancel
" onClick="
top
.window.location=\
''
.htmlspecialcharsbx(CUtil::addslashes($aParams[
"back_url"
])).
'\'
" title="
'.GetMessage("admin_lib_edit_cancel_title").$hkInst->GetTitle("Edit_Cancel_Button").'
" />';
382
echo $hkInst->PrintJSExecs($hkInst->GetCodeByClassName("
Edit_Cancel_Button
"));
383
}
384
if($aParams["
btnSaveAndAdd
"] === true)
385
{
386
echo '<input' . $disable . ' type="
submit
" name="
save_and_add
" value="
'.GetMessage("admin_lib_edit_save_and_add").'
" title="
'.GetMessage("admin_lib_edit_save_and_add_title").$hkInst->GetTitle("Edit_Save_And_Add_Button").'
" class="
adm-btn-add
" />';
387
echo $hkInst->PrintJSExecs($hkInst->GetCodeByClassName("
Edit_Save_And_Add_Button
"));
388
}
389
}
390
}
391
}
392
393
protected function getAjaxButtons(array $params)
394
{
395
$htmlAjaxButtons = '';
396
397
$params['btnSave'] = $params['btnSave'] ?? true;
398
$params['btnApply'] = $params['btnApply'] ?? true;
399
$params['btnCancel'] = $params['btnCancel'] ?? true;
400
$params['btnSaveAndAdd'] = $params['btnSaveAndAdd'] ?? false;
401
402
$disable = isset($params['disabled']) && $params['disabled'] === true
403
? ' disabled data-btn-disabled="
Y
"'
404
: ''
405
;
406
407
if ($params["
btnSave
"] !== false)
408
{
409
$htmlAjaxButtons .= '<input' . $disable . ' type="
button
" name="
save
" value="
' . GetMessage("admin_lib_edit_save").'
" title="
'.GetMessage("admin_lib_edit_save_title").'
" class="
adm-btn-save
">';
410
}
411
if ($params["
btnApply
"] !== false)
412
{
413
$htmlAjaxButtons .= '<input' . $disable . ' type="
button
" name="
apply
" value="
'.GetMessage("admin_lib_edit_apply").'
" title="
'.GetMessage("admin_lib_edit_apply_title").'
">';
414
}
415
if ($params["
btnCancel
"] !== false)
416
{
417
$htmlAjaxButtons .= '<input' . $disable . ' type="
button
" name="
cancel
" value="
'.GetMessage("admin_lib_edit_cancel").'
" title="
'.GetMessage("admin_lib_edit_cancel_title").'
">';
418
}
419
if ($params["
btnSaveAndAdd
"] === true)
420
{
421
global $APPLICATION;
422
$addUrl = (new Uri($APPLICATION->GetCurPage()))
423
->addParams(["
lang
" => LANGUAGE_ID])
424
->getUri()
425
;
426
if ($addUrl <> '' && !preg_match('/(javascript|data)[\s\0-\13]*:/i', $addUrl))
427
{
428
$htmlAjaxButtons .= '<input' . $disable . ' type="
button
" name="
save_and_add
" value="
'.GetMessage("admin_lib_edit_save_and_add").'
" title="
'.GetMessage("admin_lib_edit_save_and_add_title").'
" class="
adm-btn-add
" data-url="
'.htmlspecialcharsbx(CUtil::addslashes($addUrl)).'
">';
429
}
430
else
431
{
432
$htmlAjaxButtons .= '<input' . $disable . ' type="
button
" name="
save_and_add
" value="
'.GetMessage("admin_lib_edit_save_and_add").'
" title="
'.GetMessage("admin_lib_edit_save_and_add_title").'
" class="
adm-btn-add
">';
433
}
434
}
435
436
echo $htmlAjaxButtons;
437
}
438
439
public function getSidePanelFields()
440
{
441
if ($this->isSidePanel)
442
{
443
$this->isShownSidePanelFields = true;
444
445
echo '<input type="
hidden
" name="
IFRAME
" value="
Y
">';
446
echo '<input type="
hidden
" name="
IFRAME_TYPE
" value="
SIDE_SLIDER
">';
447
}
448
}
449
453
function ButtonsPublic($arJSButtons = false)
454
{
455
while ($this->tabIndex < count($this->tabs))
456
$this->BeginNextTab();
457
458
$this->bButtons = true;
459
$this->EndTab();
460
461
if ($this->bPublicMode)
462
{
463
if(isset($_REQUEST['from_module']) && $_REQUEST['from_module'] <> '')
464
{
465
echo '<input type="hidden
" name="
from_module
" value="
'.htmlspecialcharsbx($_REQUEST['
from_module
']).'
" />';
466
}
467
468
if ($arJSButtons === false)
469
{
470
echo '
471
<input type="
hidden
" name="
bxpublic
" value="
Y
" /><input type="
hidden
" name="
save
" value="
Y
" />
472
<script>'.$this->publicObject.'.SetButtons(['.$this->publicObject.'.btnSave, '.$this->publicObject.'.btnCancel]);</script>
473
';
474
}
475
elseif (is_array($arJSButtons))
476
{
477
$arJSButtons = array_values($arJSButtons);
478
echo '
479
<input type="
hidden
" name="
bxpublic
" value="
Y
" />
480
<script>'.$this->publicObject.'.SetButtons([
481
';
482
foreach ($arJSButtons as $key => $btn)
483
{
484
if (str_starts_with($btn, '.'))
485
$btn = $this->publicObject.$btn;
486
echo $key ? ',' : '', $btn, "
\r\n
"; // NO JSESCAPE HERE! string must contain valid js object
487
}
488
echo '
489
]);</script>
490
';
491
}
492
}
493
}
494
495
function End()
496
{
497
$hkInst = CHotKeys::getInstance();
498
499
if(!$this->bButtons)
500
{
501
while ($this->tabIndex < count($this->tabs))
502
$this->BeginNextTab();
503
504
//end previous tab
505
$this->EndTab();
506
if (!$this->bPublicMode)
507
echo '<div class="
adm-detail-content-btns-wrap
"><div class="
adm-detail-content-btns adm-detail-content-btns-empty
"></div></div>';
508
}
509
elseif (!$this->bPublicMode)
510
{
511
echo '</div></div>';
512
}
513
514
if (!$this->bPublicMode)
515
{
516
echo '
517
</div></div>
518
';
519
}
520
521
$Execs = $hkInst->GetCodeByClassName("
CAdminTabControl
");
522
echo $hkInst->PrintJSExecs($Execs, $this->name);
523
524
echo '
525
526
<input type="
hidden
" id="
'.$this->name.'
_active_tab
" name="
'.$this->name.'
_active_tab
" value="
'.htmlspecialcharsbx($this->selectedTab).'
">
527
528
<script>';
529
$s = "
";
530
foreach($this->tabs as $tab)
531
{
532
$s .= ($s <> "
"? "
,
":"
").
533
"
{
".
534
"
'DIV'
:
'".$tab["DIV"]."'
".
535
(isset($tab["
ONSELECT
"]) && $tab["
ONSELECT
"] <> "
"? "
,
'ONSELECT'
:
'".CUtil::JSEscape($tab["ONSELECT"])."'
":"
").
536
"
}
";
537
}
538
$adminTabControlParams = array();
539
if (isset($this->arButtonsParams["
back_url
"]) && $this->arButtonsParams["
back_url
"] <> '')
540
$adminTabControlParams["
backUrl
"] = $this->arButtonsParams["
back_url
"];
541
if ($this->isPublicFrame)
542
$adminTabControlParams["
isPublicFrame
"] = "
Y
";
543
if ($this->isSidePanel)
544
$adminTabControlParams["
isSidePanel
"] = "
Y
";
545
if ($this->publicSidePanel)
546
$adminTabControlParams["
publicSidePanel
"] = "
Y
";
547
echo '
548
if (!window.'.$this->name.' || !BX.is_subclass_of(window.'.$this->name.', BX.adminTabControl))
549
window.'.$this->name.' = new BX.adminTabControl("
'.$this->name.'
", "
'.$this->unique_name.
550
'
", ['.$s.'], ' . Json::encode($adminTabControlParams) . ');
551
else if(!!window.'.$this->name.')
552
window.'.$this->name.'.PreInit(true);
553
';
554
555
if (!$this->bPublicMode)
556
{
557
$aEditOpt = CUserOptions::GetOption("
edit
", $this->unique_name, array());
558
$aTabOpt = CUserOptions::GetOption("
edit
", 'admin_tabs', array());
559
560
if($this->bCanExpand && count($this->tabs) > 1)
561
{
562
if (isset($aEditOpt["
expand
"]) && $aEditOpt["
expand
"] == "
on
")
563
{
564
echo '
565
'.$this->name.'.ToggleTabs();';
566
}
567
}
568
569
if (($aTabOpt["
fix_top
"] ?? '') === "
off
" && ($aEditOpt["
expand
"] ?? '') !== "
on
")
570
{
571
echo '
572
'.$this->name.'.ToggleFix(\'top\');';
573
}
574
575
if (isset($aTabOpt["
fix_bottom
"]) && $aTabOpt["
fix_bottom
"] == "
off
")
576
{
577
echo '
578
'.$this->name.'.ToggleFix(\'bottom\');';
579
}
580
}
581
else
582
{
583
echo 'window.'.$this->name.'.setPublicMode(true); ';
584
}
585
echo '
586
</script>
587
';
588
if ($this->bPublicModeBuffer)
589
{
590
echo '</div>';
591
echo '<script>BX.ready(function() {'.$this->publicObject.'.SwapContent(\''.$this->publicModeBuffer_id.'\');});</script>';
592
}
593
}
594
595
function GetSelectedTab()
596
{
597
return $this->selectedTab;
598
}
599
600
function ActiveTabParam()
601
{
602
return $this->name."
_active_tab=
".urlencode($this->selectedTab);
603
}
604
605
// this method is temporarily disabled!
606
//string, CAdminException, array("
id
"=>"
name
", ...)
607
function ShowWarnings($form, $messages, $aFields=false)
608
{
609
/*
610
if(!$messages)
611
return;
612
$aMess = $messages->GetMessages();
613
if(empty($aMess) || !is_array($aMess))
614
return;
615
$s = "
";
616
foreach($aMess as $msg)
617
{
618
$field_name = (is_array($aFields)? $aFields[$msg["
id
"]] : $msg["
id
"]);
619
if(empty($field_name))
620
continue;
621
$s .= ($s <> "
"? "
,
":"
")."
{
'name'
:
'".CUtil::JSEscape($field_name)."'
,
'title'
:
'".CUtil::JSEscape(htmlspecialcharsback($msg["text"]))."'
}
";
622
}
623
echo '
624
<script>
625
'.$this->name.'.ShowWarnings("
'.CUtil::JSEscape($form).'
", ['.$s.']);
626
</script>
627
';
628
*/
629
}
630
}
$APPLICATION
global $APPLICATION
Определения
include.php:80
Bitrix\Main\Web\Json
Определения
json.php:9
Bitrix\Main\Web\Uri
Определения
uri.php:17
CAdminTabControl
Определения
admin_tabcontrol.php:14
CAdminTabControl\SetSelectedTab
SetSelectedTab()
Определения
admin_tabcontrol.php:130
CAdminTabControl\OnAdminTabControlBegin
OnAdminTabControlBegin()
Определения
admin_tabcontrol.php:120
CAdminTabControl\$bCanExpand
$bCanExpand
Определения
admin_tabcontrol.php:21
CAdminTabControl\$tabIndex
$tabIndex
Определения
admin_tabcontrol.php:18
CAdminTabControl\$bPublicMode
$bPublicMode
Определения
admin_tabcontrol.php:29
CAdminTabControl\AddTabs
AddTabs(&$customTabber)
Определения
admin_tabcontrol.php:85
CAdminTabControl\$isShownSidePanelFields
$isShownSidePanelFields
Определения
admin_tabcontrol.php:38
CAdminTabControl\$tabEvent
$tabEvent
Определения
admin_tabcontrol.php:34
CAdminTabControl\$selectedTab
$selectedTab
Определения
admin_tabcontrol.php:17
CAdminTabControl\$AUTOSAVE
$AUTOSAVE
Определения
admin_tabcontrol.php:33
CAdminTabControl\SetPublicMode
SetPublicMode($jsObject=false)
Определения
admin_tabcontrol.php:71
CAdminTabControl\$arButtonsParams
$arButtonsParams
Определения
admin_tabcontrol.php:20
CAdminTabControl\$publicSidePanel
$publicSidePanel
Определения
admin_tabcontrol.php:37
CAdminTabControl\$customTabber
$customTabber
Определения
admin_tabcontrol.php:27
CAdminTabControl\$bPublicModeBuffer
$bPublicModeBuffer
Определения
admin_tabcontrol.php:22
CAdminTabControl\Begin
Begin()
Определения
admin_tabcontrol.php:146
CAdminTabControl\$name
$name
Определения
admin_tabcontrol.php:15
CAdminTabControl\$tabs
$tabs
Определения
admin_tabcontrol.php:16
CAdminTabControl\__construct
__construct($name, $tabs, $bCanExpand=true, $bDenyAutoSave=false)
Определения
admin_tabcontrol.php:40
CAdminTabControl\$bButtons
$bButtons
Определения
admin_tabcontrol.php:19
CAdminTabControl\$bShowSettings
$bShowSettings
Определения
admin_tabcontrol.php:23
CAdminTabControl\$publicModeBuffer_id
$publicModeBuffer_id
Определения
admin_tabcontrol.php:24
CAdminTabControl\$unique_name
$unique_name
Определения
admin_tabcontrol.php:15
CAdminTabControl\$isPublicFrame
$isPublicFrame
Определения
admin_tabcontrol.php:30
CAdminTabControl\$isSidePanel
$isSidePanel
Определения
admin_tabcontrol.php:36
CAdminTabControl\$publicObject
$publicObject
Определения
admin_tabcontrol.php:31
CAutoSave
Определения
undo.php:238
CAutoSave\Allowed
static Allowed()
Определения
undo.php:441
BX_PUBLIC_MODE
const BX_PUBLIC_MODE
Определения
file_edit.php:2
array
</td ></tr ></table ></td ></tr >< tr >< td class="bx-popup-label bx-width30"><?=GetMessage("PAGE_NEW_TAGS")?> array( $site)
Определения
file_new.php:804
top
bx_acc_lim_group_list limitGroupList[] multiple<?=$group[ 'ID']?> ID selected margin top
Определения
file_new.php:657
$_REQUEST
$_REQUEST["admin_mnu_menu_id"]
Определения
get_menu.php:8
$adminSidePanelHelper
global $adminSidePanelHelper
Определения
init_admin.php:7
subdialog
URL bitrix admin public_access_edit php subdialog
Определения
structure.php:417
bxpublic
URL bitrix admin public_file_edit php bxpublic
Определения
structure.php:440
ExecuteModuleEventEx
ExecuteModuleEventEx($arEvent, $arParams=[])
Определения
tools.php:5214
GetModuleEvents
GetModuleEvents($MODULE_ID, $MESSAGE_ID, $bReturnArray=false)
Определения
tools.php:5177
title
<? endif;?> window document title
Определения
prolog_main_admin.php:76
$key
if(empty($signedUserToken)) $key
Определения
quickway.php:257
lang
lang
Определения
options.php:182
$i
$i
Определения
factura.php:643
count
</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."%"
Определения
waybill.php:936
display
adm detail iblock types adm detail iblock list tr_SITE_ID display
Определения
yandex_setup.php:388
bitrix
modules
main
interface
admin_tabcontrol.php
Создано системой
1.14.0