Skip to content

Commit 70a0372

Browse files
committed
IBX-9060: Moved submit button definition back to SelectionType
1 parent 801a4c6 commit 70a0372

File tree

2 files changed

+6
-3
lines changed

2 files changed

+6
-3
lines changed

src/bundle/Controller/NotificationController.php

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,6 @@
2222
use Ibexa\Core\Notification\Renderer\Registry;
2323
use InvalidArgumentException;
2424
use Pagerfanta\Pagerfanta;
25-
use Symfony\Component\Form\Extension\Core\Type\SubmitType;
2625
use Symfony\Component\HttpFoundation\JsonResponse;
2726
use Symfony\Component\HttpFoundation\Request;
2827
use Symfony\Component\HttpFoundation\Response;
@@ -115,9 +114,7 @@ public function renderNotificationsPageAction(Request $request, int $page): Resp
115114
}
116115

117116
$formData = $this->createNotificationSelectionData($pagerfanta);
118-
119117
$deleteForm = $this->formFactory->deleteNotification($formData);
120-
$deleteForm->add('remove', SubmitType::class);
121118

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

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

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,7 @@
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;
1516
use Symfony\Component\Form\FormBuilderInterface;
1617
use Symfony\Component\OptionsResolver\OptionsResolver;
1718

@@ -30,6 +31,11 @@ public function buildForm(FormBuilderInterface $builder, array $options): void
3031
'label' => false,
3132
]
3233
);
34+
35+
$builder->add(
36+
'remove',
37+
SubmitType::class
38+
);
3339
}
3440

3541
public function configureOptions(OptionsResolver $resolver): void

0 commit comments

Comments
 (0)