| Current Path : /var/www/homesaver/www/bitrix/components/bitrix/form.result.new/templates/.default/ |
| Current File : /var/www/homesaver/www/bitrix/components/bitrix/form.result.new/templates/.default/template.php |
<?php
if (!defined("B_PROLOG_INCLUDED") || B_PROLOG_INCLUDED !== true)
{
die();
}
/**
* @var array $arResult
*/
if ($arResult["isFormErrors"] == "Y"):?><?=$arResult["FORM_ERRORS_TEXT"];?><?endif;?>
<?= $arResult["FORM_NOTE"] ?? '' ?>
<?if ($arResult["isFormNote"] != "Y")
{
?>
<?=$arResult["FORM_HEADER"]?>
<table>
<?
if ($arResult["isFormDescription"] == "Y" || $arResult["isFormTitle"] == "Y" || $arResult["isFormImage"] == "Y")
{
?>
<tr>
<td><?
if ($arResult["isFormTitle"])
{
?>
<h3><?=$arResult["FORM_TITLE"]?></h3>
<?
} //endif ;
if ($arResult["isFormImage"] == "Y")
{
?>
<a href="<?=$arResult["FORM_IMAGE"]["URL"]?>" target="_blank" alt="<?=GetMessage("FORM_ENLARGE")?>"><img src="<?=$arResult["FORM_IMAGE"]["URL"]?>" <?if($arResult["FORM_IMAGE"]["WIDTH"] > 300):?>width="300" <?elseif($arResult["FORM_IMAGE"]["HEIGHT"] > 200):?>height="200"<?else:?><?=$arResult["FORM_IMAGE"]["ATTR"]?><?endif;?> hspace="3" vscape="3" border="0" alt=""/></a>
<?//=$arResult["FORM_IMAGE"]["HTML_CODE"]?>
<?
} //endif
?>
<p><?=$arResult["FORM_DESCRIPTION"]?></p>
</td>
</tr>
<?
} // endif
?>
</table>
<br />
<table class="form-table data-table">
<thead>
<tr>
<th colspan="2"> </th>
</tr>
</thead>
<tbody>
<?
foreach ($arResult["QUESTIONS"] as $FIELD_SID => $arQuestion)
{
if ($arQuestion['STRUCTURE'][0]['FIELD_TYPE'] == 'hidden')
{
echo $arQuestion["HTML_CODE"];
}
else
{
?>
<tr>
<td>
<?if (isset($arResult["FORM_ERRORS"][$FIELD_SID])):?>
<span class="error-fld" title="<?=htmlspecialcharsbx($arResult["FORM_ERRORS"][$FIELD_SID])?>"></span>
<?endif;?>
<?=$arQuestion["CAPTION"]?><?if ($arQuestion["REQUIRED"] == "Y"):?><?=$arResult["REQUIRED_SIGN"];?><?endif;?>
<?=$arQuestion["IS_INPUT_CAPTION_IMAGE"] == "Y" ? "<br />".$arQuestion["IMAGE"]["HTML_CODE"] : ""?>
</td>
<td><?=$arQuestion["HTML_CODE"]?></td>
</tr>
<?
}
} //endwhile
?>
<?
if($arResult["isUseCaptcha"] == "Y")
{
?>
<tr>
<th colspan="2"><b><?=GetMessage("FORM_CAPTCHA_TABLE_TITLE")?></b></th>
</tr>
<tr>
<td> </td>
<td><input type="hidden" name="captcha_sid" value="<?=htmlspecialcharsbx($arResult["CAPTCHACode"]);?>" /><img src="/bitrix/tools/captcha.php?captcha_sid=<?=htmlspecialcharsbx($arResult["CAPTCHACode"]);?>" width="180" height="40" alt=""/></td>
</tr>
<tr>
<td><?=GetMessage("FORM_CAPTCHA_FIELD_TITLE")?><?=$arResult["REQUIRED_SIGN"];?></td>
<td><input type="text" name="captcha_word" size="30" maxlength="50" value="" class="inputtext" /></td>
</tr>
<?
} // isUseCaptcha
?>
</tbody>
<tfoot>
<tr>
<th colspan="2">
<input <?=(intval($arResult["F_RIGHT"]) < 10 ? "disabled=\"disabled\"" : "");?> type="submit" name="web_form_submit" value="<?=htmlspecialcharsbx(trim($arResult["arForm"]["BUTTON"]) == '' ? GetMessage("FORM_ADD") : $arResult["arForm"]["BUTTON"]);?>" />
<?if ($arResult["F_RIGHT"] >= 15):?>
<input type="hidden" name="web_form_apply" value="Y" /><input type="submit" name="web_form_apply" value="<?=GetMessage("FORM_APPLY")?>" />
<?endif;?>
<input type="reset" value="<?=GetMessage("FORM_RESET");?>" />
</th>
</tr>
</tfoot>
</table>
<p>
<?=$arResult["REQUIRED_SIGN"];?> - <?=GetMessage("FORM_REQUIRED_FIELDS")?>
</p>
<?=$arResult["FORM_FOOTER"]?>
<?
} //endif (isFormNote)