| 
									
										
										
										
											2004-04-13 15:43:47 +00:00
										 |  |  |  | <?xml version="1.0" encoding="iso-8859-1"?> | 
					
						
							|  |  |  |  | <!-- $Revision$ --> | 
					
						
							| 
									
										
										
										
											2004-05-23 15:50:53 +00:00
										 |  |  |  | <!-- EN-Revision: 1.1 Maintainer: nobody Status: partial --> | 
					
						
							|  |  |  |  | <sect1 id="language.function.html.radios"> | 
					
						
							|  |  |  |  |  <title>html_radios</title> | 
					
						
							|  |  |  |  |  <informaltable frame="all"> | 
					
						
							|  |  |  |  |   <tgroup cols="5"> | 
					
						
							|  |  |  |  |    <colspec colname="param" align="center" /> | 
					
						
							|  |  |  |  |    <colspec colname="type" align="center" /> | 
					
						
							|  |  |  |  |    <colspec colname="required" align="center" /> | 
					
						
							|  |  |  |  |    <colspec colname="default" align="center" /> | 
					
						
							|  |  |  |  |    <colspec colname="desc" /> | 
					
						
							|  |  |  |  |    <thead> | 
					
						
							|  |  |  |  |     <row> | 
					
						
							|  |  |  |  |      <entry>Nom attribut</entry> | 
					
						
							|  |  |  |  |      <entry>Type</entry> | 
					
						
							|  |  |  |  |      <entry>Requis</entry> | 
					
						
							|  |  |  |  |      <entry>Defaut</entry> | 
					
						
							|  |  |  |  |      <entry>Description</entry> | 
					
						
							|  |  |  |  |     </row> | 
					
						
							|  |  |  |  |    </thead> | 
					
						
							|  |  |  |  |    <tbody> | 
					
						
							|  |  |  |  |     <row> | 
					
						
							|  |  |  |  |      <entry>name</entry> | 
					
						
							|  |  |  |  |      <entry>cha<EFBFBD>ne de caract<63>res</entry> | 
					
						
							|  |  |  |  |      <entry>Non</entry> | 
					
						
							|  |  |  |  |      <entry><emphasis>radio</emphasis></entry> | 
					
						
							|  |  |  |  |      <entry>nom de la liste boutons radio</entry> | 
					
						
							|  |  |  |  |     </row> | 
					
						
							|  |  |  |  |     <row> | 
					
						
							|  |  |  |  |      <entry>values</entry> | 
					
						
							|  |  |  |  |      <entry>tableau</entry> | 
					
						
							|  |  |  |  |      <entry>Oui, <20> moins que vous n'utilisiez l'attribut | 
					
						
							|  |  |  |  |      options</entry> | 
					
						
							|  |  |  |  |      <entry><emphasis>n/a</emphasis></entry> | 
					
						
							|  |  |  |  |      <entry>Le tableau des valeurs des boutons radio</entry> | 
					
						
							|  |  |  |  |     </row> | 
					
						
							|  |  |  |  |     <row> | 
					
						
							|  |  |  |  |      <entry>output</entry> | 
					
						
							|  |  |  |  |      <entry>tableau</entry> | 
					
						
							|  |  |  |  |      <entry>Oui, <20> moins que vous n'utilisiez l'attribut | 
					
						
							|  |  |  |  |      options</entry> | 
					
						
							|  |  |  |  |      <entry><emphasis>n/a</emphasis></entry> | 
					
						
							|  |  |  |  |      <entry>Un tableau de libell<6C>s pour les boutons radio</entry> | 
					
						
							|  |  |  |  |     </row> | 
					
						
							|  |  |  |  |     <row> | 
					
						
							|  |  |  |  |      <entry>checked</entry> | 
					
						
							|  |  |  |  |      <entry>cha<EFBFBD>ne de caract<63>res</entry> | 
					
						
							|  |  |  |  |      <entry>Non</entry> | 
					
						
							|  |  |  |  |      <entry><emphasis>empty</emphasis></entry> | 
					
						
							|  |  |  |  |      <entry>Les boutons radios s<>lectionn<6E>s</entry> | 
					
						
							|  |  |  |  |     </row> | 
					
						
							|  |  |  |  |     <row> | 
					
						
							|  |  |  |  |      <entry>options</entry> | 
					
						
							|  |  |  |  |      <entry>tableau associatif</entry> | 
					
						
							|  |  |  |  |      <entry>Oui, <20> moins que vous n'utilisiez values | 
					
						
							|  |  |  |  |      et outputs</entry> | 
					
						
							|  |  |  |  |      <entry><emphasis>n/a</emphasis></entry> | 
					
						
							|  |  |  |  |      <entry>un tableau associatif valeurs / libell<6C>s</entry> | 
					
						
							|  |  |  |  |     </row> | 
					
						
							|  |  |  |  |     <row> | 
					
						
							|  |  |  |  |      <entry>separator</entry> | 
					
						
							|  |  |  |  |      <entry>cha<EFBFBD>ne de caract<63>res</entry> | 
					
						
							|  |  |  |  |      <entry>Non</entry> | 
					
						
							|  |  |  |  |      <entry><emphasis>empty</emphasis></entry> | 
					
						
							|  |  |  |  |      <entry>cha<EFBFBD>ne de s<>paration <20> placer entre les | 
					
						
							|  |  |  |  |      boutons radio</entry> | 
					
						
							|  |  |  |  |     </row> | 
					
						
							|  |  |  |  |    </tbody> | 
					
						
							|  |  |  |  |   </tgroup> | 
					
						
							|  |  |  |  |  </informaltable> | 
					
						
							|  |  |  |  |  <para> | 
					
						
							|  |  |  |  |   html_radio est une fonction utilisateur qui cr<63>e des boutons radio | 
					
						
							|  |  |  |  |   html <20> partir des donn<6E>es fournies. Elle prend en charge les <20>l<EFBFBD>ments | 
					
						
							|  |  |  |  |   s<>lectionn<6E>s par d<>faut. Les attributs requis sont values et output, | 
					
						
							|  |  |  |  |   <20> moins que vous n'utilisiez options <20> la place. La sortie g<>n<EFBFBD>r<EFBFBD>e est | 
					
						
							|  |  |  |  |   compatible XHTML. | 
					
						
							|  |  |  |  |  </para> | 
					
						
							|  |  |  |  |  <para> | 
					
						
							|  |  |  |  |   Tous les param<61>tres qui ne sont pas dans la liste ci dessus sont | 
					
						
							|  |  |  |  |   affich<63>s en tant que paires nom / valeur dans chaque balise <input> | 
					
						
							|  |  |  |  |   cr<63><72>e. | 
					
						
							|  |  |  |  |  </para> | 
					
						
							|  |  |  |  |   | 
					
						
							|  |  |  |  |  <example> | 
					
						
							|  |  |  |  |   <title>html_radios</title> | 
					
						
							| 
									
										
										
										
											2004-04-13 15:43:47 +00:00
										 |  |  |  | <programlisting> | 
					
						
							|  |  |  |  | index.php: | 
					
						
							|  |  |  |  | 
 | 
					
						
							|  |  |  |  | require('Smarty.class.php'); | 
					
						
							|  |  |  |  | $smarty = new Smarty; | 
					
						
							|  |  |  |  | $smarty->assign('id_client', array(1000,1001,1002,1003)); | 
					
						
							|  |  |  |  | $smarty->assign('nom_client', array('Joe Schmoe','Jack Smith','Jane | 
					
						
							|  |  |  |  | Johnson','Charlie Brown')); | 
					
						
							|  |  |  |  | $smarty->assign('client_id', 1001); | 
					
						
							|  |  |  |  | $smarty->display('index.tpl'); | 
					
						
							|  |  |  |  | 
 | 
					
						
							|  |  |  |  | 
 | 
					
						
							|  |  |  |  | index.tpl: | 
					
						
							|  |  |  |  | 
 | 
					
						
							|  |  |  |  | {html_radios values=$id_client checked=$client_id output=$nom_client separator="<br />"} | 
					
						
							|  |  |  |  | 
 | 
					
						
							|  |  |  |  | 
 | 
					
						
							|  |  |  |  | index.php: | 
					
						
							|  |  |  |  | 
 | 
					
						
							|  |  |  |  | require('Smarty.class.php'); | 
					
						
							|  |  |  |  | $smarty = new Smarty; | 
					
						
							|  |  |  |  | $smarty->assign('cust_radios', array( | 
					
						
							|  |  |  |  | 			1001 => 'Joe Schmoe', | 
					
						
							|  |  |  |  | 			1002 => 'Jack Smith', | 
					
						
							|  |  |  |  | 			1003 => 'Jane Johnson', | 
					
						
							|  |  |  |  | 			1004 => 'Charlie Brown')); | 
					
						
							|  |  |  |  | $smarty->assign('client_id', 1001); | 
					
						
							|  |  |  |  | $smarty->display('index.tpl'); | 
					
						
							|  |  |  |  | 
 | 
					
						
							|  |  |  |  | 
 | 
					
						
							|  |  |  |  | index.tpl: | 
					
						
							|  |  |  |  | 
 | 
					
						
							|  |  |  |  | {html_radios name="id" options=$cust_radios checked=$client_id separator="<br />"} | 
					
						
							|  |  |  |  | 
 | 
					
						
							|  |  |  |  | 
 | 
					
						
							|  |  |  |  | SORTIE: (both examples) | 
					
						
							|  |  |  |  | 
 | 
					
						
							|  |  |  |  | <input type="radio" name="id[]" value="1000">Joe Schmoe<br /> | 
					
						
							|  |  |  |  | <input type="radio" name="id[]" value="1001" checked="checked"><br /> | 
					
						
							|  |  |  |  | <input type="radio" name="id[]" value="1002">Jane Johnson<br /> | 
					
						
							|  |  |  |  | <input type="radio" name="id[]" value="1003">Charlie Brown<br /></programlisting> | 
					
						
							| 
									
										
										
										
											2004-05-23 15:50:53 +00:00
										 |  |  |  |  </example> | 
					
						
							| 
									
										
										
										
											2004-04-13 15:43:47 +00:00
										 |  |  |  | </sect1> | 
					
						
							|  |  |  |  | <!-- Keep this comment at the end of the file
 | 
					
						
							|  |  |  |  | Local variables: | 
					
						
							|  |  |  |  | mode: sgml | 
					
						
							|  |  |  |  | sgml-omittag:t | 
					
						
							|  |  |  |  | sgml-shorttag:t | 
					
						
							|  |  |  |  | sgml-minimize-attributes:nil | 
					
						
							|  |  |  |  | sgml-always-quote-attributes:t | 
					
						
							|  |  |  |  | sgml-indent-step:1 | 
					
						
							|  |  |  |  | sgml-indent-data:t | 
					
						
							|  |  |  |  | indent-tabs-mode:nil | 
					
						
							|  |  |  |  | sgml-parent-document:nil | 
					
						
							|  |  |  |  | sgml-default-dtd-file:"../../../../manual.ced" | 
					
						
							|  |  |  |  | sgml-exposed-tags:nil | 
					
						
							|  |  |  |  | sgml-local-catalogs:nil | 
					
						
							|  |  |  |  | sgml-local-ecat-files:nil | 
					
						
							|  |  |  |  | End: | 
					
						
							|  |  |  |  | vim600: syn=xml fen fdm=syntax fdl=2 si | 
					
						
							|  |  |  |  | vim: et tw=78 syn=sgml | 
					
						
							|  |  |  |  | vi: ts=1 sw=1 | 
					
						
							| 
									
										
										
										
											2004-05-23 15:50:53 +00:00
										 |  |  |  | --> |