From 5e4ed0dea0940a795cd8a418e8e5d9ca622530d8 Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Fri, 29 Jul 2022 15:28:33 +0200 Subject: [PATCH] Update commonobject.class.php --- htdocs/core/class/commonobject.class.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/htdocs/core/class/commonobject.class.php b/htdocs/core/class/commonobject.class.php index 60c986b5531..ea58d599100 100644 --- a/htdocs/core/class/commonobject.class.php +++ b/htdocs/core/class/commonobject.class.php @@ -8189,7 +8189,7 @@ abstract class CommonObject $("select[name=\""+child_list+"\"] option[parent]").remove(); $("select[name=\""+child_list+"\"]").append(options); } - } elseif(val > 0) { + } else if(val > 0) { var options = orig_select.find("option[parent=\""+parentVal+"\"]").clone(); $("select[name=\""+child_list+"\"] option[parent]").remove(); $("select[name=\""+child_list+"\"]").append(options); @@ -8212,7 +8212,7 @@ abstract class CommonObject if ($("#"+child_list).val() == 0 && $("#"+parent_list).val() == 0){ $("#"+child_list).hide(); //Show mother lists - } elseif ($("#"+parent_list).val() != 0){ + } else if ($("#"+parent_list).val() != 0){ $("#"+parent_list).show(); } //Show the child list if the parent list value is selected