added onetime payment in Order/Form
This commit is contained in:
@@ -180,7 +180,7 @@
|
||||
<div class="form-group row">
|
||||
<label class="col-lg-2 col-form-label" for="price">Verkaufspreis Netto (Periodisch) *</label>
|
||||
<div class="col-lg-10">
|
||||
<input type="text" name="price" id="price" class="form-control" value="<?=$this::dotToComma($product->price)?>" />
|
||||
<input type="text" name="price" id="price" class="form-control" value="<?=$this::dotToComma($product->price)?>" <?=(!$product->billing_period && !(float)$product->price) ? "disabled='disabled'" : ""?> />
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group row">
|
||||
@@ -334,7 +334,18 @@
|
||||
$('#producttech_form').hide();
|
||||
}
|
||||
});
|
||||
|
||||
|
||||
$("#billing_period").change(() => {
|
||||
var price = Number.parseFloat($("#price").val().replace(",","."));
|
||||
var period = Number.parseInt($("#billing_period").val());
|
||||
|
||||
if(!period && !price) {
|
||||
$("#price").prop("disabled", true);
|
||||
} else {
|
||||
$("#price").prop("disabled", false);
|
||||
}
|
||||
});
|
||||
|
||||
// disable mousewheel on input number field when in focus
|
||||
$('form').on('focus', 'input[type=number]', function (e) {
|
||||
$(this).on('wheel.disableScroll', function (e) {
|
||||
|
||||
Reference in New Issue
Block a user