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()"
This commit is contained in:
parent
2b75c9720a
commit
27f5673f2d
3 changed files with 4 additions and 3 deletions
|
|
@ -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);";
|
||||
|
|
|
|||
|
|
@ -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);
|
||||
|
|
|
|||
|
|
@ -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;
|
||||
Loading…
Add table
Add a link
Reference in a new issue