Skip to content

Commit

Permalink
Suppression des dépréciations
Browse files Browse the repository at this point in the history
  • Loading branch information
stakovicz committed Feb 14, 2025
1 parent e6af094 commit 5b9fc13
Show file tree
Hide file tree
Showing 23 changed files with 81 additions and 31 deletions.
4 changes: 2 additions & 2 deletions app/Resources/views/event/ticket/ticket.html.twig
Original file line number Diff line number Diff line change
Expand Up @@ -5,15 +5,15 @@
{% form_theme ticketForm _self %}

{% block form_errors %}
{% spaceless %}
{% apply spaceless %}
{% if errors|length > 0 %}
<ul class="tickets--errors">
{% for error in errors %}
<li>{{ error.message }}</li>
{% endfor %}
</ul>
{% endif %}
{% endspaceless %}
{% endapply %}
{% endblock form_errors %}

{% block metas %}
Expand Down
4 changes: 3 additions & 1 deletion app/Resources/views/site/secondary_menu.html.twig
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
<div class="secondary-menu">
{% for item in menu if item.is_active %}
{% for item in menu %}
{% if item.is_active %}
<a href="" class="secondary-menu__current-item">{{ item.nom }}</a>
{% endif %}
{% endfor %}
<div class="mw1400p center">
<div class="secondary-menu__list">
Expand Down
2 changes: 1 addition & 1 deletion composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@
"doctrine/dbal": "^2.5",
"ekino/newrelic-bundle": "^1.4",
"erusev/parsedown": "^1.6",
"excelwebzone/recaptcha-bundle": "1.5.13",
"excelwebzone/recaptcha-bundle": "^1.5",
"ezyang/htmlpurifier": "^4.10",
"friendsofpear/pear_exception": "0.0.*",
"guzzlehttp/guzzle": "^6.5",
Expand Down
28 changes: 15 additions & 13 deletions composer.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

