SF.net SVN: postfixadmin:[1260] trunk
Brought to you by:
christian_boltz,
gingerdog
From: <chr...@us...> - 2011-10-31 21:45:06
|
Revision: 1260 http://postfixadmin.svn.sourceforge.net/postfixadmin/?rev=1260&view=rev Author: christian_boltz Date: 2011-10-31 21:45:00 +0000 (Mon, 31 Oct 2011) Log Message: ----------- create-domain.php, templates/editform.tpl: - move special handling for enum fields from PHP select_options() to the template using smarty {html_options} Modified Paths: -------------- trunk/create-domain.php trunk/templates/editform.tpl Modified: trunk/create-domain.php =================================================================== --- trunk/create-domain.php 2011-10-31 20:57:43 UTC (rev 1259) +++ trunk/create-domain.php 2011-10-31 21:45:00 UTC (rev 1260) @@ -126,9 +126,6 @@ case 'bool': $smarty->assign ("value_$key", ($values[$key] == '1') ? ' checked="checked"' : ''); break; - case 'enum': - $smarty->assign ("value_$key", select_options ($form_fields[$key]['options'], array ($values[$key])),false); # non-escaped - break; default: $smarty->assign ("value_$key", $values[$key]); } Modified: trunk/templates/editform.tpl =================================================================== --- trunk/templates/editform.tpl 2011-10-31 20:57:43 UTC (rev 1259) +++ trunk/templates/editform.tpl 2011-10-31 21:45:00 UTC (rev 1260) @@ -23,7 +23,9 @@ {elseif $field.type == 'bool'} <input class="flat" type="checkbox" value='1' name="{$key}"{$value_{$key}}/> {elseif $field.type == 'enum'} - <select class="flat" name="{$key}">{$value_{$key}}</select> + <select class="flat" name="{$key}"> + {html_options output=$struct.{$key}.options values=$struct.{$key}.options selected=$value_transport} + </select> {else} <input class="flat" type="text" name="{$key}" value="{$value_{$key}}" /> {/if} This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |