prepare release 1.7 (#1388)
This commit is contained in:
42
src/Form/Type/ThemeLayoutType.php
Normal file
42
src/Form/Type/ThemeLayoutType.php
Normal file
@@ -0,0 +1,42 @@
|
||||
<?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\ChoiceType;
|
||||
use Symfony\Component\OptionsResolver\OptionsResolver;
|
||||
|
||||
/**
|
||||
* Custom form field type to select the theme layout.
|
||||
*/
|
||||
class ThemeLayoutType extends AbstractType
|
||||
{
|
||||
/**
|
||||
* {@inheritdoc}
|
||||
*/
|
||||
public function configureOptions(OptionsResolver $resolver)
|
||||
{
|
||||
$resolver->setDefaults([
|
||||
'required' => true,
|
||||
'choices' => [
|
||||
'fixed' => 'fixed',
|
||||
'boxed' => 'boxed',
|
||||
]
|
||||
]);
|
||||
}
|
||||
|
||||
/**
|
||||
* {@inheritdoc}
|
||||
*/
|
||||
public function getParent()
|
||||
{
|
||||
return ChoiceType::class;
|
||||
}
|
||||
}
|
||||
@@ -37,8 +37,8 @@ class UserCreateType extends UserEditType
|
||||
->add('plainPassword', RepeatedType::class, [
|
||||
'required' => true,
|
||||
'type' => PasswordType::class,
|
||||
'first_options' => ['label' => 'label.password'],
|
||||
'second_options' => ['label' => 'label.password_repeat'],
|
||||
'first_options' => ['label' => 'label.password', 'attr' => ['autocomplete' => 'new-password']],
|
||||
'second_options' => ['label' => 'label.password_repeat', 'attr' => ['autocomplete' => 'new-password']],
|
||||
]);
|
||||
|
||||
parent::buildForm($builder, $options);
|
||||
|
||||
@@ -29,8 +29,8 @@ class UserPasswordType extends AbstractType
|
||||
$builder
|
||||
->add('plainPassword', RepeatedType::class, [
|
||||
'type' => PasswordType::class,
|
||||
'first_options' => ['label' => 'label.password'],
|
||||
'second_options' => ['label' => 'label.password_repeat'],
|
||||
'first_options' => ['label' => 'label.password', 'attr' => ['autocomplete' => 'new-password']],
|
||||
'second_options' => ['label' => 'label.password_repeat', 'attr' => ['autocomplete' => 'new-password']],
|
||||
])
|
||||
;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user