diff --git a/Layout/default/Cpeshipping/Index.php b/Layout/default/Cpeshipping/Index.php index 549997d9a..9a8ac1fd5 100644 --- a/Layout/default/Cpeshipping/Index.php +++ b/Layout/default/Cpeshipping/Index.php @@ -58,7 +58,7 @@ -
"> + "> @@ -73,8 +73,14 @@
Versand
orderproduct->product->attributes) && $c->orderproduct->product->attributes['hostnetwork_order']->value): ?> - + + external_finished) ? "checked='checked'" : ""?> /> + external_finished_by) ? "title='Vorleistungsdienst bestellt von ".$c->external_finisher->name." (".$c->external_finisher->address->getCompanyOrName(true).")'" : ""?>> + external_finished_by): ?> + external_finished_by) ? $c->external_finisher->getAbbrName() : ""?> + + nicht erforderlich @@ -89,7 +95,8 @@
- + +
@@ -143,11 +150,11 @@ var error = false; - $('input[name^=external_finish-]').each(function() { - var id_match = $(this).attr("name").match(/external_finish-(\d+)$/); + $('input[id^=external_finish-]').each(function() { + var id_match = $(this).attr("id").match(/external_finish-(\d+)$/); var id = id_match[1]; - if(!$("input[name^=external_finish-").is(":checked")) { + if(!$("input[id^=external_finish-").is(":checked")) { if($("#ship-" + id).is(":checked")) { error = true; $("#ship-error-" + id).show(); diff --git a/Layout/default/Order/Form.php b/Layout/default/Order/Form.php index 29568af16..7469a1799 100644 --- a/Layout/default/Order/Form.php +++ b/Layout/default/Order/Form.php @@ -1,4 +1,6 @@ - + @@ -260,6 +262,12 @@ order_date) : date("d.m.Y")?>" /> +
+ +
+ +
+
Verzögerte Herstellung:
@@ -353,6 +361,11 @@ products) && count($order->products)): ?> products as $product): ?> + product->external == 1) { + $includes_external_product = true; + } + ?>
@@ -607,7 +620,7 @@
is("Admin", "netoperator")): ?> - id): ?> + id && !$includes_external_product): ?>
diff --git a/Layout/default/Order/Index.php b/Layout/default/Order/Index.php index 0e6b990e1..41bb7f507 100644 --- a/Layout/default/Order/Index.php +++ b/Layout/default/Order/Index.php @@ -76,6 +76,11 @@
+
+ + +
+
- $v): ?> + $v): ?> @@ -279,7 +284,9 @@ install_date) : ""?>" placeholder="--.--.----" />
+
+
@@ -555,9 +562,9 @@ "> - $v): ?> + $v): ?> - + @@ -610,6 +617,7 @@ install_date) : ""?>" placeholder="--.--.----" />
+
@@ -790,15 +798,18 @@ - function saveVororttermin(id) { + function saveVororttermin(id, removeDate = false) { date = $('#vororttermin-' + id).val(); - if(!date) { + if(removeDate) { + date = ""; + } + /*if(!date) { $('#vororttermin-button-' + id).addClass("btn-danger"); $('#vororttermin-button-' + id).removeClass("btn-outline-success"); $('#vororttermin-button-' + id).removeClass("btn-outline-primary"); $('#vororttermin-' + id).addClass("is-invalid"); return false; - } + }*/ $.post('', { @@ -815,8 +826,15 @@ $('#vororttermin-' + id).addClass("is-valid"); $('#vororttermin-' + id).removeClass("is-invalid"); - $('#date-pill-' + id + '-install_date').html('Vorortinstallation: ' + data.order.date + ''); - $('#date-pill-' + id + '-install_date').addClass("active"); + if(data.order.date) { + $('#date-pill-' + id + '-install_date').html('Vorortinstallation: ' + data.order.date + ''); + $('#date-pill-' + id + '-install_date').addClass("active"); + } else { + $('#date-pill-' + id + '-install_date').removeClass("active"); + $('#date-pill-' + id + '-install_date').html('Vorortinstallation: --.--.----'); + $('#vororttermin-' + id).val(""); + } + setTimeout(function() { $('#vororttermin-' + id).removeClass("is-valid"); diff --git a/Layout/default/topbar.php b/Layout/default/topbar.php index b2ee7f7ed..291d5d859 100644 --- a/Layout/default/topbar.php +++ b/Layout/default/topbar.php @@ -16,7 +16,7 @@