diff --git a/Layout/default/Linework/Index.php b/Layout/default/Linework/Index.php index 7adee780d..14d661e0a 100644 --- a/Layout/default/Linework/Index.php +++ b/Layout/default/Linework/Index.php @@ -610,13 +610,19 @@ function validateWorkflowItem(id) { console.log("abschlusstyp: " + $("#wfitem_abschlusstyp_" + id).val()); console.log("ist abschlusstyp: " + $("#wfitem_ist_abschlusstyp_" + id).val()); - if($("#wfitem_ist_abschlusstyp_" + id).val() == "SC/APC in FTU") { + if($("#wfitem_abschlusstyp_" + id).val() == "SC/APC in FTU") { required_fields["inhouse_cabling_supplied"] = "bool"; required_fields["inhouse_cabling_deployed"] = "bool"; - } else if($("#wfitem_abschlusstyp_" + id).val() == "SC/APC in FTU") { - required_fields["inhouse_cabling_supplied"] = "bool"; - required_fields["inhouse_cabling_deployed"] = "bool"; - } + } + if($("#wfitem_ist_abschlusstyp_" + id).val().length) { + if($("#wfitem_ist_abschlusstyp_" + id).val() == "SC/APC in FTU") { + required_fields["inhouse_cabling_supplied"] = "bool"; + required_fields["inhouse_cabling_deployed"] = "bool"; + } else { + delete required_fields["inhouse_cabling_supplied"]; + delete required_fields["inhouse_cabling_deployed"]; + } + } var missing = false; for(var field1 in required_fields) {