diff --git a/src/Bundle/ChillMainBundle/Form/NotificationType.php b/src/Bundle/ChillMainBundle/Form/NotificationType.php index 09d6a0341..b24513524 100644 --- a/src/Bundle/ChillMainBundle/Form/NotificationType.php +++ b/src/Bundle/ChillMainBundle/Form/NotificationType.php @@ -15,6 +15,7 @@ use Chill\MainBundle\Entity\Notification; use Chill\MainBundle\Form\Type\ChillTextareaType; use Chill\MainBundle\Form\Type\PickUserDynamicType; use Symfony\Component\Form\AbstractType; +use Symfony\Component\Form\Extension\Core\Type\TextType; use Symfony\Component\Form\FormBuilderInterface; use Symfony\Component\OptionsResolver\OptionsResolver; @@ -23,6 +24,10 @@ class NotificationType extends AbstractType public function buildForm(FormBuilderInterface $builder, array $options) { $builder + ->add('title', TextType::class, [ + 'label' => 'Title', + 'required' => true, + ]) ->add('addressees', PickUserDynamicType::class, [ 'multiple' => true, ]) diff --git a/src/Bundle/ChillMainBundle/Resources/views/Notification/create.html.twig b/src/Bundle/ChillMainBundle/Resources/views/Notification/create.html.twig index db06caefa..edf9f3581 100644 --- a/src/Bundle/ChillMainBundle/Resources/views/Notification/create.html.twig +++ b/src/Bundle/ChillMainBundle/Resources/views/Notification/create.html.twig @@ -17,6 +17,7 @@ {{ form_start(form, { 'attr': { 'id': 'notification' }}) }} + {{ form_row(form.title) }} {{ form_row(form.addressees) }} {{ form_row(form.message) }} diff --git a/src/Bundle/ChillMainBundle/Resources/views/Notification/edit.html.twig b/src/Bundle/ChillMainBundle/Resources/views/Notification/edit.html.twig index db06caefa..edf9f3581 100644 --- a/src/Bundle/ChillMainBundle/Resources/views/Notification/edit.html.twig +++ b/src/Bundle/ChillMainBundle/Resources/views/Notification/edit.html.twig @@ -17,6 +17,7 @@ {{ form_start(form, { 'attr': { 'id': 'notification' }}) }} + {{ form_row(form.title) }} {{ form_row(form.addressees) }} {{ form_row(form.message) }} diff --git a/src/Bundle/ChillMainBundle/Resources/views/Notification/list.html.twig b/src/Bundle/ChillMainBundle/Resources/views/Notification/list.html.twig index 915f42c25..836883846 100644 --- a/src/Bundle/ChillMainBundle/Resources/views/Notification/list.html.twig +++ b/src/Bundle/ChillMainBundle/Resources/views/Notification/list.html.twig @@ -53,16 +53,23 @@ {% set notification = data.notification %}