[TASK] Better use Extbase for dialogs

Change-Id: I79b3555e7d84b0eda7ac227443ece898b0befda2
Resolves: #57445
Reviewed-on: https://review.typo3.org/29077
Reviewed-by: Xavier Perseguers
Tested-by: Xavier Perseguers