mirror of
https://gitlab.com/Chill-Projet/chill-bundles.git
synced 2025-08-23 08:03:49 +00:00
resolving conflict
This commit is contained in:
@@ -221,8 +221,15 @@ class AccompanyingPeriodController extends Controller
|
||||
}
|
||||
} else { //if form is not valid
|
||||
$this->get('session')->getFlashBag()
|
||||
->add('danger', $this->get('translator')
|
||||
->trans('Pediod closing form is not valide'));
|
||||
->add('danger',
|
||||
$this->get('translator')
|
||||
->trans('Pediod closing form is not valide')
|
||||
);
|
||||
|
||||
foreach ($form->getErrors() as $error) {
|
||||
$this->get('session')->getFlashBag()
|
||||
->add('info', $error->getMessage());
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
@@ -91,13 +91,11 @@ class PersonController extends Controller
|
||||
|
||||
if ($request->getMethod() === 'POST') {
|
||||
$form->handleRequest($request);
|
||||
|
||||
if ( ! $form->isValid() ) {
|
||||
|
||||
$errors = $form->getErrorsAsString();
|
||||
|
||||
|
||||
if ( ! $form->isValid() ) {
|
||||
$this->get('session')
|
||||
->getFlashBag()->add('danger', 'error' . $errors);
|
||||
->getFlashBag()->add('danger', 'Thp person data provided'
|
||||
. ' are not valid');
|
||||
|
||||
return $this->render('ChillPersonBundle:Person:edit.html.twig',
|
||||
array('person' => $person,
|
||||
@@ -107,7 +105,7 @@ class PersonController extends Controller
|
||||
$this->get('session')->getFlashBag()
|
||||
->add('success',
|
||||
$this->get('translator')
|
||||
->trans('The person has been created')
|
||||
->trans('The person data has been updated')
|
||||
);
|
||||
|
||||
$em = $this->getDoctrine()->getManager();
|
||||
|
Reference in New Issue
Block a user