diff --git a/ecrire/inc_rubriques.php b/ecrire/inc_rubriques.php index abb06d4dd8afbfc1ee79cd5c4d87fe5f79c8d4c5..b554c4ec0b514c75be3e521f9e17fa6ccc62ed50 100644 --- a/ecrire/inc_rubriques.php +++ b/ecrire/inc_rubriques.php @@ -533,18 +533,18 @@ function selecteur_rubrique_html($id_rubrique, $type, $restreint, $idem=0) { if ($id_rubrique == $r['id_rubrique']) $id_parent = $r['id_parent']; } - $r = "<select name='id_parent' style='font-size: 90%; width: 99%;" - ."font-face: verdana,arial,helvetica,sans-serif; max-height: 24px;' - size='1'>\n"; - $r .= sous_menu_rubriques($id_rubrique,0, - 0,$data,$enfants,$idem, $restreint, $type); + $opt = sous_menu_rubriques($id_rubrique,0, 0,$data,$enfants,$idem, $restreint, $type); + $att = " name='id_parent'\nstyle='font-size: 90%; width: 99%; font-face: verdana,arial,helvetica,sans-serif; max-height: 24px;'"; - $r .= "</select>\n"; + if (preg_match(',^<option[^>]*>([^<]*)</option>$,',$opt,$r)) + $r = "<input$att type='hidden' value='" . $r[1] . "' />" . $r[1] ; + else + $r = "<select$att size='1'>\n$opt</select>\n"; # message pour neuneus (a supprimer ?) if ($type != 'auteur' AND $type != 'breve') - $r .= "<br />"._T('texte_rappel_selection_champs'); + $r .= "\n<br />"._T('texte_rappel_selection_champs'); return $r; }