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();*/ $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->setupFormErrorContext(
$this->getTranslator()->trans("%obj SEO modification", array('%obj' => $this->objectName)), $this->getTranslator()->trans("%obj SEO modification", array('%obj' => $this->objectName)),
$error_msg, $error_msg,
@@ -216,6 +226,8 @@ abstract class AbstractSeoCrudController extends AbstractCrudController
$ex $ex
); );
// At this point, the form has errors, and should be redisplayed. // At this point, the form has errors, and should be redisplayed.
return $this->renderEditionTemplate(); return $this->renderEditionTemplate();
} }

View File

@@ -1,6 +1,6 @@
<div class="form-container"> <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 {include
file = "includes/inner-form-toolbar.html" file = "includes/inner-form-toolbar.html"