Merge pull request #16071 from atm-adrien/FIX/Linked_extrafields_alphaValue

FIX : Linked extrafields don't work with string value
This commit is contained in:
Laurent Destailleur 2021-01-27 19:36:13 +01:00 committed by GitHub
commit 34ce398033
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -7111,7 +7111,17 @@ abstract class CommonObject
{
var val = $("select[name=\""+parent_list+"\"]").val();
var parentVal = parent_list + ":" + val;
if(val > 0) {
if(typeof val == "string"){
if(val != "") {
var options = orig_select.find("option[parent=\""+parentVal+"\"]").clone();
$("select[name=\""+child_list+"\"] option[parent]").remove();
$("select[name=\""+child_list+"\"]").append(options);
} else {
var options = orig_select.find("option[parent]").clone();
$("select[name=\""+child_list+"\"] option[parent]").remove();
$("select[name=\""+child_list+"\"]").append(options);
}
} 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);