3 changes: 2 additions & 1 deletion sources/AppBundle/Association/Form/CompanyMemberType.php
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,8 @@ public function buildForm(FormBuilderInterface $builder, array $options): void
'maxMembers',
ChoiceType::class,
[
'choices' => $choices
'choices' => $choices,
'strict' => true
]
)
->add('invitations', CollectionType::class, [
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -138,6 +138,7 @@ public function buildForm(FormBuilderInterface $builder, array $options): void
'multiple' => true,
'required' => false,
'label' => "Présence dans ces antennes AFUP",
'strict' => true,
'constraints' => [
new Choice([
'choices' => array_values($antennesInfos),
Expand Down
4 changes: 3 additions & 1 deletion sources/AppBundle/Association/Form/ContactDetailsType.php
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,8 @@ public function buildForm(FormBuilderInterface $builder, array $options): void
->add('country', ChoiceType::class, [
'label' => 'Pays',
'choices' => $this->getCountyChoices(),
'preferred_choices' => ['FR']
'preferred_choices' => ['FR'],
'strict' => true
])
->add('phone', TextType::class, [
'required' => false,
Expand All @@ -78,6 +79,7 @@ public function buildForm(FormBuilderInterface $builder, array $options): void
])
->add('nearest_office', ChoiceType::class, [
'choices' => $this->getOfficesList(),
'strict' => true,
])
->add('username', TextType::class, [
'attr' => [
Expand Down
3 changes: 2 additions & 1 deletion sources/AppBundle/Association/Form/RegisterUserType.php
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,8 @@ public function buildForm(FormBuilderInterface $builder, array $options): void
])
->add('civility', ChoiceType::class, [
'choices' => ['M.' => User::CIVILITE_M, 'Mme' => User::CIVILITE_MME],
'required' => true
'required' => true,
'strict' => true
])
;

Expand Down
3 changes: 2 additions & 1 deletion sources/AppBundle/Association/Form/TicketEventType.php
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,8 @@ public function buildForm(FormBuilderInterface $builder, array $options): void
'constraints' => [
new NotBlank()
],
'label' => 'Type de ticket'
'label' => 'Type de ticket',
'strict' => true
])
->add('price', MoneyType::class, [
'currency' => 'EUR',
Expand Down
9 changes: 9 additions & 0 deletions sources/AppBundle/Association/Form/UserEditType.php
Original file line number Diff line number Diff line change
Expand Up @@ -44,11 +44,13 @@ public function buildForm(FormBuilderInterface $builder, array $options): void
'label' => 'Personne morale',
'required' => false,
'choices' => array_flip($this->personnesMorales->obtenirListe('id, CONCAT(raison_sociale, " (id : ", id, ")")', 'raison_sociale', true)),
'strict' => true,
])
->add('civility', ChoiceType::class, [
'label' => 'Civilité',
'required' => true,
'choices' => array_combine($civilities, $civilities),
'strict' => true,
])
->add('lastname', TextType::class, [
'label' => 'Nom',
Expand Down Expand Up @@ -125,6 +127,7 @@ public function buildForm(FormBuilderInterface $builder, array $options): void
],
'preferred_choices' => ['FR'],
'choices' => array_flip($this->pays->obtenirPays()),
'strict' => true,
])
->add('phone', TextType::class, [
'label' => 'Tél. fixe',
Expand Down Expand Up @@ -155,34 +158,39 @@ public function buildForm(FormBuilderInterface $builder, array $options): void
'Rédacteur' => User::LEVEL_WRITER,
'Administrateur' => User::LEVEL_ADMIN,
],
'strict' => true,
])
->add('directoryLevel', ChoiceType::class, [
'label' => 'Annuaire des prestataires',
'choices' => [
'--' => User::LEVEL_MEMBER,
'Gestionnaire' => User::LEVEL_ADMIN,
],
'strict' => true,
])
->add('eventLevel', ChoiceType::class, [
'label' => 'Évènement',
'choices' => [
'--' => User::LEVEL_MEMBER,
'Gestionnaire' => User::LEVEL_ADMIN,
],
'strict' => true,
])
->add('websiteLevel', ChoiceType::class, [
'label' => 'Site web',
'choices' => [
'--' => User::LEVEL_MEMBER,
'Gestionnaire' => User::LEVEL_ADMIN,
],
'strict' => true,
])
->add('officeLevel', ChoiceType::class, [
'label' => 'Antenne AFUP',
'choices' => [
'--' => User::LEVEL_MEMBER,
'Gestionnaire' => User::LEVEL_ADMIN,
],
'strict' => true,
])
->add('status', ChoiceType::class, [
'label' => 'État',
Expand All @@ -191,6 +199,7 @@ public function buildForm(FormBuilderInterface $builder, array $options): void
'Actif' => User::STATUS_ACTIVE,
'Inactif' => User::STATUS_INACTIVE,
],
'strict' => true,
])
->add('username', TextType::class, [
'label' => 'Login',
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -658,12 +658,14 @@ public function generalMeeting(Request $request)
'choices' => [
'Je participe' => 1,
'Je ne participe pas' => 2
]
],
'strict' => true
])
->add('id_personne_avec_pouvoir', ChoiceType::class, [
'choices' => array_flip($generalMeetingRepository->getPowerSelectionList($latestDate, $user->getUsername())),
'label' => 'Je donne mon pouvoir à',
'required' => false,
'strict' => true,
])
->add('save', SubmitType::class, [
'label' => 'Confirmer'
Expand Down
1 change: 1 addition & 0 deletions sources/AppBundle/Event/Form/EventSelectType.php
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,7 @@ public function buildForm(FormBuilderInterface $builder, array $options): void
$builder
->add('id', ChoiceType::class,
[
'strict' => true,
'choice_label' => 'title',
'choice_value' => 'id',
'data' => $options['data'] ?? null,
Expand Down
3 changes: 2 additions & 1 deletion sources/AppBundle/Event/Form/LeadType.php
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,8 @@ public function buildForm(FormBuilderInterface $builder, array $options): void
->add('email', EmailType::class)
->add('language', ChoiceType::class, [
'choices' => ['fr' => 'fr', 'en' => 'en'],
'multiple' => false
'multiple' => false,
'strict' => true
])
->add('recaptcha', EWZRecaptchaType::class, [
'label' => 'Vérification',
Expand Down
5 changes: 4 additions & 1 deletion sources/AppBundle/Event/Form/PurchaseType.php
Original file line number Diff line number Diff line change
Expand Up @@ -49,6 +49,7 @@ public function buildForm(FormBuilderInterface $builder, array $options): void
'multiple' => false,
'expanded' => false,
'mapped' => false,
'strict' => true,
'data' => 1
])
->add('tickets', CollectionType::class, [
Expand All @@ -70,7 +71,8 @@ public function buildForm(FormBuilderInterface $builder, array $options): void
'Virement' => Ticket::PAYMENT_BANKWIRE
],
'expanded' => true,
'multiple' => false
'multiple' => false,
'strict' => true
])
->add('firstname', TextType::class)
->add('lastname', TextType::class)
Expand All @@ -81,6 +83,7 @@ public function buildForm(FormBuilderInterface $builder, array $options): void
->add('city', TextType::class)
->add('countryId', ChoiceType::class, [
'label' => 'Country',
'strict' => true,
'choices' => array_flip($this->country->obtenirPays())
])
->add('companyCitation', CheckboxType::class, [
Expand Down
2 changes: 1 addition & 1 deletion sources/AppBundle/Event/Form/SpeakerType.php
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ public function __construct(
public function buildForm(FormBuilderInterface $builder, array $options): void
{
$builder
->add('civility', ChoiceType::class, ['choices' => ['M' => 'M', 'Mme' => 'Mme']])
->add('civility', ChoiceType::class, ['choices' => ['M' => 'M', 'Mme' => 'Mme'], 'strict' => true])
->add('firstname', TextType::class)
->add('lastname', TextType::class)
->add('email', EmailType::class)
Expand Down
7 changes: 5 additions & 2 deletions sources/AppBundle/Event/Form/SponsorTicketType.php
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,8 @@ public function buildForm(FormBuilderInterface $builder, array $options): void
'choices' => [
'M.' => 'M.',
'Mme' => 'Mme'
]
],
'strict' => true
])
->add('firstname', TextType::class, [
'label' => 'Prénom'
Expand All @@ -46,13 +47,15 @@ public function buildForm(FormBuilderInterface $builder, array $options): void
'required' => true,
'constraints' => [new NotBlank()],
'choices' => array_flip($transportMode),
'strict' => true,
])
->add('transport_distance', ChoiceType::class, [
'label' => 'La distance parcourue ?',
'placeholder' => '',
'required' => true,
'constraints' => [new NotBlank()],
'choices' => array_flip(Ticket::TRANSPORT_DISTANCES)
'choices' => array_flip(Ticket::TRANSPORT_DISTANCES),
'strict' => true
]);
}
}
Expand Down
9 changes: 6 additions & 3 deletions sources/AppBundle/Event/Form/TalkType.php
Original file line number Diff line number Diff line change
Expand Up @@ -38,14 +38,16 @@ public function buildForm(FormBuilderInterface $builder, array $options): void
'choices' => [
'Conférence plénière (40 mn)' => Talk::TYPE_FULL_LONG,
'Conférence plénière (20 mn)' => Talk::TYPE_FULL_SHORT,
]
],
'strict' => true
])
->add('skill', ChoiceType::class, ['label' => 'Niveau requis', 'choices' => [
'Débutant' => Talk::SKILL_JUNIOR,
'Intermédiaire' => Talk::SKILL_MEDIOR,
'Avancé' => Talk::SKILL_SENIOR,
'N/A' => Talk::SKILL_NA
]
],
'strict' => true
]);

