Allow deleting snips (including git repo)

This commit is contained in:
Tim
2023-04-06 20:46:30 +02:00
parent 004044022d
commit df708aa931
5 changed files with 69 additions and 1 deletions

View 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.',
]);
}
}