Skip to content

Commit 083c326

Browse files
committed
IBX-9060: Added submit buttons to notification selection forms
1 parent 46edda7 commit 083c326

File tree

2 files changed

+4
-6
lines changed

2 files changed

+4
-6
lines changed

src/bundle/Controller/NotificationController.php

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,7 @@
2121
use Ibexa\Contracts\Core\SiteAccess\ConfigResolverInterface;
2222
use Ibexa\Core\Notification\Renderer\Registry;
2323
use Pagerfanta\Pagerfanta;
24+
use Symfony\Component\Form\Extension\Core\Type\SubmitType;
2425
use Symfony\Component\HttpFoundation\JsonResponse;
2526
use Symfony\Component\HttpFoundation\Request;
2627
use Symfony\Component\HttpFoundation\Response;
@@ -115,7 +116,10 @@ public function renderNotificationsPageAction(Request $request, int $page): Resp
115116
$formData = $this->createNotificationSelectionData($pagerfanta);
116117

117118
$deleteForm = $this->formFactory->deleteNotification($formData);
119+
$deleteForm->add('remove', SubmitType::class);
120+
118121
$markAsReadForm = $this->formFactory->markNotificationAsRead($formData);
122+
$markAsReadForm->add('mark_as_read', SubmitType::class);
119123

120124
$template = $request->attributes->get('template', '@ibexadesign/account/notifications/list.html.twig');
121125

src/lib/Form/Type/Notification/NotificationSelectionType.php

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,6 @@
1212
use Symfony\Component\Form\AbstractType;
1313
use Symfony\Component\Form\Extension\Core\Type\CheckboxType;
1414
use Symfony\Component\Form\Extension\Core\Type\CollectionType;
15-
use Symfony\Component\Form\Extension\Core\Type\SubmitType;
1615
use Symfony\Component\Form\FormBuilderInterface;
1716
use Symfony\Component\OptionsResolver\OptionsResolver;
1817

@@ -31,11 +30,6 @@ public function buildForm(FormBuilderInterface $builder, array $options): void
3130
'label' => false,
3231
]
3332
);
34-
35-
$builder->add(
36-
'remove',
37-
SubmitType::class
38-
);
3933
}
4034

4135
public function configureOptions(OptionsResolver $resolver): void

0 commit comments

Comments
 (0)