diff --git a/create-domain.php b/create-domain.php index 779a0d88..173b71d0 100644 --- a/create-domain.php +++ b/create-domain.php @@ -112,6 +112,7 @@ if ($error != 1 && $new) { # no error and not in edit mode - reset fields to def } 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 @@ foreach($form_fields as $key => $field) { default: $smarty->assign ($smartykey, $values[$key]); } + } } $smarty->assign ('mode', $mode); diff --git a/model/DomainHandler.php b/model/DomainHandler.php index fc97492f..f7bdab0c 100644 --- a/model/DomainHandler.php +++ b/model/DomainHandler.php @@ -117,7 +117,7 @@ class DomainHandler extends PFAHandler { /*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' , '' ), );