mirror of
https://gitlab.com/Chill-Projet/chill-bundles.git
synced 2025-06-12 21:34:25 +00:00
add flash message for custom fields group
This commit is contained in:
parent
46173231d2
commit
2401270754
@ -97,9 +97,15 @@ class CustomFieldsGroupController extends Controller
|
||||
$em = $this->getDoctrine()->getManager();
|
||||
$em->persist($entity);
|
||||
$em->flush();
|
||||
|
||||
$this->addFlash('success', $this->get('translator')
|
||||
->trans("The custom fields group has been created"));
|
||||
|
||||
return $this->redirect($this->generateUrl('customfieldsgroup_show', array('id' => $entity->getId())));
|
||||
}
|
||||
|
||||
$this->addFlash('error', $this->get('translator')
|
||||
->trans("The custom fields group form contains errors"));
|
||||
|
||||
return $this->render('ChillCustomFieldsBundle:CustomFieldsGroup:new.html.twig', array(
|
||||
'entity' => $entity,
|
||||
@ -274,9 +280,15 @@ class CustomFieldsGroupController extends Controller
|
||||
|
||||
if ($editForm->isValid()) {
|
||||
$em->flush();
|
||||
|
||||
$this->addFlash('success', $this->get('translator')
|
||||
->trans("The custom fields group has been updated"));
|
||||
|
||||
return $this->redirect($this->generateUrl('customfieldsgroup_edit', array('id' => $id)));
|
||||
}
|
||||
|
||||
$this->addFlash('error', $this->get('translator')
|
||||
->trans("The custom fields group form contains errors"));
|
||||
|
||||
return $this->render('ChillCustomFieldsBundle:CustomFieldsGroup:edit.html.twig', array(
|
||||
'entity' => $entity,
|
||||
@ -324,6 +336,9 @@ class CustomFieldsGroupController extends Controller
|
||||
|
||||
$em->persist($newCFDefaultGroup);
|
||||
$em->flush();
|
||||
|
||||
$this->addFlash('success', $this->get('translator')
|
||||
->trans("The default custom fields group has been changed"));
|
||||
|
||||
return $this->redirect($this->generateUrl('customfieldsgroup'));
|
||||
}
|
||||
|
@ -21,6 +21,10 @@ active: actif
|
||||
No value defined for this option: Pas de valeur pour cette option
|
||||
CustomFieldsGroup edit: Edition d'un groupe de champs personnalisé
|
||||
type: type
|
||||
The custom fields group has been created: Le groupe de champs personnalisés a été créé
|
||||
The custom fields group has been updated: Le groupe de champs personnalisés a été mis à jour
|
||||
The custom fields group form contains errors: Le formulaire contient des erreurs
|
||||
The default custom fields group has been changed: Le groupe par défaut a été changé
|
||||
|
||||
|
||||
#menu entries
|
||||
|
Loading…
x
Reference in New Issue
Block a user