allow to configure timezone for the lockdown period (#2593)

This commit is contained in:
Kevin Papst
2021-06-02 00:05:44 +02:00
committed by GitHub
parent c1eb5ba90a
commit 286b63e2c8
16 changed files with 163 additions and 41 deletions

View File

@@ -11,13 +11,13 @@ namespace App\Form;
use App\Entity\Customer;
use App\Form\Type\MailType;
use App\Form\Type\TimezoneType;
use Symfony\Component\Form\AbstractType;
use Symfony\Component\Form\Extension\Core\Type\CountryType;
use Symfony\Component\Form\Extension\Core\Type\CurrencyType;
use Symfony\Component\Form\Extension\Core\Type\TelType;
use Symfony\Component\Form\Extension\Core\Type\TextareaType;
use Symfony\Component\Form\Extension\Core\Type\TextType;
use Symfony\Component\Form\Extension\Core\Type\TimezoneType;
use Symfony\Component\Form\Extension\Core\Type\UrlType;
use Symfony\Component\Form\FormBuilderInterface;
use Symfony\Component\OptionsResolver\OptionsResolver;

View File

@@ -12,6 +12,7 @@ namespace App\Form\Model;
class SystemConfiguration
{
public const SECTION_ROUNDING = 'rounding';
public const SECTION_LOCKDOWN = 'lockdown_period';
public const SECTION_TIMESHEET = 'timesheet';
public const SECTION_FORM_INVOICE = 'invoice';
public const SECTION_FORM_CUSTOMER = 'form_customer';

View File

@@ -0,0 +1,37 @@
<?php
/*
* This file is part of the Kimai time-tracking app.
*
* For the full copyright and license information, please view the LICENSE
* file that was distributed with this source code.
*/
namespace App\Form\Type;
use Symfony\Component\Form\AbstractType;
use Symfony\Component\Form\Extension\Core\Type\TimezoneType as BaseTimezoneType;
use Symfony\Component\OptionsResolver\OptionsResolver;
class TimezoneType extends AbstractType
{
public function getBlockPrefix()
{
return 'timezone_type';
}
public function configureOptions(OptionsResolver $resolver)
{
$resolver->setDefaults([
'intl' => false,
]);
}
/**
* {@inheritdoc}
*/
public function getParent()
{
return BaseTimezoneType::class;
}
}

View File

@@ -12,11 +12,11 @@ namespace App\Form;
use App\Entity\User;
use App\Form\Type\AvatarType;
use App\Form\Type\LanguageType;
use App\Form\Type\TimezoneType;
use App\Form\Type\YesNoType;
use Symfony\Component\Form\AbstractType;
use Symfony\Component\Form\Extension\Core\Type\EmailType;
use Symfony\Component\Form\Extension\Core\Type\TextType;
use Symfony\Component\Form\Extension\Core\Type\TimezoneType;
use Symfony\Component\Form\FormBuilderInterface;
use Symfony\Component\OptionsResolver\OptionsResolver;