feat: forced teamer data verification after configured due dates

addresses #869b33c7p
This commit is contained in:
Björn Fromme
2026-03-15 12:42:28 +01:00
parent 20da6a0afc
commit 518bc7339f
19 changed files with 357 additions and 14 deletions
+17
View File
@@ -7,6 +7,7 @@ use App\Model\UploadSessionDto;
use App\Service\Upload\UploadHandler;
use Symfony\Component\Form\AbstractType;
use Symfony\Component\Form\Extension\Core\Type\BirthdayType;
use Symfony\Component\Form\Extension\Core\Type\CheckboxType;
use Symfony\Component\Form\Extension\Core\Type\ChoiceType;
use Symfony\Component\Form\Extension\Core\Type\CollectionType;
use Symfony\Component\Form\Extension\Core\Type\TextType;
@@ -14,6 +15,7 @@ use Symfony\Component\Form\FormBuilderInterface;
use Symfony\Component\Form\FormInterface;
use Symfony\Component\Form\FormView;
use Symfony\Component\OptionsResolver\OptionsResolver;
use Symfony\Component\Validator\Constraints\IsTrue;
class TeamerProfileType extends AbstractType
{
@@ -94,6 +96,19 @@ class TeamerProfileType extends AbstractType
],
])
;
if (true === $options['verification_mode']) {
$builder->add('confirmDataVerification', CheckboxType::class, [
'label' => 'Ich bestätige, dass meine Daten korrekt und aktuell sind',
'mapped' => false,
'constraints' => [
new IsTrue([
'message' => 'Deine Bestätigung ist erforderlich',
'groups' => ['profile'],
]),
],
]);
}
}
public function buildView(FormView $view, FormInterface $form, array $options): void
@@ -114,9 +129,11 @@ class TeamerProfileType extends AbstractType
'profile',
],
'anti_xss' => true,
'verification_mode' => false,
])
->setRequired(['upload_session'])
->setAllowedTypes('upload_session', UploadSessionDto::class)
->setAllowedTypes('verification_mode', 'bool')
;
}
}