SF.net SVN: postfixadmin:[1235] trunk
Brought to you by:
christian_boltz,
gingerdog
From: <chr...@us...> - 2011-10-24 22:17:49
|
Revision: 1235 http://postfixadmin.svn.sourceforge.net/postfixadmin/?rev=1235&view=rev Author: christian_boltz Date: 2011-10-24 22:17:43 +0000 (Mon, 24 Oct 2011) Log Message: ----------- create-domain.php: - assign smarty values only for fields that have the display_in_form flag model/DomainHandler.php: - initStruct(): make default_aliases display_in_form dependant on $this->new (it's useless in edit mode) Modified Paths: -------------- trunk/create-domain.php trunk/model/DomainHandler.php Modified: trunk/create-domain.php =================================================================== --- trunk/create-domain.php 2011-10-24 22:06:44 UTC (rev 1234) +++ trunk/create-domain.php 2011-10-24 22:17:43 UTC (rev 1235) @@ -112,6 +112,7 @@ } foreach($form_fields as $key => $field) { + if($form_fields[$key]['display_in_form']) { $smartykey = "t" . ucfirst($key); # TODO: ugly workaround until I decide on the template variable names switch ($field['type']) { case 'bool': @@ -123,6 +124,7 @@ default: $smarty->assign ($smartykey, $values[$key]); } + } } $smarty->assign ('mode', $mode); Modified: trunk/model/DomainHandler.php =================================================================== --- trunk/model/DomainHandler.php 2011-10-24 22:06:44 UTC (rev 1234) +++ trunk/model/DomainHandler.php 2011-10-24 22:17:43 UTC (rev 1235) @@ -117,7 +117,7 @@ /*options*/ $this->getTransports() ), 'backupmx' => pacol( 1, 1, 1, 'bool', 'pAdminEdit_domain_backupmx' , '' ), 'active' => pacol( 1, 1, 1, 'bool', 'pAdminEdit_domain_active' , '' , 1 ), - 'default_aliases' => pacol( $this->new, 1, 0, 'bool', 'pAdminCreate_domain_defaultaliases ', '' , 1,'', /*not in db*/ 1 ), + 'default_aliases' => pacol( $this->new, $this->new, 0, 'bool', 'pAdminCreate_domain_defaultaliases ', '' , 1,'', /*not in db*/ 1 ), 'created' => pacol( 0, 0, 1, 'ts', '' /* TODO: "created" label */ , '' ), 'modified' => pacol( 0, 0, 1, 'ts', 'pAdminList_domain_modified' , '' ), ); This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |