Beispiel #1
0
	function _InitSystem()
	{
		$adminPage = new CAdminPage();

		echo $adminPage->ShowPopupCSS();
		echo $adminPage->ShowScript();

	}
Beispiel #2
0
    function GetLayout()
    {
        $wizard = $this->GetWizard();
        $formName = htmlspecialcharsbx($wizard->GetFormName());
        CUtil::InitJSCore(array("ajax"));
        $adminScript = CAdminPage::ShowScript();
        $charset = LANG_CHARSET;
        $wizardName = htmlspecialcharsEx($wizard->GetWizardName());
        $nextButtonID = htmlspecialcharsbx($wizard->GetNextButtonID());
        $prevButtonID = htmlspecialcharsbx($wizard->GetPrevButtonID());
        $cancelButtonID = htmlspecialcharsbx($wizard->GetCancelButtonID());
        $finishButtonID = htmlspecialcharsbx($wizard->GetFinishButtonID());
        IncludeAJAX();
        $ajaxScripts = $GLOBALS["APPLICATION"]->GetHeadStrings();
        $ajaxScripts .= $GLOBALS["APPLICATION"]->GetHeadScripts();
        $obStep = $wizard->GetCurrentStep();
        $arErrors = $obStep->GetErrors();
        $strError = $strJsError = "";
        if (count($arErrors) > 0) {
            foreach ($arErrors as $arError) {
                $strError .= $arError[0] . "<br />";
                if ($arError[1] !== false) {
                    $strJsError .= ($strJsError != "" ? ", " : "") . "{'name':'" . CUtil::addslashes($wizard->GetRealName($arError[1])) . "', 'title':'" . CUtil::addslashes(htmlspecialcharsback($arError[0])) . "'}";
                }
            }
            if (strlen($strError) > 0) {
                $strError = '<div id="step_error">' . $strError . "</div>";
            }
            $strJsError = '
			<script type="text/javascript">
				ShowWarnings([' . $strJsError . ']);
			</script>';
        }
        $stepTitle = $obStep->GetTitle();
        $stepSubTitle = $obStep->GetSubTitle();
        $autoSubmit = "";
        if ($obStep->IsAutoSubmit()) {
            $autoSubmit = 'setTimeout("AutoSubmit();", 500);';
        }
        $alertText = GetMessageJS("MAIN_WIZARD_WANT_TO_CANCEL");
        $loadingText = GetMessageJS("MAIN_WIZARD_WAIT_WINDOW_TEXT");
        $package = $wizard->GetPackage();
        return <<<HTML
<!DOCTYPE html>
<html id="bx-admin-prefix">
<head>
\t<head>
\t\t<title>{$wizardName}</title>
\t\t<meta http-equiv="X-UA-Compatible" content="IE=edge">
\t\t<meta http-equiv="Content-Type" content="text/html; charset={$charset}">
\t\t{$ajaxScripts}
\t\t<style type="text/css">
\t\t\tbody
\t\t\t{
\t\t\t\tmargin:0;
\t\t\t\tpadding:0;
\t\t\t\tfont-size: 13px;
\t\t\t\tfont-family: "Helvetica Neue",Helvetica,Arial,sans-serif;
\t\t\t}
\t\t\ttable {font-size:100%;}
\t\t\tform {margin:0; padding:0; }

\t\t\ta {
\t\t\t\tcolor: #2675D7;
\t\t\t\ttext-decoration: underline;
\t\t\t}


\t\t\t.step-content {
\t\t\t\tborder: solid 1px #DCE7ED;
\t\t\t\tbackground-color: #F5F9F9;
\t\t\t\theight: 347px;
\t\t\t\toverflow: auto;
\t\t\t}

\t\t\t.step-header {
\t\t\t\tborder-bottom: 1px solid #DCE7ED;
\t\t\t\tfont-size: 12px;
\t\t\t\tpadding: 6px 30px 9px 9px;
\t\t\t\tmargin-bottom: 12px;
\t\t\t}

\t\t\t.step-title { font-size: 16px; }
\t\t\t.step-subtitle { font-size: 13px; }

\t\t\t.step-body {
\t\t\t\tpadding: 0 10px;
\t\t\t}

\t\t\t.step-buttons
\t\t\t{
\t\t\t\tpadding-top: 12px;
\t\t\t\tpadding-left: 2px;
\t\t\t}

\t\t\t.step-buttons input {
\t\t\t\t-webkit-border-radius: 4px;
\t\t\t\tborder-radius: 4px;
\t\t\t\tborder:none;
\t\t\t\tborder-top:1px solid #fff;
\t\t\t\t-webkit-box-shadow: 0 0 1px rgba(0,0,0,.11), 0 1px 1px rgba(0,0,0,.3), inset 0 1px #fff, inset 0 0 1px rgba(255,255,255,.5);
\t\t\t\tbox-shadow: 0 0 1px rgba(0,0,0,.3), 0 1px 1px rgba(0,0,0,.3), inset 0 1px #fff, inset 0 0 1px rgba(255,255,255,.5);
\t\t\t\tbackground-image: -webkit-linear-gradient(bottom, #d7e3e7, #fff)!important;
\t\t\t\tbackground-image: -moz-linear-gradient(bottom, #d7e3e7, #fff)!important;
\t\t\t\tbackground-image: -ms-linear-gradient(bottom, #d7e3e7, #fff)!important;
\t\t\t\tbackground-image: -o-linear-gradient(bottom, #d7e3e7, #fff)!important;
\t\t\t\tbackground-image: linear-gradient(bottom, #d7e3e7, #fff)!important;
\t\t\t\tcolor:#3f4b54;
\t\t\t\tcursor:pointer;
\t\t\t\tdisplay:inline-block;
\t\t\t\tfont-family:"Helvetica Neue",Helvetica,Arial,sans-serif;
\t\t\t\tfont-weight:bold;
\t\t\t\tfont-size:13px;
\t\t\t\theight: 29px;
\t\t\t\ttext-shadow:0 1px rgba(255,255,255,0.7);
\t\t\t\ttext-decoration:none;
\t\t\t\tposition:relative;
\t\t\t\tvertical-align:middle;
\t\t\t\t-webkit-font-smoothing: antialiased;
\t\t\t\tpadding: 0 13px 2px;
\t\t\t\tmargin-right: 3px;
\t\t\t}

\t\t\t.step-buttons input:hover {
\t\t\t\ttext-decoration: none;
\t\t\t\tbackground:#f3f6f7!important;
\t\t\t\tbackground-image: -webkit-linear-gradient(top, #f8f8f9, #f2f6f8)!important;
\t\t\t\tbackground-image: -moz-linear-gradient(top, #f8f8f9, #f2f6f8)!important;
\t\t\t\tbackground-image: -ms-linear-gradient(top, #f8f8f9, #f2f6f8)!important;
\t\t\t\tbackground-image: -o-linear-gradient(top, #f8f8f9, #f2f6f8)!important;
\t\t\t\tbackground-image: linear-gradient(top, #f8f8f9, #f2f6f8)!important;
\t\t\t}

\t\t\t.step-buttons input:active {
\t\t\t\t-webkit-border-radius: 4px;
\t\t\t\tborder-radius: 4px;
\t\t\t\tbackground-color: #b7c4c9!important;
\t\t\t\t-webkit-box-shadow: inset 0 1px 1px 1px rgba(103,109,123,.78);
\t\t\t\tbox-shadow: inset 0 1px 1px 1px rgba(103,109,123,.78);
\t\t\t\tbackground-image: -webkit-linear-gradient(top, rgba(179,194,200,.96), rgba(202,215,219,.96))!important;
\t\t\t\tbackground-image: -moz-linear-gradient(top, rgba(179,194,200,.96), rgba(202,215,219,.96))!important;
\t\t\t\tbackground-image: -ms-linear-gradient(top, rgba(179,194,200,.96), rgba(202,215,219,.96))!important;
\t\t\t\tbackground-image: -o-linear-gradient(top, rgba(179,194,200,.96), rgba(202,215,219,.96))!important;
\t\t\t\tbackground-image: linear-gradient(top, rgba(179,194,200,.96), rgba(202,215,219,.96))!important;
\t\t\t\tborder-top:transparent;
\t\t\t\theight: 29px;
\t\t\t\toutline:none;
\t\t\t\tpadding:2px 13px 1px;
\t\t\t}

\t\t\t.bx-ie8 .step-buttons input,
\t\t\t.bx-ie9 .step-buttons input {
\t\t\t\tborder-radius:4px;
\t\t\t\tbackground:url("/bitrix/panel/main/images/bx-admin-sprite-small-1.png") repeat-x 0 -3554px;
\t\t\t\tbox-shadow:0 0 0 1px rgba(0, 0, 0, 0.07), 0 1px 2px rgba(0, 0, 0, 0.5), 0 1px 0 #FFFFFF inset, 0 0 1px rgba(255, 255, 255, 0.5) inset !important;
\t\t\t\tline-height:16px;
\t\t\t\theight:31px!important;
\t\t\t\tpadding-top:6px!important;
\t\t\t\tpadding-bottom:6px!important;
\t\t\t\tmargin-right: 3px !important;
\t\t\t}

\t\t\t.bx-ie8 .step-buttons input {border:1px solid #959c9d !important;}

\t\t\t#step_error
\t\t\t{
\t\t\t\tcolor:red;
\t\t\t\tpadding:0 0 12px 0;
\t\t\t}

\t\t\t#hidden-layer
\t\t\t{
\t\t\t\tbackground:#F8F9FC none repeat scroll 0%;
\t\t\t\theight:100%;
\t\t\t\tleft:0pt;
\t\t\t\topacity:0.01;
\t\t\t\tfilter:alpha(opacity=1);
\t\t\t\t-moz-opacity:0.01;
\t\t\t\tposition:absolute;
\t\t\t\ttop:0pt;
\t\t\t\twidth:100%;
\t\t\t\tz-index:10001;
\t\t\t}

\t\t\t/*Data table*/
\t\t\ttable.wizard-data-table { border:1px solid #B2C4DD; border-collapse:collapse;}
\t\t\ttable.wizard-data-table td { border:1px solid #B2C4DD; background-color:#FFFFFF; padding:3px 5px; }
\t\t\ttable.wizard-data-table thead td, table.wizard-data-table th {
\t\t\t\tbackground-color:#E4EDF5;
\t\t\t\tfont-weight:normal;
\t\t\t\tbackground-image:none;
\t\t\t\tborder:1px solid #B2C4DD;
\t\t\t\tpadding:4px;
\t\t\t}
\t\t\ttable.wizard-data-table tbody td { background-color:#FFF; background-image:none; }
\t\t\ttable.wizard-data-table tfoot td { background-color:#F2F5F9; padding:4px; }

\t\t\t.wizard-note-box { background:#FEFDEA; padding:7px; border:1px solid #D7D6BA; }
\t\t\t.wizard-required { color:red; }

\t\t\t.bx-session-message { display: none !important;}

\t\t</style>

\t\t{$adminScript}

\t\t<script type="text/javascript">

\t\t\ttop.BX.message({"ADMIN_WIZARD_EXIT_ALERT" : "{$alertText}"});

\t\t\tfunction OnLoad()
\t\t\t{
\t\t\t\tvar dialog = top.BX.WindowManager.Get();
\t\t\t\tif (dialog)
\t\t\t\t\tdialog.SetTitle('{$wizardName}');

\t\t\t\tvar form = document.forms["{$formName}"];

\t\t\t\tif (form)
\t\t\t\t\tform.onsubmit = OnFormSubmit;

\t\t\t\tvar cancelButton = document.forms["{$formName}"].elements["{$cancelButtonID}"];
\t\t\t\tvar nextButton = document.forms["{$formName}"].elements["{$nextButtonID}"];
\t\t\t\tvar prevButton = document.forms["{$formName}"].elements["{$prevButtonID}"];
\t\t\t\tvar finishButton = document.forms["{$formName}"].elements["{$finishButtonID}"];

\t\t\t\tif (cancelButton && !nextButton && !prevButton && !finishButton)
\t\t\t\t{
\t\t\t\t\ttop.WizardWindow.isClosed = true;
\t\t\t\t\tcancelButton.onclick = CloseWindow;
\t\t\t\t}
\t\t\t\telse if(cancelButton)
\t\t\t\t{
\t\t\t\t\tcancelButton.onclick = ConfirmCancel;
\t\t\t\t}

\t\t\t\t{$autoSubmit}
\t\t\t}

\t\t\tfunction OnFormSubmit()
\t\t\t{
\t\t\t\tvar div = document.body.appendChild(document.createElement("DIV"));
\t\t\t\tdiv.id = "hidden-layer";
\t\t\t}

\t\t\tfunction AutoSubmit()
\t\t\t{
\t\t\t\tvar nextButton = document.forms["{$formName}"].elements["{$nextButtonID}"];
\t\t\t\tif (nextButton)
\t\t\t\t{
\t\t\t\t\tvar wizard = top.WizardWindow;
\t\t\t\t\tif (wizard)
\t\t\t\t\t{
\t\t\t\t\t\twizard.messLoading = "{$loadingText}";
\t\t\t\t\t\twizard.ShowWaitWindow();
\t\t\t\t\t}

\t\t\t\t\tnextButton.click();
\t\t\t\t\tnextButton.disabled=true;
\t\t\t\t}
\t\t\t}

\t\t\tfunction ConfirmCancel()
\t\t\t{
\t\t\t\treturn (confirm("{$alertText}"));
\t\t\t}

\t\t\tfunction ShowWarnings(warnings)
\t\t\t{
\t\t\t\tvar form = document.forms["{$formName}"];
\t\t\t\tif(!form)
\t\t\t\t\treturn;

\t\t\t\tfor(var i in warnings)
\t\t\t\t{
\t\t\t\t\tvar e = form.elements[warnings[i]["name"]];
\t\t\t\t\tif(!e)
\t\t\t\t\t\tcontinue;

\t\t\t\t\tvar type = (e.type? e.type.toLowerCase():"");
\t\t\t\t\tvar bBefore = false;
\t\t\t\t\tif(e.length > 1 && type != "select-one" && type != "select-multiple")
\t\t\t\t\t{
\t\t\t\t\t\te = e[0];
\t\t\t\t\t\tbBefore = true;
\t\t\t\t\t}
\t\t\t\t\tif(type == "textarea" || type == "select-multiple")
\t\t\t\t\t\tbBefore = true;

\t\t\t\t\tvar td = e.parentNode;
\t\t\t\t\tvar img;
\t\t\t\t\tif(bBefore)
\t\t\t\t\t{
\t\t\t\t\t\timg = td.insertBefore(new Image(), e);
\t\t\t\t\t\ttd.insertBefore(document.createElement("BR"), e);
\t\t\t\t\t}
\t\t\t\t\telse
\t\t\t\t\t{
\t\t\t\t\t\timg = td.insertBefore(new Image(), e.nextSibling);
\t\t\t\t\t\timg.hspace = 2;
\t\t\t\t\t\timg.vspace = 2;
\t\t\t\t\t\timg.style.verticalAlign = "bottom";
\t\t\t\t\t}
\t\t\t\t\timg.src = "/bitrix/themes/"+phpVars.ADMIN_THEME_ID+"/images/icon_warn.gif";
\t\t\t\t\timg.title = warnings[i]["title"];
\t\t\t\t}
\t\t\t}

\t\t\tdocument.onkeydown = EnterKeyPress;

\t\t\tfunction EnterKeyPress(event)
\t\t\t{

\t\t\t\tevent = event || window.event;

\t\t\t\tif (!event.ctrlKey)
\t\t\t\t\treturn;

\t\t\t\tvar key = (event.keyCode ? event.keyCode : (event.which ? event.which : null) );

\t\t\t\tif (!key)
\t\t\t\t\treturn;

\t\t\t\tif (key == 13 || key == 39)
\t\t\t\t{
\t\t\t\t\tvar nextButton = document.forms["{$formName}"].elements["{$nextButtonID}"];
\t\t\t\t\tif (nextButton)
\t\t\t\t\t\tnextButton.click();
\t\t\t\t}
\t\t\t\telse if (key == 37)
\t\t\t\t{
\t\t\t\t\tvar prevButton = document.forms["{$formName}"].elements["{$prevButtonID}"];
\t\t\t\t\tif (prevButton)
\t\t\t\t\t\tprevButton.click();
\t\t\t\t}
\t\t\t}

\t\t\tfunction CloseWindow()
\t\t\t{
\t\t\t\tif (self.parent.window.WizardWindow)
\t\t\t\t\tself.parent.window.WizardWindow.Close();
\t\t\t}

\t\t</script>

\t</head>

\t<body onload="OnLoad();">

\t\t{#FORM_START#}
\t\t<div class="step-content">
\t\t\t<div class="step-header">
\t\t\t\t<div class="step-title">{$stepTitle}</div>
\t\t\t\t<div class="step-subtitle">{$stepSubTitle}</div>
\t\t\t</div>
\t\t\t<div class="step-body">
\t\t\t\t{$strError}
\t\t\t\t{#CONTENT#}
\t\t\t</div>

\t\t</div>
\t\t<div class="step-buttons">{#BUTTONS#}</div>
\t\t{#FORM_END#}
\t\t{$strJsError}

\t</body>
</html>
HTML;
    }
Beispiel #3
0
	function _InitSystem()
	{
		global $APPLICATION;

		$adminPage = new CAdminPage();

		echo $adminPage->ShowPopupCSS();
		echo $adminPage->ShowScript();

	}
?>
<!DOCTYPE html>
<html id="bx-admin-prefix">
<head>
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<title><?php 
echo $APPLICATION->GetTitle();
?>
</title>
<meta http-equiv="Content-Type" content="text/html; charset=<?php 
echo LANG_CHARSET;
?>
">
<?php 
if (!is_object($adminPage)) {
    $adminPage = new CAdminPage();
}
CJSCore::Init(array('admin_interface'));
$APPLICATION->AddBufferContent(array($adminPage, "ShowCSS"));
echo $adminPage->ShowScript();
$APPLICATION->ShowHeadStrings();
$APPLICATION->ShowHeadScripts();
?>
<script type="text/javascript">
function PopupOnKeyPress(e)
{
	if(!e) e = window.event
	if(!e) return;
	if(e.keyCode == 27)
		window.close();
}
Beispiel #5
0
    function GetLayout()
    {
        $wizard =& $this->wizard;
        $formName = htmlspecialchars($wizard->GetFormName());
        $adminScript = CAdminPage::ShowScript();
        $charset = LANG_CHARSET;
        $wizardName = htmlspecialcharsEx($wizard->GetWizardName());
        $nextButtonID = htmlspecialchars($wizard->GetNextButtonID());
        $prevButtonID = htmlspecialchars($wizard->GetPrevButtonID());
        $cancelButtonID = htmlspecialchars($wizard->GetCancelButtonID());
        $finishButtonID = htmlspecialchars($wizard->GetFinishButtonID());
        $wizardPath = $wizard->GetPath();
        $obStep =& $wizard->GetCurrentStep();
        $arErrors = $obStep->GetErrors();
        $strError = $strJsError = "";
        if (count($arErrors) > 0) {
            foreach ($arErrors as $arError) {
                $strError .= $arError[0] . "<br />";
                if ($arError[1] !== false) {
                    $strJsError .= ($strJsError != "" ? ", " : "") . "{'name':'" . CUtil::addslashes($wizard->GetRealName($arError[1])) . "', 'title':'" . CUtil::addslashes(htmlspecialcharsback($arError[0])) . "'}";
                }
            }
            if (strlen($strError) > 0) {
                $strError = '<div id="step_error">' . $strError . "</div>";
            }
            $strJsError = '
			<script type="text/javascript">
				ShowWarnings([' . $strJsError . ']);
			</script>';
        }
        $stepTitle = $obStep->GetTitle();
        $stepSubTitle = $obStep->GetSubTitle();
        if (strlen($stepSubTitle) > 0) {
            $stepSubTitle = '<div id="step_description">' . $stepSubTitle . '</div>';
        }
        $autoSubmit = "";
        if ($obStep->IsAutoSubmit()) {
            $autoSubmit = 'setTimeout("AutoSubmit();", 500);';
        }
        $alertText = GetMessage("MAIN_WIZARD_WANT_TO_CANCEL");
        $loadingText = GetMessage("MAIN_WIZARD_WAIT_WINDOW_TEXT");
        return <<<HTML
<html>
\t<head>
\t\t<title>{$wizardName}</title>
\t\t<meta http-equiv="Content-Type" content="text/html; charset={$charset}">
\t\t<style type="text/css">
\t\t\tbody
\t\t\t{
\t\t\t\tmargin:0; 
\t\t\t\tpadding:0; 
\t\t\t\tbackground-color: #DDE8F1;
\t\t\t\tfont-family:Verdana,Arial,helvetica,sans-serif;
\t\t\t\tfont-size:75%;
\t\t\t}
\t\t\ttable {font-size:100%;}
\t\t\tform {margin:0;}
\t\t\t#step_info
\t\t\t{
\t\t\t\theight:45px;
\t\t\t\tpadding:8px 30px;
\t\t\t\tborder-bottom:1px solid #ccc;
\t\t\t\tbox-sizing:border-box;
\t\t\t\t-moz-box-sizing:border-box;
\t\t\t\toverflow:hidden;
\t\t\t\tbackground:#fff url({$wizardPath}/images/title_bg.gif) left center no-repeat;
\t\t\t}

\t\t\t#step_title
\t\t\t{
\t\t\t\tfont-weight:bold;
\t\t\t}

\t\t\t#step_description
\t\t\t{
\t\t\t\tfont-size:95%;
\t\t\t\tmargin-left:10px;
\t\t\t}

\t\t\t#step_content 
\t\t\t{
\t\t\t\tpadding:30px 20px;
\t\t\t\tfloat:left;
\t\t\t\tbox-sizing:border-box;
\t\t\t\t-moz-box-sizing:border-box;
\t\t\t}
\t\t\t#step_buttons
\t\t\t{
\t\t\t\theight:48px;
\t\t\t\ttext-align:right;
\t\t\t\tpadding-right:20px;
\t\t\t\tpadding-top:5px;
\t\t\t\toverflow:hidden;
\t\t\t\tbox-sizing:border-box;
\t\t\t\t-moz-box-sizing:border-box;
\t\t\t\tbackground:#F3F9FC url({$wizardPath}/images/buttons_bg.gif) left top repeat-x;
\t\t\t}

\t\t\t#step_content_container
\t\t\t{
\t\t\t\theight:290px;
\t\t\t\toverflow:auto;
\t\t\t\tbackground:#fff url({$wizardPath}/images/content_bg.gif) left bottom no-repeat;
\t\t\t}

\t\t\t#step_error
\t\t\t{
\t\t\t\tcolor:red;
\t\t\t\tbackground:white;
\t\t\t\tborder-bottom:1px solid #ccc;
\t\t\t\tpadding:2px 30px;
\t\t\t}

\t\t\t.wizard-template-box, .wizard-group-box
\t\t\t{
\t\t\t\tfloat:left;
\t\t\t\tmargin:5px;
\t\t\t\tmargin-top:0;
\t\t\t\twidth:160px;
\t\t\t\theight:150px;
\t\t\t}

\t\t\t#hidden-layer
\t\t\t{
\t\t\t\tbackground:#F8F9FC none repeat scroll 0%;
\t\t\t\theight:100%;
\t\t\t\tleft:0pt;
\t\t\t\topacity:0.01;
\t\t\t\tfilter:alpha(opacity=1);
\t\t\t\t-moz-opacity:0.01;
\t\t\t\tposition:absolute;
\t\t\t\ttop:0pt;
\t\t\t\twidth:100%;
\t\t\t\tz-index:10001;
\t\t\t}

\t\t</style>

\t\t{$adminScript}

\t\t<script type="text/javascript">

\t\t\tfunction OnLoad()
\t\t\t{
\t\t\t\tvar title = self.parent.window.document.getElementById("wizard_dialog_title");
\t\t\t\tif (title)
\t\t\t\t\ttitle.innerHTML = "{$wizardName}";

\t\t\t\tvar form = document.forms["{$formName}"];

\t\t\t\tif (form)
\t\t\t\t\tform.onsubmit = OnFormSubmit;

\t\t\t\tvar cancelButton = document.forms["{$formName}"].elements["{$cancelButtonID}"];
\t\t\t\tvar nextButton = document.forms["{$formName}"].elements["{$nextButtonID}"];
\t\t\t\tvar prevButton = document.forms["{$formName}"].elements["{$prevButtonID}"];
\t\t\t\tvar finishButton = document.forms["{$formName}"].elements["{$finishButtonID}"];

\t\t\t\tif (cancelButton && !nextButton && !prevButton && !finishButton)
\t\t\t\t\tcancelButton.onclick = CloseWindow;
\t\t\t\telse if(cancelButton)
\t\t\t\t\tcancelButton.onclick = ConfirmCancel;

\t\t\t\t{$autoSubmit}
\t\t\t}



\t\t\tfunction OnFormSubmit()
\t\t\t{
\t\t\t\tvar div = document.body.appendChild(document.createElement("DIV"));
\t\t\t\tdiv.id = "hidden-layer";
\t\t\t}


\t\t\tfunction AutoSubmit()
\t\t\t{
\t\t\t\tvar nextButton = document.forms["{$formName}"].elements["{$nextButtonID}"];
\t\t\t\tif (nextButton)
\t\t\t\t{
\t\t\t\t\tvar wizard = self.parent.window.WizardWindow;
\t\t\t\t\tif (wizard)
\t\t\t\t\t{
\t\t\t\t\t\twizard.messLoading = "{$loadingText}";
\t\t\t\t\t\twizard.ShowWaitWindow();
\t\t\t\t\t}

\t\t\t\t\tnextButton.click();
\t\t\t\t\tnextButton.disabled=true;
\t\t\t\t}
\t\t\t}

\t\t\tfunction ConfirmCancel()
\t\t\t{
\t\t\t\treturn (confirm("{$alertText}"));
\t\t\t}

\t\t\tfunction ShowWarnings(warnings)
\t\t\t{
\t\t\t\tvar form = document.forms["{$formName}"];
\t\t\t\tif(!form)
\t\t\t\t\treturn;

\t\t\t\tfor(var i in warnings)
\t\t\t\t{
\t\t\t\t\tvar e = form.elements[warnings[i]["name"]];
\t\t\t\t\tif(!e)
\t\t\t\t\t\tcontinue;

\t\t\t\t\tvar type = (e.type? e.type.toLowerCase():"");
\t\t\t\t\tvar bBefore = false;
\t\t\t\t\tif(e.length > 1 && type != "select-one" && type != "select-multiple")
\t\t\t\t\t{
\t\t\t\t\t\te = e[0];
\t\t\t\t\t\tbBefore = true;
\t\t\t\t\t}
\t\t\t\t\tif(type == "textarea" || type == "select-multiple")
\t\t\t\t\t\tbBefore = true;

\t\t\t\t\tvar td = e.parentNode;
\t\t\t\t\tvar img;
\t\t\t\t\tif(bBefore)
\t\t\t\t\t{
\t\t\t\t\t\timg = td.insertBefore(new Image(), e);
\t\t\t\t\t\ttd.insertBefore(document.createElement("BR"), e);
\t\t\t\t\t}
\t\t\t\t\telse
\t\t\t\t\t{
\t\t\t\t\t\timg = td.insertBefore(new Image(), e.nextSibling);
\t\t\t\t\t\timg.hspace = 2;
\t\t\t\t\t\timg.vspace = 2;
\t\t\t\t\t\timg.style.verticalAlign = "bottom";
\t\t\t\t\t}
\t\t\t\t\timg.src = "/bitrix/themes/"+phpVars.ADMIN_THEME_ID+"/images/icon_warn.gif";
\t\t\t\t\timg.title = warnings[i]["title"];
\t\t\t\t}
\t\t\t}

\t\t\tdocument.onkeypress = EnterKeyPress;

\t\t\tfunction EnterKeyPress(event)
\t\t\t{

\t\t\t\tif (!document.getElementById)
\t\t\t\t\treturn;

\t\t\t\tif (window.event)
\t\t\t\t\tevent = window.event;

\t\t\t\tif (!event.ctrlKey)
\t\t\t\t\treturn;

\t\t\t\tvar key = (event.keyCode ? event.keyCode : (event.which ? event.which : null) );
\t\t\t\tif (!key)
\t\t\t\t\treturn;

\t\t\t\tif (key == 13 || key == 39)
\t\t\t\t{
\t\t\t\t\tvar nextButton = document.forms["{$formName}"].elements["{$nextButtonID}"];
\t\t\t\t\tif (nextButton)
\t\t\t\t\t\tnextButton.click();
\t\t\t\t}
\t\t\t\telse if (key == 37)
\t\t\t\t{
\t\t\t\t\tvar prevButton = document.forms["{$formName}"].elements["{$prevButtonID}"];
\t\t\t\t\tif (prevButton)
\t\t\t\t\t\tprevButton.click();
\t\t\t\t}
\t\t\t}

\t\t\tfunction CloseWindow()
\t\t\t{
\t\t\t\tif (self.parent.window.WizardWindow)
\t\t\t\t\tself.parent.window.WizardWindow.Close();
\t\t\t}

\t\t</script>

\t</head>

\t<body onload="OnLoad();">

\t\t{#FORM_START#}
\t\t<div style="margin:2px 2px 0 2px;border:1px solid #A9BBC8;">
\t\t\t<div id="step_info">
\t\t\t\t<div id="step_title">{$stepTitle}</div>
\t\t\t\t<div id="step_description">{$stepSubTitle}</div>
\t\t\t</div>
\t\t\t
\t\t\t<div id="step_content_container">
\t\t\t\t{$strError}
\t\t\t\t<div id="step_content">{#CONTENT#}</div>
\t\t\t</div>
\t\t</div>

\t\t<div id="step_buttons">{#BUTTONS#}</div>
\t\t\t
\t\t{#FORM_END#}
\t\t{$strJsError}

\t</body>
</html>
HTML;
    }