Merge branch 'catalog'
Conflicts: core/lib/Thelia/Config/Resources/config.xml core/lib/Thelia/Config/Resources/routing/admin.xml core/lib/Thelia/Core/Template/Loop/Country.php core/lib/Thelia/Core/Template/Smarty/Plugins/Form.php core/lib/Thelia/Model/Country.php core/lib/Thelia/Model/Profile.php core/lib/Thelia/Model/ProfileQuery.php install/insert.sql install/thelia.sql local/config/schema.xml
This commit is contained in:
@@ -162,8 +162,12 @@ class BaseController extends ContainerAware
|
||||
}
|
||||
|
||||
foreach ($form->all() as $child) {
|
||||
|
||||
if (!$child->isValid()) {
|
||||
$errors .= $this->getErrorMessages($child) . ', ';
|
||||
|
||||
$fieldName = $child->getConfig()->getOption('label', $child->getName());
|
||||
|
||||
$errors .= sprintf("[%s] %s, ", $fieldName, $this->getErrorMessages($child));
|
||||
}
|
||||
}
|
||||
|
||||
@@ -192,13 +196,15 @@ class BaseController extends ContainerAware
|
||||
$errorMessage = null;
|
||||
if ($form->get("error_message")->getData() != null) {
|
||||
$errorMessage = $form->get("error_message")->getData();
|
||||
} else {
|
||||
}
|
||||
else {
|
||||
$errorMessage = sprintf("Missing or invalid data: %s", $this->getErrorMessages($form));
|
||||
}
|
||||
|
||||
throw new FormValidationException($errorMessage);
|
||||
}
|
||||
} else {
|
||||
}
|
||||
else {
|
||||
throw new FormValidationException(sprintf("Wrong form method, %s expected.", $expectedMethod));
|
||||
}
|
||||
}
|
||||
@@ -223,7 +229,8 @@ class BaseController extends ContainerAware
|
||||
{
|
||||
if ($form != null) {
|
||||
$url = $form->getSuccessUrl();
|
||||
} else {
|
||||
}
|
||||
else {
|
||||
$url = $this->getRequest()->get("success_url");
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user