From 625e98bb70fd639bcaaf0fe44a713e1dc6cdf3cd Mon Sep 17 00:00:00 2001
From: Laurent Giovannoni <laurent.giovannoni@maarch.org>
Date: Wed, 17 Oct 2018 19:05:34 +0200
Subject: [PATCH] FIX #8640 desactivate button to choose contact list if in
 edit mode

---
 modules/attachments/attachments_content.php | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/modules/attachments/attachments_content.php b/modules/attachments/attachments_content.php
index 02ef0f18b64..8c45fd3f57a 100755
--- a/modules/attachments/attachments_content.php
+++ b/modules/attachments/attachments_content.php
@@ -1200,7 +1200,7 @@ $content .= '<div class="transmissionDiv" id="addAttach1">';
         $content .= ' <input type="button" value="';
         $content .= _EDIT_MODEL;
         $content .= '" name="templateOffice_edit[]" id="templateOffice_edit" style="display:none;margin-top: 0" class="button" '
-            .'onclick="showAppletLauncher(this, \''.$_SESSION['doc_id'].'\',\''.$objectTable.'\',\'attachmentVersion\',\'attachment\');$(\'add\').value=\'Edition en cours ...\';editingDoc(this,\''.$_SESSION['user']['UserId'].'\');$(\'add\').disabled=\'disabled\';$(\'add\').style.opacity=\'0.5\';this.hide();$j(\'#\'+this.id).parent().find(\'[name=templateOffice\\\\[\\\\]]\').css(\'width\',\'206px\');"/>';
+            .'onclick="if($(\'selectContactIdRes\')){$(\'selectContactIdRes\').disabled=\'disabled\'};showAppletLauncher(this, \''.$_SESSION['doc_id'].'\',\''.$objectTable.'\',\'attachmentVersion\',\'attachment\');$(\'add\').value=\'Edition en cours ...\';editingDoc(this,\''.$_SESSION['user']['UserId'].'\');$(\'add\').disabled=\'disabled\';$(\'add\').style.opacity=\'0.5\';this.hide();$j(\'#\'+this.id).parent().find(\'[name=templateOffice\\\\[\\\\]]\').css(\'width\',\'206px\');"/>';
         $content .= '<iframe style="display:none; width:210px" name="choose_file" id="choose_file" frameborder="0" scrolling="no" height="25" src="'.$_SESSION['config']['businessappurl']
             .'index.php?display=true&module=attachments&page=choose_attachment"></iframe>';
 
-- 
GitLab