| Current Path : /var/www/homesaver/www/bitrix/modules/fermaofd.ferma/components/ |
| Current File : /var/www/homesaver/www/bitrix/modules/fermaofd.ferma/components/receipt-form.php |
<?php
function ofdferma_receiptForm($id, $action, $data)
{
?>
<form method="post" id="<?= htmlspecialcharsbx($id) ?>" action="<?= $action ?>">
<table class="ofd-receipt-table adm-detail-content-table edit-table" style="min-width: auto; width: auto">
<tbody>
<tr data-role="field-container">
<td width="40%" class="adm-detail-content-cell-l">
<label for="email-input"><?= GetMessage('FERMAOFD_EMAIL') ?>:</label>
</td>
<td width="60%" class="adm-detail-content-cell-r">
<input type="email" name="email" id="email-input"
value="<? echo htmlspecialcharsbx($data['Email']) ?>"
size="30" minlength="6" maxlength="255">
</td>
</tr>
<tr data-role="field-container">
<td width="40%" class="adm-detail-content-cell-l">
<label for="phone-input"><?= GetMessage('FERMAOFD_PHONE') ?>:</label>
</td>
<td width="60%" class="adm-detail-content-cell-r">
<input type="text" name="phone" id="phone-input"
value="<? echo htmlspecialcharsbx($data['Phone']) ?>"
size="30" minlength="11" maxlength="12">
</td>
</tr>
<tr>
<td width="40%" class="adm-detail-content-cell-l">
<label><?= GetMessage('FERMAOFD_TOTAL_RECEIPT_SUM') ?>:</label>
</td>
<td width="60%" class="adm-detail-content-cell-r ofd-receipt-table__summ">
<span id="ofd-receipt-summ">0.00</span> <?= GetMessage('FERMAOFD_RUB') ?>
</td>
</tr>
<tr class="divider">
<td colspan="2">
<div class="adm-info-message-wrap adm-info-message-red"
id="min-price-attention"
style="display: none">
<div class="adm-info-message">
<span><?= GetMessage('FERMAOFD_TOTAL_RECEIPT_SUM_TOO_SHORT') ?></span>
<div class="adm-info-message-icon"></div>
</div>
</div>
<div class="adm-info-message-wrap adm-info-message-red"
id="max-price-attention"
style="display: none">
<div class="adm-info-message">
<span><?= GetMessage('FERMAOFD_TOTAL_RECEIPT_SUM_TOO_MACH') ?></span>
<div class="adm-info-message-icon"></div>
</div>
</div>
</td>
</tr>
<tr class="heading">
<td colspan="2"><?= GetMessage('FERMAOFD_PRODUCTS_LIST') ?></td>
</tr>
<tr>
<td colspan="2" id="receipt-items">
<!-- placeholder for dynamic content -->
</td>
</tr>
</tbody>
</table>
<div class="ofd-actions">
<input type="button" id="add-item-btn"
value="<?= GetMessage('FERMAOFD_ADD_PRODUCT') ?>"
title="<?= GetMessage('FERMAOFD_ADD_PRODUCT_TITLE') ?>"
style="float: right;">
<input type="submit" name="Update" class="adm-btn-save"
value="<?= GetMessage('FERMAOFD_SUBMIT') ?>"
title="<?= GetMessage('FERMAOFD_SUBMIT_TITLE') ?>">
<input type="button" name="Cancel" id="cancel-btn"
value="<?= GetMessage('MAIN_OPT_CANCEL') ?>"
title="<?= GetMessage('MAIN_OPT_CANCEL_TITLE') ?>">
</div>
<?= bitrix_sessid_post(); ?>
</form>
<?php
}