mirror of
https://gitlab.com/Chill-Projet/chill-bundles.git
synced 2025-08-30 03:23:48 +00:00
Merge conflicts fixed
This commit is contained in:
@@ -32,6 +32,8 @@ final class AsideActivityController extends CRUDController
|
||||
{
|
||||
$asideActivity = new AsideActivity();
|
||||
|
||||
$asideActivity->setAgent($this->getUser());
|
||||
|
||||
$duration = $request->query->get('duration', '300');
|
||||
$duration = DateTime::createFromFormat('U', $duration);
|
||||
$asideActivity->setDuration($duration);
|
||||
|
@@ -14,7 +14,6 @@ namespace Chill\AsideActivityBundle\Form;
|
||||
use Chill\AsideActivityBundle\Entity\AsideActivity;
|
||||
use Chill\AsideActivityBundle\Entity\AsideActivityCategory;
|
||||
use Chill\AsideActivityBundle\Templating\Entity\CategoryRender;
|
||||
use Chill\MainBundle\Entity\User;
|
||||
use Chill\MainBundle\Form\Type\ChillDateType;
|
||||
use Chill\MainBundle\Form\Type\ChillTextareaType;
|
||||
use Chill\MainBundle\Form\Type\PickUserDynamicType;
|
||||
@@ -69,22 +68,6 @@ final class AsideActivityFormType extends AbstractType
|
||||
];
|
||||
|
||||
$builder
|
||||
// ->add(
|
||||
// 'agent',
|
||||
// EntityType::class,
|
||||
// [
|
||||
// 'label' => 'For agent',
|
||||
// 'required' => true,
|
||||
// 'class' => User::class,
|
||||
// 'data' => $this->storage->getToken()->getUser(),
|
||||
// 'query_builder' => static function (EntityRepository $er) {
|
||||
// return $er->createQueryBuilder('u')->where('u.enabled = true');
|
||||
// },
|
||||
// 'attr' => ['class' => 'select2 '],
|
||||
// 'placeholder' => 'Choose the agent for whom this activity is created',
|
||||
// 'choice_label' => 'username',
|
||||
// ]
|
||||
// )
|
||||
->add('agent', PickUserDynamicType::class, [
|
||||
'label' => 'For agent',
|
||||
'required' => true,
|
||||
|
Reference in New Issue
Block a user