From 6a05d994267b9fdce75cdf98866d0272b9b7e91b Mon Sep 17 00:00:00 2001
From: Alex ORLUC <alex.orluc@maarch.org>
Date: Tue, 8 Jan 2019 16:48:59 +0100
Subject: [PATCH] FIX #9250 no select entity of indexing model if disabled

---
 apps/maarch_entreprise/js/indexing.js | 6 +++++-
 1 file changed, 5 insertions(+), 1 deletion(-)

diff --git a/apps/maarch_entreprise/js/indexing.js b/apps/maarch_entreprise/js/indexing.js
index 07168b4a3aa..ac37f4500af 100755
--- a/apps/maarch_entreprise/js/indexing.js
+++ b/apps/maarch_entreprise/js/indexing.js
@@ -1842,7 +1842,11 @@ function loadIndexingModel(actionId) {
 
                     $j.each(content, function( index, value ) {
                         if ($j('#'+index).length) {
-                            $j('#'+index).val(value);
+                            if (index == 'destination' && $j('#'+index+' option[value="'+value+'"]').is(':disabled')) {
+                                //do nothing
+                            } else {
+                                $j('#'+index).val(value);
+                            }
                             $j('#category_id').change();
 
                             if ($j('#'+index).is('select') && index != 'thesaurus') {
-- 
GitLab