Не отображается модальное окно бутстрапа. Куда копать?
header.php шаблона сайта
Код |
---|
<li nk rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.7/css/bootstrap.min.css">
<a href="/auth/" data-target="#modal-login-cabinet" data-toggle="modal">Войти</a>
<sc ript src="https://ajax.googleapis.com/ajax/libs/jquery/1.11.1/jquery.min.js"></sc ript> |
auth.php
Код |
---|
<?
<?require($_SERVER["DOCUMENT_ROOT"]."/bitrix/modules/main/include/prolog_before.php");?>
<sc ript type="text/javascript" src="/bitrix/js/main/ajax.js"></sc ript><?//необходим для работы компонента в режиме ajax?>
<?$APPLICATION->IncludeComponent(
"bitrix:system.auth.form",
"auth_form",
Array(
"FORGOT_PASSWORD_URL" => "",
"PROFILE_URL" => "",
"REGISTER_URL" => "",
"SHOW_ERRORS" => "Y"
"AJAX_MODE" => "Y", // режим AJAX
"AJAX_OPTION_SHADOW" => "N", // затемнять область
"AJAX_OPTION_JUMP" => "Y", // скроллить страницу до компонента
"AJAX_OPTION_STYLE" => "Y", // подключать стили
"AJAX_OPTION_HISTORY" => "N",
)
);?>
<?require($_SERVER["DOCUMENT_ROOT"]."/bitrix/modules/main/include/epilog_after.php");?>
?> |
Шаблон авторизации.
Код |
---|
<?if(!defined("B_PROLOG_INCLUDED") || B_PROLOG_INCLUDED!==true)die();?>
<?//burbon($arResult);?>
<div class="modal fade" id="modal-login-cabinet" role="dialog">
<div class="modal-dialog">
<!-- Modal content-->
<div class="modal-content">
<?
if ($arResult['SHOW_ERRORS'] == 'Y' && $arResult['ERROR'])
ShowMessage($arResult['ERROR_MESSAGE']);
?>
<?if($arResult["FORM_TYPE"] == "login"):?>
<div class="modal-header">
<button type="button" class="close" data-dismiss="modal">×</button>
<h4 class="modal-title">Вход в личный кабинет</h4>
</div>
<fo rm role="form" name="system_auth_form<?=$arResult["RND"]?>" method="post" target="_top" action="<?=$arResult["AUTH_URL"]?>">
<input type="hidden" name="AJAX-ACTION" value="AUTH"/>
<div class="modal-body">
<?if($arResult["BACKURL"] <> ''):?>
<input type="hidden" name="backurl" value="<?=$arResult["BACKURL"]?>" />
<?endif?>
<?foreach ($arResult["POST"] as $key => $value):?>
<input type="hidden" name="<?=$key?>" value="<?=$value?>" />
<?endforeach?>
<input type="hidden" name="AUTH_FORM" value="Y" />
<input type="hidden" name="TYPE" value="AUTH" />
<div class="row">
<div class="col-md-12">
<div class="form-group">
<label><?=GetMessage("AUTH_LOGIN")?></label>
<input type="text" name="USER_LOGIN" maxlength="50" value="<?=$arResult["USER_LOGIN"]?>" size="17" />
</div>
<div class="form-group">
<label><?=GetMessage("AUTH_PASSWORD")?></label>
<input type="password" name="USER_PASSWORD" maxlength="50" size="17" autocomplete="off" />
<?if($arResult["SECURE_AUTH"]):?>
<span class="bx-auth-secure" id="bx_auth_secure<?=$arResult["RND"]?>" title="<?echo GetMessage("AUTH_SECURE_NOTE")?>" style="display:none">
<div class="bx-auth-secure-icon"></div>
</span>
<noscript>
<span class="bx-auth-secure" title="<?echo GetMessage("AUTH_NONSECURE_NOTE")?>">
<div class="bx-auth-secure-icon bx-auth-secure-unlock"></div>
</span>
</noscript>
<sc ript type="text/javascript">
document.getElementById('bx_auth_secure<?=$arResult["RND"]?>').style.display = 'inline-block';
</sc ript>
<?endif?>
</div>
<?if ($arResult["STORE_PASSWORD"] == "Y"):?>
<div class="form-group">
<label for="USER_REMEMBER_frm" title="<?=GetMessage("AUTH_REMEMBER_ME")?>"><?echo GetMessage("AUTH_REMEMBER_SHORT")?></label>
<input type="checkbox" id="USER_REMEMBER_frm" name="USER_REMEMBER" value="Y" />
</div>
<?endif?>
<?if ($arResult["CAPTCHA_CODE"]):?>
<div class="form-group">
<?echo GetMessage("AUTH_CAPTCHA_PROMT")?>:<br />
<input type="hidden" name="captcha_sid" value="<?echo $arResult["CAPTCHA_CODE"]?>" />
<img src="/bitrix/tools/captcha.php?captcha_sid=<?echo $arResult["CAPTCHA_CODE"]?>" width="180" height="40" alt="CAPTCHA" /><br /><br />
<input type="text" name="captcha_word" maxlength="50" value="" />
</div>
<?endif?>
</div>
</div>
</div>
<div class="modal-footer">
<input type="submit" class="btn btn-default" data-dismiss="modal" name="Login" value="<?=GetMessage("AUTH_LOGIN_BUTTON")?>" />
<?if($arResult["NEW_USER_REGISTRATION"] == "Y"):?>
<a href="#modal-registration" data-dismiss="modal" data-toggle="modal" href="<?=$arResult["AUTH_REGISTER_URL"]?>" rel="nofollow"><?=GetMessage("AUTH_REGISTER")?></a>
<?endif?>
<noindex><a href="<?=$arResult["AUTH_FORGOT_PASSWORD_URL"]?>" rel="nofollow"><?=GetMessage("AUTH_FORGOT_PASSWORD_2")?></a></noindex>
<?if($arResult["AUTH_SERVICES"]):?>
<div class="bx-auth-lbl"><?=GetMessage("socserv_as_user_form")?></div>
<?
$APPLICATION->IncludeComponent("bitrix:socserv.auth.form", "icons",
array(
"AUTH_SERVICES"=>$arResult["AUTH_SERVICES"],
"SUFFIX"=>"form",
),
$component,
array("HIDE_ICONS"=>"Y")
);
?>
<?endif?>
</div>
<input type="hidden" name="AJAX-ACTION" value="AUTH"/>
</form>
<?if($arResult["AUTH_SERVICES"]):?>
<?
$APPLICATION->IncludeComponent("bitrix:socserv.auth.form", "",
array(
"AUTH_SERVICES"=>$arResult["AUTH_SERVICES"],
"AUTH_URL"=>$arResult["AUTH_URL"],
"POST"=>$arResult["POST"],
"POPUP"=>"Y",
"SUFFIX"=>"form",
),
$component,
array("HIDE_ICONS"=>"Y")
);
?>
<?endif?>
<?
elseif($arResult["FORM_TYPE"] == "otp"):
?>
<div class="modal-header">
<button type="button" class="close" data-dismiss="modal">×</button>
<h4 class="modal-title">Вход в личный кабинет</h4>
</div>
<fo rm role="form" name="system_auth_form<?=$arResult["RND"]?>" method="post" target="_top" action="<?=$arResult["AUTH_URL"]?>">
<input type="hidden" name="AJAX-ACTION" value="AUTH"/>
<?if($arResult["BACKURL"] <> ''):?>
<input type="hidden" name="backurl" value="<?=$arResult["BACKURL"]?>" />
<?endif?>
<input type="hidden" name="AUTH_FORM" value="Y" />
<input type="hidden" name="TYPE" value="OTP" />
<div class="modal-body">
<div class="row">
<div class="col-md-12">
<div class="form-group">
<label><?echo GetMessage("auth_form_comp_otp")?></label>
<input type="text" name="USER_OTP" maxlength="50" value="" size="17" autocomplete="off" />
</div>
<?if ($arResult["CAPTCHA_CODE"]):?>
<div class="form-group">
<?echo GetMessage("AUTH_CAPTCHA_PROMT")?>:<br />
<input type="hidden" name="captcha_sid" value="<?echo $arResult["CAPTCHA_CODE"]?>" />
<img src="/bitrix/tools/captcha.php?captcha_sid=<?echo $arResult["CAPTCHA_CODE"]?>" width="180" height="40" alt="CAPTCHA" /><br /><br />
<input type="text" name="captcha_word" maxlength="50" value="" />
</div>
<?endif?>
<?if ($arResult["REMEMBER_OTP"] == "Y"):?>
<div class="form-group">
<input type="checkbox" id="OTP_REMEMBER_frm" name="OTP_REMEMBER" value="Y" />
<label for="OTP_REMEMBER_frm" title="<?echo GetMessage("auth_form_comp_otp_remember_title")?>"><?echo GetMessage("auth_form_comp_otp_remember")?></label>
</div>
<?endif?>
</div>
</div>
</div>
<div class="modal-footer">
<input type="submit" name="Login" value="<?=GetMessage("AUTH_LOGIN_BUTTON")?>" /></td>
<noindex><a href="<?=$arResult["AUTH_LOGIN_URL"]?>" rel="nofollow"><?echo GetMessage("auth_form_comp_auth")?></a></noindex>
</div>
<input type="hidden" name="AJAX-ACTION" value="AUTH"/>
</form>
<?
else:
?>
<div class="modal-header">
<button type="button" class="close" data-dismiss="modal">×</button>
<h4 class="modal-title">Вход в личный кабинет</h4>
</div>
<fo rm role="form" action="<?=$arResult["AUTH_URL"]?>">
<input type="hidden" name="AJAX-ACTION" value="AUTH"/>
<div class="modal-body">
<div class="row">
<div class="col-md-12">
<?=$arResult["USER_NAME"]?><br />
[<?=$arResult["USER_LOGIN"]?>]<br />
<a href="<?=$arResult["PROFILE_URL"]?>" title="<?=GetMessage("AUTH_PROFILE")?>"><?=GetMessage("AUTH_PROFILE")?></a><br />
</div>
</div>
</div>
<div class="modal-footer">
<?foreach ($arResult["GET"] as $key => $value):?>
<input type="hidden" name="<?=$key?>" value="<?=$value?>" />
<?endforeach?>
<input type="hidden" name="logout" value="yes" />
<input type="submit" name="logout_butt" value="<?=GetMessage("AUTH_LOGOUT_BUTTON")?>" />
</div>
<input type="hidden" name="AJAX-ACTION" value="AUTH"/>
</form>
<?endif?>
</div>
</div>
</div>
|