noalyss-commit
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Noalyss-commit] [noalyss] 03/06: Task #1249 - Recherche dans CUSTOMER ,


From: Dany De Bontridder
Subject: [Noalyss-commit] [noalyss] 03/06: Task #1249 - Recherche dans CUSTOMER , SUPPLIER
Date: Mon, 14 Dec 2015 11:30:46 +0000

sparkyx pushed a commit to branch master
in repository noalyss.

commit f7b180b6217c083ca90251e308d8d31fd7619d5a
Author: Dany De Bontridder <address@hidden>
Date:   Sun Dec 13 23:29:06 2015 +0100

    Task #1249 - Recherche dans CUSTOMER , SUPPLIER
    
    #1249 : avoir un champs pour recherche
---
 include/adm.inc.php              |    4 ++--
 include/bank.inc.php             |    4 ++--
 include/contact.inc.php          |    3 ++-
 include/customer.inc.php         |    4 ++--
 include/lib/class_html_input.php |   11 +++++++++++
 include/manager.inc.php          |    3 ++-
 include/supplier.inc.php         |    4 ++--
 7 files changed, 23 insertions(+), 10 deletions(-)

diff --git a/include/adm.inc.php b/include/adm.inc.php
index 3308253..c6cf215 100644
--- a/include/adm.inc.php
+++ b/include/adm.inc.php
@@ -78,8 +78,8 @@ if ( $low_action == "list" )
        echo '<h2>' . "Exercice " . $g_user->get_exercice() . '</h2>';
        echo dossier::hidden();
         $a=(isset($_GET['query']))?$_GET['query']:"";
-        printf (_('Recherche').' <input class="input_text" type="text" 
name="query" value="%s">',
-                $a);
+        echo _("Cherche ").HtmlInput::filter_table_form("tiers_tb", '0,1,2', 
1,"query",$a);
+
         echo HtmlInput::request_to_hidden(array('ac'));
         $choice_cat=HtmlInput::default_value_request("choice_cat", 1);
         if ( $choice_cat == 1 )
diff --git a/include/bank.inc.php b/include/bank.inc.php
index d0b0a15..a0a265f 100644
--- a/include/bank.inc.php
+++ b/include/bank.inc.php
@@ -71,8 +71,8 @@ if ( $low_action == "list" )
        echo dossier::hidden();
        echo '<h2>' ._( "Exercice")." " . $g_user->get_exercice() . '</h2>';
     $a=(isset($_GET['query']))?$_GET['query']:"";
-    printf (_('Recherche').' <input class="input_text" type="text" 
name="query" value="%s">',
-            $a);
+    echo _("Cherche ").HtmlInput::filter_table_form("tiers_tb", '0,1,2', 
1,"query",$a);
+
      $choice_cat=HtmlInput::default_value_request("choice_cat", 1);
 
     if ( $choice_cat == 1 )
diff --git a/include/contact.inc.php b/include/contact.inc.php
index b4452b0..ec0f3c0 100644
--- a/include/contact.inc.php
+++ b/include/contact.inc.php
@@ -74,7 +74,8 @@ if ($low_action == "list")
                <?php
                echo dossier::hidden();
                $a = (isset($_GET['query'])) ? $_GET['query'] : "";
-               printf(_('Cherche') . HtmlInput::filter_table("contact_tb", 
"0,1,2,3,4,5,6", 1));
+                echo _("Cherche ").HtmlInput::filter_table_form("contact_tb", 
'0,1,2,3,4,5,6', 1,"query",$a);
+
                $sel_card = new ISelect('cat');
                $sel_card->value = $cn->make_array('select fd_id, fd_label from 
fiche_def ' .
                        ' where  frd_id=' . FICHE_TYPE_CONTACT .
diff --git a/include/customer.inc.php b/include/customer.inc.php
index f082556..1a3faaa 100644
--- a/include/customer.inc.php
+++ b/include/customer.inc.php
@@ -74,8 +74,8 @@ if ($low_action == "list")
             <?php
             echo '<h2>' . "Exercice " . $g_user->get_exercice() . '</h2>';
             $a=(isset($_GET['query']))?$_GET['query']:"";
-            printf (_('Recherche').' <input class="input_text" type="text" 
name="query" value="%s">',
-             $a);
+            echo _("Cherche ").HtmlInput::filter_table_form("tiers_tb", 
'0,1,2', 1,"query",$a);
+
             $choice_cat=HtmlInput::default_value_request("choice_cat", 1);
 
             if ( $choice_cat == 1 )
diff --git a/include/lib/class_html_input.php b/include/lib/class_html_input.php
index 24aa7c3..b808350 100755
--- a/include/lib/class_html_input.php
+++ b/include/lib/class_html_input.php
@@ -824,6 +824,17 @@ class HtmlInput
                      return $sel;
                        }
        }
+       static function 
filter_table_form($p_table_id,$p_col,$start_row,$p_name,$p_old_value)
+       {
+               $r= "
+                       <span>
+                       <input id=\"lk_".$p_table_id."\" name=\"$p_name\" 
value=\"$p_old_value\"autocomplete=\"off\" class=\"input_text\" name=\"filter\" 
onkeyup=\"filter_table(this, '$p_table_id','$p_col',$start_row )\" 
type=\"text\">
+                       <input type=\"button\" class=\"smallbutton\" 
onclick=\"$('lk_".$p_table_id."').value='';filter_table($('lk_".$p_table_id."'),
 '$p_table_id','$p_col',$start_row );\" value=\"X\">
+                       </span>
+                       ";
+                $r.=' <span class="notice" id="info_'.$p_table_id.'"></span>';
+               return $r;
+       }
        static function filter_table($p_table_id,$p_col,$start_row)
        {
                $r= "
diff --git a/include/manager.inc.php b/include/manager.inc.php
index eea0290..f21bdfd 100644
--- a/include/manager.inc.php
+++ b/include/manager.inc.php
@@ -78,7 +78,8 @@ if ($low_action == "list")
                 echo '<h2>' . "Exercice " . $g_user->get_exercice() . '</h2>';
                 echo dossier::hidden();
                 $a = (isset($_GET['query'])) ? $_GET['query'] : "";
-                printf(_('Recherche') . ' <input class="input_text" 
type="text" name="query" value="%s">', $a);
+                echo _("Cherche ").HtmlInput::filter_table_form("tiers_tb", 
'0,1,2', 1,"query",$a);
+
                 echo HtmlInput::request_to_hidden(array('ac'));
                 $choice_cat=HtmlInput::default_value_request("choice_cat", 1);
                 if ( $choice_cat == 1 )
diff --git a/include/supplier.inc.php b/include/supplier.inc.php
index cb6a133..bfae2d1 100644
--- a/include/supplier.inc.php
+++ b/include/supplier.inc.php
@@ -78,8 +78,8 @@ if ( $low_action == "list" )
        echo '<h2>' . "Exercice " . $g_user->get_exercice() . '</h2>';
        echo dossier::hidden();
     $a=(isset($_GET['query']))?$_GET['query']:"";
-    printf (_('Recherche').' <input class="input_text" type="text" 
name="query" value="%s">',
-            $a);
+    echo _("Cherche ").HtmlInput::filter_table_form("tiers_tb", '0,1,2', 
1,"query",$a);
+
     $choice_cat=HtmlInput::default_value_request("choice_cat", 1);
     if ( $choice_cat == 1 )
     {



reply via email to

[Prev in Thread] Current Thread [Next in Thread]