Fix add multiple tags at once into a module definition

This commit is contained in:
fbsanchez 2021-06-24 19:58:08 +02:00
parent eec373e896
commit 7e178ed18c
1 changed files with 1 additions and 1 deletions

View File

@ -1386,7 +1386,7 @@ $(document).ready (function () {
tag_name = $(value).html();
if (tag_name != <?php echo "'".__('None')."'"; ?>) {
$("select[name='id_tag_selected[]']").append(value);
$("#id_tag_available").find("option[value='" + id_tag + "']").remove();
$("#id_tag_available").find("option[value='" + tag_name + "']").remove();
$("#id_tag_selected").find("option[value='']").remove();
if($("#id_tag_available option").length == 0) {
$("select[name='id_tag_available[]']").append(value);