mirror of
https://gitlab.com/Chill-Projet/chill-bundles.git
synced 2025-06-18 16:24:24 +00:00
adding flash messages for customfield
This commit is contained in:
parent
cbf9cee65c
commit
46173231d2
@ -27,9 +27,16 @@ class CustomFieldController extends Controller
|
||||
$em = $this->getDoctrine()->getManager();
|
||||
$em->persist($entity);
|
||||
$em->flush();
|
||||
|
||||
$this->addFlash('success', $this->get('translator')
|
||||
->trans('The custom field has been created'));
|
||||
|
||||
return $this->redirect($this->generateUrl('customfield_show', array('id' => $entity->getId())));
|
||||
}
|
||||
return $this->redirect($this->generateUrl('customfieldsgroup_show',
|
||||
array('id' => $entity->getCustomFieldsGroup()->getId())));
|
||||
}
|
||||
|
||||
$this->addFlash('error', $this->get('translator')
|
||||
->trans("The custom field form contains errors"));
|
||||
|
||||
return $this->render('ChillCustomFieldsBundle:CustomField:new.html.twig', array(
|
||||
'entity' => $entity,
|
||||
@ -166,9 +173,15 @@ class CustomFieldController extends Controller
|
||||
|
||||
if ($editForm->isValid()) {
|
||||
$em->flush();
|
||||
|
||||
$this->addFlash('success', $this->get('translator')
|
||||
->trans("The custom field has been updated"));
|
||||
|
||||
return $this->redirect($this->generateUrl('customfield_edit', array('id' => $id)));
|
||||
}
|
||||
|
||||
$this->addFlash('error', $this->get('translator')
|
||||
->trans("The custom field form contains errors"));
|
||||
|
||||
return $this->render('ChillCustomFieldsBundle:CustomField:edit.html.twig', array(
|
||||
'entity' => $entity,
|
||||
|
@ -37,6 +37,9 @@ Custom fields group: Groupe de champ personnalisé
|
||||
Ordering: Ordre d'apparition
|
||||
Back to the group: Retour au groupe de champs personnalisé
|
||||
Slug: Identifiant textuel
|
||||
The custom field has been created: Le champ personnalisé est créé
|
||||
The custom field form contains errors: Le formulaire contient des erreurs
|
||||
The custom field has been updated: Le champ personnalisé a été mis à jour
|
||||
|
||||
#custom field name
|
||||
choice: choix
|
||||
|
Loading…
x
Reference in New Issue
Block a user