limit amount of items in calendar drag and drop boxes (#2291)

This commit is contained in:
Kevin Papst
2021-07-11 15:03:18 +02:00
committed by GitHub
parent 2583fdf20e
commit a1f90ffaba
13 changed files with 178 additions and 82 deletions

View File

@@ -44,6 +44,7 @@ use Symfony\Component\Routing\Annotation\Route;
use Symfony\Component\Validator\Constraints\GreaterThanOrEqual;
use Symfony\Component\Validator\Constraints\NotBlank;
use Symfony\Component\Validator\Constraints\NotNull;
use Symfony\Component\Validator\Constraints\Range;
use Symfony\Component\Validator\Constraints\Regex;
/**
@@ -582,6 +583,11 @@ final class SystemConfigurationController extends AbstractController
->setTranslationDomain('system-configuration')
->setType(TextType::class)
->setConstraints([new Regex(['pattern' => '/[0-2]{1}[0-9]{1}:[0-9]{2}:[0-9]{2}/']), new NotNull()]),
(new Configuration())
->setName('calendar.dragdrop_amount')
->setTranslationDomain('system-configuration')
->setType(IntegerType::class)
->setConstraints([new Range(['min' => 0, 'max' => 20]), new NotNull()]),
]),
(new SystemConfigurationModel())
->setSection(SystemConfigurationModel::SECTION_BRANDING)