Setting cpeprovisioning_enabled when adding install date

This commit is contained in:
Frank Schubert
2021-11-18 22:21:46 +01:00
parent 48620673ff
commit 82d29a6e2b
2 changed files with 14 additions and 2 deletions

View File

@@ -828,6 +828,7 @@
<button class="btn btn-outline-danger ml-1" id="vororttermin-delete-<?=$order->id?>" type="button" title="Vororttermin speichern" onclick="saveVororttermin(<?=$order->id?>, true)"><i class="fas fa-trash"></i></button>
</div>
</div>
<small id="vororttermin-<?=$order->id?>-error" class="text-danger hidden">Fehler beim Speichern!</small>
</div>
<div class="form-group col-lg-4 col-md-6 text-center">
@@ -1047,13 +1048,14 @@
if(data.order.date) {
$('#date-pill-' + id + '-install_date').html('Vorortinstallation: <span class="text-monospace"><span class="text-success">' + data.order.date + '</span></span>');
$('#date-pill-' + id + '-install_date').addClass("active");
$('#cpeprovisioning_enabled-' + id).prop("checked",true);
} else {
$('#date-pill-' + id + '-install_date').removeClass("active");
$('#date-pill-' + id + '-install_date').html('Vorortinstallation: <span class="text-monospace"><span class="text-success">--.--.----</span></span>');
$('#vororttermin-' + id).val("");
$('#cpeprovisioning_enabled-' + id).prop("checked",false);
}
setTimeout(function() {
$('#vororttermin-' + id).removeClass("is-valid");
$('#vororttermin-button-' + id).removeClass("btn-outline-success");
@@ -1065,6 +1067,9 @@
$('#vororttermin-button-' + id).removeClass("btn-outline-primary");
$('#vororttermin-' + id).addClass("is-invalid");
$('#vororttermin-' + id).removeClass("is-valid");
$('#vororttermin-' + id + '-error').text(data.msg);
$('#vororttermin-' + id + '-error').show();
}
},
"json"