Allow deleting snips (including git repo)
This commit is contained in:
33
src/Form/ConfirmationType.php
Normal file
33
src/Form/ConfirmationType.php
Normal file
@ -0,0 +1,33 @@
|
||||
<?php
|
||||
|
||||
namespace App\Form;
|
||||
|
||||
use Symfony\Component\Form\AbstractType;
|
||||
use Symfony\Component\Form\Extension\Core\Type\CheckboxType;
|
||||
use Symfony\Component\Form\Extension\Core\Type\SubmitType;
|
||||
use Symfony\Component\Form\FormBuilderInterface;
|
||||
use Symfony\Component\OptionsResolver\OptionsResolver;
|
||||
use Symfony\Component\Validator\Constraints\IsTrue;
|
||||
|
||||
class ConfirmationType extends AbstractType
|
||||
{
|
||||
public function buildForm(FormBuilderInterface $builder, array $options): void
|
||||
{
|
||||
$builder
|
||||
->add('Check', CheckboxType::class, [
|
||||
'constraints' => [
|
||||
new IsTrue([
|
||||
'message' => $options['message_wrong'],
|
||||
]),
|
||||
],
|
||||
])
|
||||
->add('confirm', SubmitType::class);
|
||||
}
|
||||
|
||||
public function configureOptions(OptionsResolver $resolver): void
|
||||
{
|
||||
$resolver->setDefaults([
|
||||
'message_wrong' => 'This should be checked.',
|
||||
]);
|
||||
}
|
||||
}
|
Reference in New Issue
Block a user