adapt select moderator field in new event form

This commit is contained in:
2019-01-29 14:28:27 +01:00
parent fda14a52e0
commit aa02597541
2 changed files with 64 additions and 16 deletions

View File

@@ -1,5 +1,25 @@
<?php
/*
* Chill is a software for social workers
*
* Copyright (C) 2014-2015, Champs Libres Cooperative SCRLFS,
* <http://www.champs-libres.coop>, <info@champs-libres.coop>
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU Affero General Public License as
* published by the Free Software Foundation, either version 3 of the
* License, or (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU Affero General Public License for more details.
*
* You should have received a copy of the GNU Affero General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
namespace Chill\EventBundle\Controller;
use Chill\EventBundle\Entity\Participation;
@@ -105,7 +125,9 @@ class EventController extends Controller
{
$form = $this->createForm(EventType::class, $entity, array(
'action' => $this->generateUrl('chill_event__event_create'),
'method' => 'POST'
'method' => 'POST',
'center' => $entity->getCenter(),
'role' => new Role('CHILL_EVENT_CREATE')
));
$form->add('submit', SubmitType::class, array('label' => 'Create'));