|
@@ -7,6 +7,8 @@ Core::addBreadcrumb("/account/customers", "Customers");
|
|
|
Core::addBreadcrumb("/account/customers/add", $page_title);
|
|
Core::addBreadcrumb("/account/customers/add", $page_title);
|
|
|
|
|
|
|
|
$customer = new Customer;
|
|
$customer = new Customer;
|
|
|
|
|
+$customer->email_after_test = 1;
|
|
|
|
|
+$customer->email_locations_after_test = 1;
|
|
|
|
|
|
|
|
$submit = http::value("submit");
|
|
$submit = http::value("submit");
|
|
|
if($submit) {
|
|
if($submit) {
|
|
@@ -16,6 +18,10 @@ if($submit) {
|
|
|
$form_exception = new FormException;
|
|
$form_exception = new FormException;
|
|
|
|
|
|
|
|
$customer->name = http::value("name", "trim");
|
|
$customer->name = http::value("name", "trim");
|
|
|
|
|
+ $customer->email = http::value("email", "email");
|
|
|
|
|
+ $customer->phone = http::value("phone", "trim");
|
|
|
|
|
+ $customer->email_after_test = http::value("email_after_test", "int");
|
|
|
|
|
+ $customer->email_locations_after_test = http::value("email_locations_after_test", "int");
|
|
|
|
|
|
|
|
if(empty($customer->name)) $form_exception->addError("Name is required.");
|
|
if(empty($customer->name)) $form_exception->addError("Name is required.");
|
|
|
|
|
|
|
@@ -35,7 +41,7 @@ if($submit) {
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
View::includeOnce("header", compact("page_title"));
|
|
View::includeOnce("header", compact("page_title"));
|
|
|
-View::include("customer_add_form", compact("customer"));
|
|
|
|
|
|
|
+View::include("customer_form", compact("page_title", "customer"));
|
|
|
View::includeOnce("footer");
|
|
View::includeOnce("footer");
|
|
|
|
|
|
|
|
?>
|
|
?>
|