From 823d72e72286d62fd86f9d01cb6bfbfd45703fa8 Mon Sep 17 00:00:00 2001 From: Regis Houssin Date: Sun, 11 Feb 2007 20:04:10 +0000 Subject: [PATCH] =?UTF-8?q?D=E9but=20ajout=20de=20l'autocompl=E9tion=20aja?= =?UTF-8?q?x=20sur=20la=20liste=20d=E9roulante=20des=20pays?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- htdocs/html.form.class.php | 7 +++++-- htdocs/soc.php | 2 +- 2 files changed, 6 insertions(+), 3 deletions(-) diff --git a/htdocs/html.form.class.php b/htdocs/html.form.class.php index a24320f6374..71cfba5f74f 100644 --- a/htdocs/html.form.class.php +++ b/htdocs/html.form.class.php @@ -315,6 +315,7 @@ class Form $sql = "SELECT rowid, code, libelle, active"; $sql.= " FROM ".MAIN_DB_PREFIX."c_pays"; $sql.= " WHERE active = 1"; + if ($conf->use_ajax && $selected!='' && $conf->global->CODE_DE_TEST == 1) $sql.= " AND rowid = ".$selected; $sql.= " ORDER BY code ASC;"; $resql=$this->db->query($sql); @@ -322,9 +323,11 @@ class Form { if ($conf->use_ajax && $conf->global->CODE_DE_TEST == 1) { + $obj = $this->db->fetch_object($resql); + $pays_id = $obj->rowid?$obj->rowid:''; print '
'; - print ''; - print ''; + print ''; + print ''; print '
'; print '
'; print '