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 '