fix missing general form on seo form error

This commit is contained in:
Manuel Raynaud
2013-12-16 16:22:14 +01:00
parent 30eab4f416
commit b9192e551c
2 changed files with 13 additions and 1 deletions

View File

@@ -209,6 +209,16 @@ abstract class AbstractSeoCrudController extends AbstractCrudController
$error_msg = $ex->getMessage();*/
}
// Load object if exist
if (null !== $object = $this->getExistingObject()) {
// Hydrate the form abd pass it to the parser
$changeForm = $this->hydrateObjectForm($object);
// Pass it to the parser
$this->getParserContext()->addForm($changeForm);
}
$this->setupFormErrorContext(
$this->getTranslator()->trans("%obj SEO modification", array('%obj' => $this->objectName)),
$error_msg,
@@ -216,6 +226,8 @@ abstract class AbstractSeoCrudController extends AbstractCrudController
$ex
);
// At this point, the form has errors, and should be redisplayed.
return $this->renderEditionTemplate();
}

View File

@@ -1,6 +1,6 @@
<div class="form-container">
<form method="POST" action="{$formAction}" {form_enctype form=$form} class="clearfix">
<form method="POST" action="{$formAction}" {form_enctype form=$form} class="clearfix" novalidate>
{include
file = "includes/inner-form-toolbar.html"