From 2e18638fbfbd44c0f4ba64945662115d8ea49fe7 Mon Sep 17 00:00:00 2001
From: "florian.azizian" <florian.azizian@maarch.org>
Date: Wed, 24 Oct 2018 16:58:56 +0100
Subject: [PATCH] FEAT #7888 (ixbus) esignature/mansignature +
 process_limit_date

---
 .../actions/sendToExternalSignatureBook.php                 | 2 +-
 modules/visa/class/IxbusController.php                      | 6 +++---
 2 files changed, 4 insertions(+), 4 deletions(-)

diff --git a/apps/maarch_entreprise/actions/sendToExternalSignatureBook.php b/apps/maarch_entreprise/actions/sendToExternalSignatureBook.php
index 4395a56d89c..6d98306e05d 100644
--- a/apps/maarch_entreprise/actions/sendToExternalSignatureBook.php
+++ b/apps/maarch_entreprise/actions/sendToExternalSignatureBook.php
@@ -119,7 +119,7 @@ function manage_form($arr_id, $history, $id_action, $label_action, $status, $col
                 $nature             = get_value_fields($values_form, 'nature');
                 $messageModel       = get_value_fields($values_form, 'messageModel');
                 $manSignature       = get_value_fields($values_form, 'mansignature');
-                $attachmentToFreeze = IxbusController::sendDatas(['config' => $config, 'resIdMaster' => $res_id, 'loginIxbus' => $loginIxbus, 'passwordIxbus' => $passwordIxbus, 'classeurName' => $nature, 'messageModel' => $messageModel, 'manSignature' => var_export($manSignature, true)]);
+                $attachmentToFreeze = IxbusController::sendDatas(['config' => $config, 'resIdMaster' => $res_id, 'loginIxbus' => $loginIxbus, 'passwordIxbus' => $passwordIxbus, 'classeurName' => $nature, 'messageModel' => $messageModel, 'manSignature' => $manSignature]);
             } elseif ($config['id'] == 'iParapheur') {
                 include_once 'modules/visa/class/IParapheurController.php';
                 $attachmentToFreeze = IParapheurController::sendDatas(['config' => $config, 'resIdMaster' => $res_id]);
diff --git a/modules/visa/class/IxbusController.php b/modules/visa/class/IxbusController.php
index 2bc38b41e39..ce51b58f7a5 100755
--- a/modules/visa/class/IxbusController.php
+++ b/modules/visa/class/IxbusController.php
@@ -32,7 +32,7 @@ class IxbusController
         $html .= '</select><br /><br />';
 
         $html .= '<label for="messageModel">' . _WORKFLOW_MODEL_IXBUS . '</label><select name="messageModel" id="messageModel">';
-        foreach ($initializeDatas['messagesModel'] as $key => $value) {
+        foreach ($initializeDatas['messagesModel'] as $value) {
             $html .= '<option value="';
             $html .= $value;
             $html .= '">';
@@ -42,7 +42,7 @@ class IxbusController
         $html .= '</select><br /><br />';
         $html .= '<label for="loginIxbus">'._ID_IXBUS.'</label><input name="loginIxbus" id="loginIxbus"/><br /><br />';
         $html .= '<label for="passwordIxbus">'._PASSWORD_IXBUS.'</label><input type="password" name="passwordIxbus" id="passwordIxbus"/><br /><br />';
-        $html .= _ESIGN . '<input type="radio" name="mansignature" id="esignature" value="false" checked="checked" />' . _HANDWRITTEN_SIGN .'<input type="radio" name="mansignature" id="signature" value="true" /><br /><br />';
+        $html .= _ESIGN . '<input type="radio" name="mansignature" id="mansignature" value="false" checked="checked" />' . _HANDWRITTEN_SIGN .'<input type="radio" name="mansignature" id="mansignature" value="true" /><br /><br />';
 
         return $html;
     }
@@ -283,7 +283,7 @@ class IxbusController
 
             $mainResource = \Resource\models\ResModel::getExtById(['resId' => $aArgs['resIdMaster'], 'select' => ['process_limit_date']]);
             if (empty($mainResource['process_limit_date'])) {
-                $processLimitDate = $mainResource['process_limit_date'] = date('Y-m-d', strtotime(date("Y-m-d"). ' + 7 days'));
+                $processLimitDate = date('Y-m-d', strtotime(date("Y-m-d"). ' + 14 days'));
             } else {
                 $processLimitDateTmp = explode(" ", $mainResource['process_limit_date']);
                 $processLimitDate = $processLimitDateTmp[0];
-- 
GitLab