From a2f19e4f84661d86bcbd349d37d5d39267bf52f0 Mon Sep 17 00:00:00 2001
From: Nestor <npegane@hotmail.com>
Date: Fri, 6 Oct 2017 10:01:52 +0200
Subject: [PATCH] =?UTF-8?q?FEAT=20#5920=20champ=20allong=C3=A9s=20pour=20l?=
 =?UTF-8?q?es=20pages=20d'indexation=20et=20validation?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit

---
 apps/maarch_entreprise/actions/process.php    | 27 +++++++++----------
 .../indexing_searching/change_doctype.php     |  4 +--
 .../indexing_searching/details.php            |  2 +-
 3 files changed, 16 insertions(+), 17 deletions(-)

diff --git a/apps/maarch_entreprise/actions/process.php b/apps/maarch_entreprise/actions/process.php
index 3eeede66100..bd5edf92b41 100755
--- a/apps/maarch_entreprise/actions/process.php
+++ b/apps/maarch_entreprise/actions/process.php
@@ -342,21 +342,20 @@ function get_form_txt($values, $path_manage_action,  $id_action, $table, $module
                 $frm_str .= '<td width="50%" align="left"><span class="form_title_process" >'
                           . $indexes[$key]['label'] . ' :</span></td>';
                 $frm_str .= '<td>';
-                $frm_str .= '<input type="text" name="' . $key . '" id="'
-                          . $key . '" readonly="readonly" class="readonly" style="border:none;" ';
-                if ($indexes[$key]['type_field'] == 'input') {
-                    $frm_str .= ' value="'.$values_fields->{$key}.'" ';
-                } else {
-                    $val = '';
-                    for ($i=0; count($indexes[$key]['values']); $i++) {
-                        if ($values_fields->{$key} == $indexes[$key]['values'][$i]['id']) {
-                            $val =     $indexes[$key]['values'][$i]['label'];
-                            break;
-                        }
-                    }
-                    $frm_str .= ' value="'.$val.'" ';
+                $frm_str .= '<textarea name="'.$key.'"';
+                $frm_str .= ' id="'.$key.'"';
+                if (!isset($indexes[$key]['readonly']) || $indexes[$key]['readonly'] == true)
+                { 
+                    $frm_str.='readonly="readonly" class="readonly"';
                 }
-                $frm_str .= ' />';
+                else if ($indexes[$key]['type'] == 'date')
+                {
+                    $frm_str.= 'onclick="showCalender(this);"';
+                }
+                $frm_str .= 'style="width: 200px; max-width: 150px; border: medium none; color: rgb(102, 102, 102); height: 60px;"';
+                $frm_str .=  'title="'.$indexes[$key]['show_value'].'" alt="'.$indexes[$key]['show_value'].'" >'.$values_fields->{$key};
+                $frm_str .= '</textarea>';
+
                 $frm_str .= '</td >';
             $frm_str .= '</tr>';
         }
diff --git a/apps/maarch_entreprise/indexing_searching/change_doctype.php b/apps/maarch_entreprise/indexing_searching/change_doctype.php
index 76aa218f92c..e5d32f0cdf1 100755
--- a/apps/maarch_entreprise/indexing_searching/change_doctype.php
+++ b/apps/maarch_entreprise/indexing_searching/change_doctype.php
@@ -180,7 +180,7 @@ if(count($indexes) > 0)
                     $opt_indexes .= '" onclick="clear_error(\'frm_error_' 
                         . $id_action . '\');showCalender(this);"/>';
                 } else {
-                    $opt_indexes .= '<input name="'.functions::xssafe($key).'" type="text" id="' 
+                    $opt_indexes .= '<textarea name="'.functions::xssafe($key).'" type="text" id="'                     
                         . $key . '" value="';
                     if (isset($values_fields->{$key})) {
                         $opt_indexes .= functions::show_string(
@@ -192,7 +192,7 @@ if(count($indexes) > 0)
                         );
                     }
                     $opt_indexes .= '" onclick="clear_error(\'frm_error_' 
-                        . $id_action . '\');" />';
+                        . $id_action . '\');"></textarea>';
                 }
             } else {
                 $opt_indexes .= '<select name="'.functions::xssafe($key).'" id="'.functions::xssafe($key).'" >';
diff --git a/apps/maarch_entreprise/indexing_searching/details.php b/apps/maarch_entreprise/indexing_searching/details.php
index c84bded9698..a41c0f0716c 100755
--- a/apps/maarch_entreprise/indexing_searching/details.php
+++ b/apps/maarch_entreprise/indexing_searching/details.php
@@ -1160,7 +1160,7 @@ if ((!empty($_SESSION['error']) && ! ($_SESSION['indexation'] ))  )
                                     if ($indexes[$key]['type_field'] == 'input')
                                     {
                                         ?>
-                                        <textarea name="<?php functions::xecho($key);?>" id="<?php functions::xecho($key);?>" value="<?php functions::xecho($indexes[$key]['show_value']);?>" <?php if (!isset($indexes[$key]['readonly']) || $indexes[$key]['readonly'] == true){ echo 'readonly="readonly" class="readonly"';}else if ($indexes[$key]['type'] == 'date'){echo 'onclick="showCalender(this);"';}?> style="width: 200px; "  title="<?php functions::xecho($indexes[$key]['show_value']);?>" alt="<?php functions::xecho($indexes[$key]['show_value']);?>" ></textarea>
+                                        <textarea name="<?php functions::xecho($key);?>" id="<?php functions::xecho($key);?>" <?php if (!isset($indexes[$key]['readonly']) || $indexes[$key]['readonly'] == true){ echo 'readonly="readonly" class="readonly"';}else if ($indexes[$key]['type'] == 'date'){echo 'onclick="showCalender(this);"';}?> style="width: 200px; "  title="<?php functions::xecho($indexes[$key]['show_value']);?>" alt="<?php functions::xecho($indexes[$key]['show_value']);?>" ><?php functions::xecho($indexes[$key]['show_value']);?></textarea>
                                         <?php
                                     }
                                     else
-- 
GitLab