Happy New Year!
[platal.git] / templates / include / field.select.tpl
index 7f99db9..2cd9156 100644 (file)
@@ -1,6 +1,6 @@
 {**************************************************************************}
 {*                                                                        *}
-{*  Copyright (C) 2003-2008 Polytechnique.org                             *}
+{*  Copyright (C) 2003-2014 Polytechnique.org                             *}
 {*  http://opensource.polytechnique.org/                                  *}
 {*                                                                        *}
 {*  This program is free software; you can redistribute it and/or modify  *}
 {*                                                                        *}
 {**************************************************************************}
 
-{if $with_text_value}
-<div>
-{/if}
-<select name="{$name}"{if $onchange} onchange="{$onchange}"{/if}{if $id} id="{$id}"{/if}>
+<select name="{$name}"{if t($onchange)} onchange="{$onchange}"{/if}{if t($id)} id="{$id}"{/if}>
     <option value=""> - </option>
+  {if $list}
   {iterate from=$list item='option'}
     <option value="{$option.id}">{$option.field|htmlspecialchars}</option>
   {/iterate}
+  {/if}
 </select>
-{if $with_text_value}
-<input type="hidden" value="" name="{$name}Txt" />
-</div>
-{/if}
 
 {* vim:set et sws=2 sts=2 sw=2 enc=utf-8: *}