Added possibility to change the main product reference

This commit is contained in:
Julien Chanséaume
2014-07-21 15:01:49 +02:00
committed by Julien Chanseaume
parent f37625e5cf
commit eaad1afdff
6 changed files with 31 additions and 14 deletions

View File

@@ -158,6 +158,7 @@ class ProductController extends AbstractSeoCrudController
$changeEvent
->setLocale($formData['locale'])
->setRef($formData['ref'])
->setTitle($formData['title'])
->setChapo($formData['chapo'])
->setDescription($formData['description'])

View File

@@ -218,13 +218,13 @@ abstract class BaseController extends ContainerAware
if ($form->get("error_message")->getData() != null) {
$errorMessage = $form->get("error_message")->getData();
} else {
$errorMessage = sprintf("Missing or invalid data: %s", $this->getErrorMessages($form));
$errorMessage = sprintf($this->getTranslator()->trans("Missing or invalid data: %s"), $this->getErrorMessages($form));
}
throw new FormValidationException($errorMessage);
}
} else {
throw new FormValidationException(sprintf("Wrong form method, %s expected.", $expectedMethod));
throw new FormValidationException(sprintf($this->getTranslator()->trans("Wrong form method, %s expected."), $expectedMethod));
}
}