edit.php:

- if values[$key] is not set, use the field's default value for smarty->assign
  (also avoids an "undefined" warning with read-only fields)


git-svn-id: https://svn.code.sf.net/p/postfixadmin/code/trunk@1631 a1433add-5e2c-0410-b055-b7f2511e0802
pull/2/head
Christian Boltz 11 years ago
parent bf170f043b
commit 4bbc223804

@ -186,7 +186,11 @@ foreach($form_fields as $key => $field) {
$fielderror[$key] = '';
}
$smarty->assign ("value_$key", $values[$key]);
if (isset($values[$key])) {
$smarty->assign ("value_$key", $values[$key]);
} else {
$smarty->assign ("value_$key", $form_fields[$key]['default']);
}
}
}

Loading…
Cancel
Save