mirror of
https://gitlab.com/Chill-Projet/chill-bundles.git
synced 2025-09-04 22:04:59 +00:00
new participation: add optional return_path to POST request
This commit is contained in:
@@ -171,10 +171,11 @@ class EventController extends Controller
|
||||
$entity = new Event();
|
||||
$entity->setCenter($center);
|
||||
|
||||
$form = $this->createCreateForm($entity);
|
||||
$form = $this->createCreateForm($entity);
|
||||
$form->handleRequest($request);
|
||||
|
||||
if ($form->isValid()) {
|
||||
if ($form->isSubmitted() && $form->isValid())
|
||||
{
|
||||
$em = $this->getDoctrine()->getManager();
|
||||
$em->persist($entity);
|
||||
$em->flush();
|
||||
@@ -425,7 +426,14 @@ class EventController extends Controller
|
||||
$builder->add('person_id', HiddenType::class, array(
|
||||
'data' => $person->getId()
|
||||
));
|
||||
|
||||
|
||||
$builder->add('return_path', HiddenType::class, array(
|
||||
'data' => $this->generateUrl('chill_event__list_by_person', array(
|
||||
'person_id' => $person->getId()
|
||||
))
|
||||
));
|
||||
|
||||
|
||||
$builder->add('submit', SubmitType::class,
|
||||
array(
|
||||
'label' => 'Subscribe an event'
|
||||
|
Reference in New Issue
Block a user