на сайте имеется две формы, коды которых присутствуют непосредственно в теле страницы, на что, конечно же, ругаются сеошники
первая форма находится в шапке и подгружается через компонент top10:callback_with_range
вот код шаблона этого компонента:
вторая форма жёстко прописана в шаблоне компонента bitrix:catalog.element
кнопка:
и сам код формы:
возможно ли вынести коды форм в отдельно подгружаемые файлы типа ajax, безболезненно?
заранее благодарю за помощь!
первая форма находится в шапке и подгружается через компонент top10:callback_with_range
вот код шаблона этого компонента:
| Код |
|---|
<?if(!defined("B_PROLOG_INCLUDED") || B_PROLOG_INCLUDED!==true)die();?>
<a class="top10_popup-with-form" href="#top10_feedback"><?=GetMessage("TOP10_BTN");?></a>
<div
id="top10_feedback"
class="top10_black-popup-block mfp-hide"
data-time-min="<?=$arResult["TIME_MIN"];?>"
data-time-max="<?=$arResult["TIME_MAX"];?>"
data-time-step="<?=$arParams["TIME_STEP"];?>">
<header><?=GetMessage("TOP10_CALLBACK_FORM");?></header>
<section class="top10_left">
<strong><?=GetMessage("TOP10_CALLBACK_JUST_CALL");?></strong>
<div class="top10_phone"><?=$arParams["PHONE"];?></div>
<?$APPLICATION->IncludeComponent(
"bitrix:main.include",
"",
Array(
"AREA_FILE_SHOW" => "sect",
"AREA_FILE_SUFFIX" => "top10_callback_plus",
"AREA_FILE_RECURSIVE" => "Y",
"EDIT_TEMPLATE" => ""
), $component, array("HIDE_ICONS" => "Y")
);?>
</section>
<section class="top10_right">
<?
$actionPage = $APPLICATION->GetCurPage();
if(strpos($actionPage, "index.php") !== false) $actionPage = $APPLICATION->GetCurDir();
?>
<strong><?=GetMessage("TOP10_CALLBACK_INPUT_PHONE");?></strong>
<div class="top10_phone-input">
<input type="text" name="PHONE" title="<?=GetMessage("TOP10_INPUT_PHONE");?>" maxlength="30" form="top10_feedback-form"
placeholder="<?=GetMessage("TOP10_EXAMPLE");?>: <?=$arParams["PHONE"];?>" pattern="\d+.*" required="" />
</div>
<p><?=GetMessage("TOP10_CALLBACK_WHEN");?></p>
<div id="top10_slider-time-range"></div>
<input form="top10_feedback-form" type="hidden" name="TIME_MIN" id="top10_slider-time-range-min" value="<?=$arResult["TIME_START"];?>" />
<input form="top10_feedback-form" type="hidden" name="TIME_MAX" id="top10_slider-time-range-max" value="<?=$arResult["TIME_FINISH"];?>" />
<p><?=GetMessage("TOP10_CALLBACK_FREE");?></p>
<div class="top10_button-call">
<input form="top10_feedback-form" type="hidden" name="AJAX" value="" />
<input form="top10_feedback-form" type="hidden" name="ASP-TR" value="" />
<input form="top10_feedback-form" type="submit" class="top10_submit" name="<?=GetMessage("TOP10_SUBMIT_NAME");?>" value="<?=GetMessage("TOP10_SUBMIT_VALUE");?>"/>
</div>
</section>
</div>
<fo rm id="top10_feedback-form" action="<?=$actionPage;?>" method="POST">
<?=bitrix_sessid_post();?>
</form>
<a class="top10_popup-success" href="#top10_feedback-success"></a>
<div
id="top10_feedback-success"
class="top10_black-popup-block-success mfp-hide">
<header><?=GetMessage("TOP10_CALLBACK_FORM");?></header>
<section><?=$arParams["SUCCESS_MSG"];?></section>
</div> |
вторая форма жёстко прописана в шаблоне компонента bitrix:catalog.element
кнопка:
| Код |
|---|
<button type="button" class="btn btn-danger btn-lg" data-toggle="modal" data-target="#order">Заказать сейчас</button> |
и сам код формы:
| Код |
|---|
<div class="modal fade" id="order" tabindex="-1" role="dialog" aria-labelledby="orderLabel" aria-hidden="true"> <fo rm role="form"> <div class="modal-dialog"> <div class="modal-content"> <div class="modal-header"> <button type="button" class="close" data-dismiss="modal" aria-hidden="true">Ч</button> <div class="modal-title f18" id="myModalLabel">Оформить заказ</h4> </div> <div class="modal-body"> <p class="bg-warning">Вы заказываете теплицу <?= $arResult["NAME"];?></p> <div class="form-group"> <label for="fname">Имя</label> <input type="text" class="form-control" id="fname" placeholder="Как мы можем к Вам обращаться?"> </div> <div class="form-group"> <label for="fphone">Телефон</label> <input type="text" class="form-control" id="fphone" placeholder="Как оперативно с Вами связаться"> </div> <div class="form-group"> <label for="length" >Длина теплицы</label> <select class="form-control" id="length"> <option>4 м.</option> <option>6 м.</option> <option>8 м.</option> <option>10 м.</option> </select> </div> <div class="form-group"> <label for="length" >Поликарбонат</label> <select class="form-control" id="poli"> <option>Нужна помощь в выборе</option> <option>Россия</option> <option>GREENHOUSE-NANO</option> <option>KARBOGLASS </option> </select> </div> <div class="form-group"> <label for="exampleInputPassword1">Комментарий</label> <textarea class="form-control" rows="3" id="fmessage"></textarea> </div> </div> <div class="modal-footer"> <button type="button" class="btn btn-default" data-dismiss="modal">Закрыть</button> <button type="button" class="btn btn-primary" oncl ick="send_order();">Заказать</button> </div> </div> </div> </form> </div> |
возможно ли вынести коды форм в отдельно подгружаемые файлы типа ajax, безболезненно?
заранее благодарю за помощь!
beverly hills, that's where i want to be, livin' in beverly hills, beverly hills, rolling like a celebrity, livin' in beverly hills