mirror of
https://github.com/MarijnDoeve/TijdVoorDeTest.git
synced 2026-03-06 20:54:20 +01:00
Refactor elimination feature and improve backoffice usability
This commit introduces a refactored EliminationFactory for better modularity, updates the elimination preparation process, and adds functionality to view eliminations. Backoffice templates and forms have been reorganized, minor translations were corrected, and additional assets like styles and flashes were included for enhanced user experience.
This commit is contained in:
@@ -19,7 +19,7 @@ class AddCandidatesFormType extends AbstractType
|
||||
{
|
||||
$builder
|
||||
->add('candidates', TextareaType::class, [
|
||||
'label' => $this->translator->trans('Candidates'),
|
||||
'label' => $this->translator->trans('Candidates'), 'translation_domain' => false,
|
||||
])
|
||||
;
|
||||
}
|
||||
|
||||
@@ -21,6 +21,7 @@ class CreateSeasonFormType extends AbstractType
|
||||
$builder
|
||||
->add('name', TextType::class, [
|
||||
'label' => $this->translator->trans('Season Name'),
|
||||
'translation_domain' => false,
|
||||
])
|
||||
;
|
||||
}
|
||||
|
||||
@@ -18,7 +18,11 @@ class EnterNameType extends AbstractType
|
||||
{
|
||||
$builder
|
||||
->add('name', TextType::class,
|
||||
['required' => true, 'label' => $this->translator->trans('Enter your name')],
|
||||
[
|
||||
'required' => true,
|
||||
'label' => $this->translator->trans('Enter your name'),
|
||||
'translation_domain' => false,
|
||||
],
|
||||
)
|
||||
;
|
||||
}
|
||||
|
||||
@@ -8,6 +8,7 @@ use App\Entity\User;
|
||||
use Symfony\Component\Form\AbstractType;
|
||||
use Symfony\Component\Form\Extension\Core\Type\EmailType;
|
||||
use Symfony\Component\Form\Extension\Core\Type\PasswordType;
|
||||
use Symfony\Component\Form\Extension\Core\Type\RepeatedType;
|
||||
use Symfony\Component\Form\FormBuilderInterface;
|
||||
use Symfony\Component\OptionsResolver\OptionsResolver;
|
||||
use Symfony\Component\Validator\Constraints\Length;
|
||||
@@ -27,11 +28,16 @@ class RegistrationFormType extends AbstractType
|
||||
->add('email', EmailType::class, [
|
||||
'label' => $this->translator->trans('Email'),
|
||||
'attr' => ['autocomplete' => 'email'],
|
||||
'translation_domain' => false,
|
||||
])
|
||||
->add('plainPassword', PasswordType::class, [
|
||||
'label' => $this->translator->trans('Password'),
|
||||
->add('plainPassword', RepeatedType::class, [
|
||||
'type' => PasswordType::class,
|
||||
'invalid_message' => $this->translator->trans('The password fields must match.'),
|
||||
'options' => ['attr' => ['class' => 'password-field']],
|
||||
'required' => true,
|
||||
'first_options' => ['label' => $this->translator->trans('Password')],
|
||||
'second_options' => ['label' => $this->translator->trans('Repeat Password')],
|
||||
'mapped' => false,
|
||||
'attr' => ['autocomplete' => 'new-password'],
|
||||
'constraints' => [
|
||||
new NotBlank([
|
||||
'message' => 'Please enter a password',
|
||||
@@ -43,6 +49,7 @@ class RegistrationFormType extends AbstractType
|
||||
'max' => 4096,
|
||||
]),
|
||||
],
|
||||
'translation_domain' => false,
|
||||
])
|
||||
;
|
||||
}
|
||||
|
||||
@@ -20,7 +20,7 @@ class SelectSeasonType extends AbstractType
|
||||
{
|
||||
$builder
|
||||
->add('season_code', TextType::class,
|
||||
['required' => true, 'constraints' => new Regex(pattern: "/^[A-Za-z\d]{5}$/"), 'label' => $this->translator->trans('Season Code')]
|
||||
['required' => true, 'constraints' => new Regex(pattern: "/^[A-Za-z\d]{5}$/"), 'label' => $this->translator->trans('Season Code'), 'translation_domain' => false]
|
||||
)
|
||||
;
|
||||
}
|
||||
|
||||
@@ -23,11 +23,13 @@ class UploadQuizFormType extends AbstractType
|
||||
$builder
|
||||
->add('name', TextType::class, [
|
||||
'label' => $this->translator->trans('Quiz name'),
|
||||
'translation_domain' => false,
|
||||
])
|
||||
->add('sheet', FileType::class, [
|
||||
'label' => $this->translator->trans('Quiz (xlsx)'),
|
||||
'mapped' => false,
|
||||
'required' => true,
|
||||
'translation_domain' => false,
|
||||
'constraints' => [
|
||||
new File([
|
||||
'maxSize' => '1024k',
|
||||
|
||||
Reference in New Issue
Block a user