noalyss-commit
[Top][All Lists]
Advanced

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

[Noalyss-commit] [noalyss] 36/107: Bug : card cannot use a attribute of


From: Dany De Bontridder
Subject: [Noalyss-commit] [noalyss] 36/107: Bug : card cannot use a attribute of the type "card", reason : the query was wrong and there were a confusion between this->name and this->id in "get_js_attr()"
Date: Mon, 26 Aug 2019 10:31:53 -0400 (EDT)

sparkyx pushed a commit to branch master
in repository noalyss.

commit 27f5673f2d8af5b411ee191b8b02308596c1c00e
Author: Dany De Bontridder <address@hidden>
Date:   Mon Jul 22 21:22:16 2019 +0200

    Bug : card cannot use a attribute of the type "card", reason : the query was
    wrong and there were a confusion between this->name and this->id in 
"get_js_attr()"
---
 include/class/fiche.class.php    | 4 ++--
 include/lib/html_input.class.php | 2 +-
 sql/upgrade.sql                  | 1 +
 3 files changed, 4 insertions(+), 3 deletions(-)

diff --git a/include/class/fiche.class.php b/include/class/fiche.class.php
index 647b19b..3d59b9e 100644
--- a/include/class/fiche.class.php
+++ b/include/class/fiche.class.php
@@ -654,7 +654,7 @@ class Fiche
                             $w->extra=$filter;
                             $w->extra2=0;
                             $label=new ISpan();
-                            $label->name="av_text".$uniq.$r->ad_id."_label";
+                            $label->name="av_text".$r->ad_id.$uniq."_label";
                             $fiche=new Fiche($this->cn);
                             $fiche->get_by_qcode($r->av_text);
                             if ($fiche->id==0)
@@ -670,7 +670,7 @@ class Fiche
                             }
                             $w->set_attribute('ipopup', 'ipopcard');
                             $w->set_attribute('typecard', $filter);
-                            $w->set_attribute('inp', "av_text".$r->ad_id);
+                            $w->set_attribute('inp', $w->id);
                             $w->set_attribute('label', $label->name);
                             $w->autocomplete=0;
                             $w->dblclick="fill_ipopcard(this);";
diff --git a/include/lib/html_input.class.php b/include/lib/html_input.class.php
index 3fffb05..d3a6058 100755
--- a/include/lib/html_input.class.php
+++ b/include/lib/html_input.class.php
@@ -139,7 +139,7 @@ class HtmlInput
         for ($i=0; $i<count($this->attribute); $i++)
         {
             list($name, $value)=$this->attribute[$i];
-            $tmp1=sprintf("$('%s').%s='%s';", $this->name, $name, $value);
+            $tmp1=sprintf("$('%s').%s='%s';", $this->id, $name, $value);
             $attr.=$tmp1;
         }
         $attr=create_script($attr);
diff --git a/sql/upgrade.sql b/sql/upgrade.sql
index e69de29..2abcfb5 100644
--- a/sql/upgrade.sql
+++ b/sql/upgrade.sql
@@ -0,0 +1 @@
+update attr_def set ad_extra = '[sql] fd_id in (select fd_id from fiche_def 
where frd_id in (4,8,9,14))' where ad_id=25;



reply via email to

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