if (!$options[self::IS_AFUP_DAY]) {
Expand Down Expand Up @@ -79,7 +81,8 @@ public function buildForm(FormBuilderInterface $builder, array $options): void
'label' => "Autoriser l’AFUP à transmettre ma proposition de conférence à ses antennes locales ?
Les équipes des antennes AFUP peuvent être intéressées par votre sujet en vue d’un événement local
(meetup, Super Apéro PHP, soirée d’élection dans l’antenne...)
et pourrait aimer vous inviter dans leur ville."
et pourrait aimer vous inviter dans leur ville.",
'strict' => true
])
->add('save', SubmitType::class, ['label' => 'Sauvegarder']);
}
Expand Down
7 changes: 6 additions & 1 deletion sources/AppBundle/Event/Form/TicketType.php
Original file line number Diff line number Diff line change
Expand Up @@ -75,7 +75,8 @@ public function buildForm(FormBuilderInterface $builder, array $options): void
'choices' => [
'M.' => 'M.',
'Mme' => 'Mme'
]
],
'strict' => true
])
->add('firstname', TextType::class, [
'label' => 'Prénom'
Expand All @@ -94,6 +95,7 @@ public function buildForm(FormBuilderInterface $builder, array $options): void
'label' => 'Antenne de prédilection',
'required' => false,
'choices' => array_flip($this->antennesCollection->getOrderedLabelsByKey()),
'strict' => true,
])
;

Expand Down Expand Up @@ -132,6 +134,7 @@ public function buildForm(FormBuilderInterface $builder, array $options): void
'choices' => $filteredEventTickets,
'choice_label' => 'ticketType.prettyName',
'error_bubbling' => false,
'strict' => true,
'choice_attr' => function (TicketEventType $type, $key, $index) use ($options, $event): array {
$attr = [
'data-description' => $type->getDescription(),
Expand Down Expand Up @@ -165,12 +168,14 @@ public function buildForm(FormBuilderInterface $builder, array $options): void
'label' => 'Quel est votre mode de transport ?',
'required' => true,
'choices' => ['' => ''] + array_flip($transportMode),
'strict' => true,
]);

$builder->add('transportDistance', ChoiceType::class, [
'label' => 'Quelle sera la distance parcourue ?',
'required' => true,
'choices' => ['' => ''] + array_flip(Ticket::TRANSPORT_DISTANCES),
'strict' => true,
]);
}

Expand Down
Loading

0 comments on commit 5b9fc13

Please sign in to comment.