N°5655 - Fix regression from e5d67d22

Can't use "let" as this snippet seems to be evaluated several with the same variables 😭
This commit is contained in:
Molkobain
2022-12-12 23:38:55 +01:00
parent 8cced3a79e
commit 899f4fdc0a

View File

@@ -1,9 +1,9 @@
{% if oUIBlock.GetOption("select_mode") is not empty %}
let oSelectedItems{{ oUIBlock.GetOption('sListId')|sanitize(constant('utils::ENUM_SANITIZATION_FILTER_VARIABLE_NAME')) }} = [];
var oSelectedItems{{ oUIBlock.GetOption('sListId')|sanitize(constant('utils::ENUM_SANITIZATION_FILTER_VARIABLE_NAME')) }} = [];
{% if oUIBlock.GetOption("sSelectedRows") is not empty %}
oSelectedItems{{ oUIBlock.GetOption('sListId')|sanitize(constant('utils::ENUM_SANITIZATION_FILTER_VARIABLE_NAME')) }} = {{ oUIBlock.GetOption('sSelectedRows')|raw }};
{% endif %}
{% endif %}
let bSelectAllowed{{ oUIBlock.GetId()|sanitize(constant('utils::ENUM_SANITIZATION_FILTER_VARIABLE_NAME')) }} = false;
var bSelectAllowed{{ oUIBlock.GetId()|sanitize(constant('utils::ENUM_SANITIZATION_FILTER_VARIABLE_NAME')) }} = false;