Fix Date time immutable issues on forms
This commit is contained in:
@@ -1,3 +1,3 @@
|
|||||||
{
|
{
|
||||||
"version": "0.1.3"
|
"version": "0.1.4"
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -4,7 +4,6 @@ namespace App\Form;
|
|||||||
|
|
||||||
use App\Entity\Bracelet;
|
use App\Entity\Bracelet;
|
||||||
use App\Form\DocumentType;
|
use App\Form\DocumentType;
|
||||||
use App\Form\Type\DateTimeVisionType;
|
|
||||||
use Symfony\Component\Form\FormBuilderInterface;
|
use Symfony\Component\Form\FormBuilderInterface;
|
||||||
use Symfony\Component\OptionsResolver\OptionsResolver;
|
use Symfony\Component\OptionsResolver\OptionsResolver;
|
||||||
|
|
||||||
@@ -14,7 +13,10 @@ class BraceletType extends DocumentType
|
|||||||
{
|
{
|
||||||
parent::buildForm($builder, $options);
|
parent::buildForm($builder, $options);
|
||||||
$builder
|
$builder
|
||||||
->add('removingDate', DateTimeVisionType::class, ['label' => 'form_label_removing_date'])
|
->add('removingDate', null, [
|
||||||
|
'label' => 'form_label_removing_date',
|
||||||
|
'view_timezone' => array_key_exists('TZ', $_ENV) ? $_ENV['TZ'] : false
|
||||||
|
])
|
||||||
;
|
;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -19,13 +19,21 @@ class JailType extends DocumentType
|
|||||||
$builder
|
$builder
|
||||||
->add(
|
->add(
|
||||||
'arrestedAt',
|
'arrestedAt',
|
||||||
DateTimeVisionType::class,
|
null,
|
||||||
['label' => 'form_label_arrested_at', 'help' => 'form_help_arrested_at']
|
[
|
||||||
|
'label' => 'form_label_arrested_at',
|
||||||
|
'help' => 'form_help_arrested_at',
|
||||||
|
'view_timezone' => array_key_exists('TZ', $_ENV) ? $_ENV['TZ'] : false
|
||||||
|
]
|
||||||
)
|
)
|
||||||
->add(
|
->add(
|
||||||
'jailedAt',
|
'jailedAt',
|
||||||
DateTimeVisionType::class,
|
null,
|
||||||
['label' => 'form_label_jailed_at', 'help' => 'form_help_jailed_at']
|
[
|
||||||
|
'label' => 'form_label_jailed_at',
|
||||||
|
'help' => 'form_help_jailed_at',
|
||||||
|
'view_timezone' => array_key_exists('TZ', $_ENV) ? $_ENV['TZ'] : false
|
||||||
|
]
|
||||||
)
|
)
|
||||||
->add('lawyer', CheckboxType::class, ['label' => 'form_label_asked_for_lawyer', 'required' => false])
|
->add('lawyer', CheckboxType::class, ['label' => 'form_label_asked_for_lawyer', 'required' => false])
|
||||||
->add('medic', CheckboxType::class, ['label' => 'form_label_asked_for_medic', 'required' => false])
|
->add('medic', CheckboxType::class, ['label' => 'form_label_asked_for_medic', 'required' => false])
|
||||||
|
|||||||
@@ -19,7 +19,11 @@ class LicenceWithdrawalType extends DocumentType
|
|||||||
$builder
|
$builder
|
||||||
|
|
||||||
->add('type', VehicleType::class)
|
->add('type', VehicleType::class)
|
||||||
->add('until', DateTimeVisionType::class, ['label' => 'form_label_until', 'help' => 'form_help_until'])
|
->add('until', null, [
|
||||||
|
'label' => 'form_label_until',
|
||||||
|
'help' => 'form_help_until',
|
||||||
|
'view_timezone' => array_key_exists('TZ', $_ENV) ? $_ENV['TZ'] : false
|
||||||
|
])
|
||||||
;
|
;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user