Files
grzanieplus.pl/plugins/stPaczkomatyPlugin/modules/stPaczkomatyBackend/templates/_insurance.php
2025-03-12 17:06:23 +01:00

27 lines
841 B
PHP

<?php
/**
* @var PaczkomatyPack $paczkomaty_pack
*/
$currency = 'PLN';
if (!$paczkomaty_pack->isAdminGeneratorPlainField())
{
$insuranceAmount = $paczkomaty_pack->getInsurance() ? $paczkomaty_pack->getInsurance() : $paczkomaty_pack->getInsurance(true);
echo st_admin_optional_input('paczkomaty_pack[insurance]', st_price_format($insuranceAmount), array(
'size' => 7,
'disabled' => !$paczkomaty_pack->getInsurance() && !$paczkomaty_pack->hasAllegroInsurance()
)) . ' ' . $currency;
}
else
{
echo stPrice::round($paczkomaty_pack->getInsurance()) . ' ' . $currency;
}
?>
<script type="text/javascript" language="javascript">
jQuery(function($) {
$('#paczkomaty_pack_insurance').change(function() {
$(this).val(stPrice.fixNumberFormat($(this).val()));
});
});
</script>