allow to configure calendar slot duration (#1269)

This commit is contained in:
Kevin Papst
2019-11-22 01:30:25 +01:00
committed by GitHub
parent 9222075c7a
commit 60d16016e8
3 changed files with 14 additions and 0 deletions

View File

@@ -34,6 +34,7 @@ use Symfony\Component\Routing\Annotation\Route;
use Symfony\Component\Validator\Constraints\DateTime;
use Symfony\Component\Validator\Constraints\GreaterThanOrEqual;
use Symfony\Component\Validator\Constraints\NotNull;
use Symfony\Component\Validator\Constraints\Regex;
/**
* Controller used for executing system relevant tasks.
@@ -346,6 +347,11 @@ class SystemConfigurationController extends AbstractController
->setTranslationDomain('system-configuration')
->setType(TextType::class)
->setConstraints([new DateTime(['format' => 'H:i']), new NotNull()]),
(new Configuration())
->setName('calendar.slot_duration')
->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 SystemConfigurationModel())
->setSection(SystemConfigurationModel::SECTION_BRANDING)