Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[dev] Ajout de config manquante pour Symfony 4 #1119

Open
wants to merge 6 commits into
base: dev
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions .env.dist
Original file line number Diff line number Diff line change
Expand Up @@ -77,6 +77,7 @@ REGISTRATION_DURATION='1 year'
REGISTRATION_EVERY_CIVIL_YEAR=false
REGISTRATION_MANUAL_ENABLED=true
HELLOASSO_REGISTRATION_CAMPAIGN_URL=https://www.helloasso.com/associations/my-local-coop/adhesions/re-adhesion
HELLOASSO_CAMPAIGN_ID=
HELLOASSO_API_KEY=
HELLOASSO_API_PASSWORD=
HELLOASSO_API_BASE_URL=https://api.helloasso.com/v3/
Expand Down
1 change: 1 addition & 0 deletions .env.oidc.test
Original file line number Diff line number Diff line change
Expand Up @@ -80,6 +80,7 @@ REGISTRATION_DURATION='1 year'
REGISTRATION_EVERY_CIVIL_YEAR=false
REGISTRATION_MANUAL_ENABLED=true
HELLOASSO_REGISTRATION_CAMPAIGN_URL=https://www.helloasso.com/associations/my-local-coop/adhesions/re-adhesion
HELLOASSO_CAMPAIGN_ID=
HELLOASSO_API_KEY=
HELLOASSO_API_PASSWORD=
HELLOASSO_API_BASE_URL=https://api.helloasso.com/v3/
Expand Down
1 change: 1 addition & 0 deletions .env.test
Original file line number Diff line number Diff line change
Expand Up @@ -80,6 +80,7 @@ REGISTRATION_DURATION='1 year'
REGISTRATION_EVERY_CIVIL_YEAR=false
REGISTRATION_MANUAL_ENABLED=true
HELLOASSO_REGISTRATION_CAMPAIGN_URL=https://www.helloasso.com/associations/my-local-coop/adhesions/re-adhesion
HELLOASSO_CAMPAIGN_ID=
HELLOASSO_API_KEY=
HELLOASSO_API_PASSWORD=
HELLOASSO_API_BASE_URL=https://api.helloasso.com/v3/
Expand Down
9 changes: 7 additions & 2 deletions config/services.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -52,12 +52,14 @@ parameters:
forbid_own_shift_validate_admin: '%env(bool:FORBID_OWN_SHIFT_VALIDATE_ADMIN)%'
forbid_own_timelog_new_admin: '%env(bool:FORBID_OWN_TIMELOG_NEW_ADMIN)%'
forbid_shift_overlap_time: '%env(FORBID_SHIFT_OVERLAP_TIME)%'
max_time_at_end_of_shift: '%env(MAX_TIME_AT_END_OF_SHIFT)%'
github_repo_url: 'elefan-grenoble/gestion-compte'
github_current_release: 'v1.45.7' # x-release-please-version
helloasso_api_base_url: '%env(HELLOASSO_API_BASE_URL)%'
helloasso_registration_campaign_url: '%env(HELLOASSO_REGISTRATION_CAMPAIGN_URL)%'
helloasso_campaign_id: '%env(HELLOASSO_CAMPAIGN_ID)%'
helloasso_api_key: '%env(HELLOASSO_API_KEY)%'
helloasso_api_password: '%env(HELLOASSO_API_PASSWORD)%'
helloasso_registration_campaign_url: '%env(HELLOASSO_REGISTRATION_CAMPAIGN_URL)%'
helloasso_api_base_url: '%env(HELLOASSO_API_BASE_URL)%'
images_tmp_dir: '%kernel.project_dir%/web/tmp'
locale: fr_FR
local_currency_name: '%env(LOCAL_CURRENCY_NAME)%'
Expand Down Expand Up @@ -130,9 +132,12 @@ parameters:
project_url_display: '%env(PROJECT_URL_DISPLAY)%'
registration_duration: '%env(REGISTRATION_DURATION)%'
registration_every_civil_year: '%env(bool:REGISTRATION_EVERY_CIVIL_YEAR)%'
reserve_new_shift_to_prior_shifter: '%env(bool:RESERVE_NEW_SHIFT_TO_PRIOR_SHIFTER)%'
reserve_new_shift_to_prior_shifter_delay: '%env(RESERVE_NEW_SHIFT_TO_PRIOR_SHIFTER_DELAY)%'
site_name: '%env(SITE_NAME)%'
super_admin.initial_password: '%env(SUPER_ADMIN_INITIAL_PASSWORD)%'
super_admin.username: '%env(SUPER_ADMIN_USERNAME)%'
use_card_reader_to_validate_shifts: '%env(bool:USE_CARD_READER_TO_VALIDATE_SHIFTS)%'
swipe_card_logging: '%env(bool:SWIPE_CARD_LOGGING)%'
swipe_card_logging_anonymous: '%env(bool:SWIPE_CARD_LOGGING_ANONYMOUS)%'
time_after_which_members_are_late_with_shifts: '%env(TIME_AFTER_WHICH_MEMBERS_ARE_LATE_WITH_SHIFTS)%'
Expand Down
3 changes: 2 additions & 1 deletion src/Controller/AdminClosingExceptionController.php
Original file line number Diff line number Diff line change
Expand Up @@ -147,8 +147,9 @@ public function widgetGeneratorAction(Request $request)
))
->add('generate', SubmitType::class, array('label' => 'Générer'))
->getForm();
$form->handleRequest($request);

if ($form->handleRequest($request)->isValid()) {
if ($form->isSubmitted() && $form->isValid()) {
$data = $form->getData();

$widgetQueryString = 'title=' . ($data['title'] ? 1 : 0);
Expand Down
4 changes: 2 additions & 2 deletions src/Controller/AdminController.php
Original file line number Diff line number Diff line change
Expand Up @@ -245,9 +245,9 @@ public function csvImportAction(Request $request, KernelInterface $kernel)
//->add('persist', CheckboxType::class, array('required' => false, 'label' => 'Sauver en base'))
//->add('compute', SubmitType::class, array('label' => 'Importer les données'))
->getForm();
$form->handleRequest($request);

if ($form->handleRequest($request)->isValid()) {

if ($form->isSubmitted() && $form->isValid()) {
// Get file
$file = $form->get('submitFile');
$delimiter = ($form->get('delimiter')) ? $form->get('delimiter')->getData() : ',';
Expand Down
3 changes: 2 additions & 1 deletion src/Controller/AdminEventController.php
Original file line number Diff line number Diff line change
Expand Up @@ -458,8 +458,9 @@ public function widgetGeneratorAction(Request $request)
))
->add('generate', SubmitType::class, array('label' => 'Générer'))
->getForm();
$form->handleRequest($request);

if ($form->handleRequest($request)->isValid()) {
if ($form->isSubmitted() && $form->isValid()) {
$data = $form->getData();

$widgetQueryString = 'event_kind_id=' . ($data['kind'] ? $data['kind']->getId() : '') . '&date_max=' . ($data['date_max'] ? $data['date_max'] : '') . '&limit=' . ($data['limit'] ? $data['limit'] : '') . '&title=' . ($data['title'] ? 1 : 0) . '&links=' . ($data['links'] ? 1 : 0);
Expand Down
3 changes: 2 additions & 1 deletion src/Controller/AdminOpeningHourController.php
Original file line number Diff line number Diff line change
Expand Up @@ -174,8 +174,9 @@ public function widgetGeneratorAction(Request $request)
))
->add('generate', SubmitType::class, array('label' => 'Générer'))
->getForm();
$form->handleRequest($request);

if ($form->handleRequest($request)->isValid()) {
if ($form->isSubmitted() && $form->isValid()) {
$data = $form->getData();

$widgetQueryString = 'opening_hour_kind_id=' . ($data['kind'] ? $data['kind']->getId() : '') . '&title=' . ($data['title'] ? 1 : 0) . '&kind_title=' . ($data['kind_title'] ? 1 : 0) . '&align=' . $data['align'];
Expand Down
3 changes: 2 additions & 1 deletion src/Controller/BeneficiaryController.php
Original file line number Diff line number Diff line change
Expand Up @@ -236,8 +236,9 @@ public function findMemberNumberAction(Request $request): Response
->add('find', SubmitType::class, array('label' => 'Trouver mon numéro'))
->getForm();
}
$form->handleRequest($request);

if ($form->handleRequest($request)->isValid()) {
if ($form->isSubmitted() && $form->isValid()) {
$firstname = $form->get('firstname')->getData();
$beneficiaries = $em->getRepository(Beneficiary::class)->findActiveFromFirstname($firstname);

Expand Down
3 changes: 2 additions & 1 deletion src/Controller/JobController.php
Original file line number Diff line number Diff line change
Expand Up @@ -193,8 +193,9 @@ public function widgetGeneratorAction(Request $request)
->add('title', CheckboxType::class, array('required' => false, 'data' => true, 'label' => 'Afficher le titre du widget ?'))
->add('generate', SubmitType::class, array('label' => 'Générer'))
->getForm();
$form->handleRequest($request);

if ($form->handleRequest($request)->isValid()) {
if ($form->isSubmitted() && $form->isValid()) {
$data = $form->getData();

$widgetQueryString = 'job_id='.$data['job']->getId().'&display_end='.($data['display_end'] ? 1 : 0).'&display_on_empty='.($data['display_on_empty'] ? 1 : 0).'&title='.($data['title'] ? 1 : 0);
Expand Down
3 changes: 2 additions & 1 deletion src/Controller/MembershipController.php
Original file line number Diff line number Diff line change
Expand Up @@ -478,8 +478,9 @@ public function activeUserAccountAction(Request $request)
)))
->add('find', SubmitType::class, array('label' => 'Activer mon compte'))
->getForm();
$form->handleRequest($request);

if ($form->handleRequest($request)->isValid()) {
if ($form->isSubmitted() && $form->isValid()) {
$member_number = $form->get('member_number')->getData();
$em = $this->getDoctrine()->getManager();
$ms = $em->getRepository('App:Membership')->findOneBy(array('member_number' => $member_number));
Expand Down
3 changes: 2 additions & 1 deletion src/Controller/ShiftController.php
Original file line number Diff line number Diff line change
Expand Up @@ -630,8 +630,9 @@ public function contactFormAction(Request $request, Shift $shift, \Swift_Mailer

$coShifters = $em->getRepository('App:Beneficiary')->findCoShifters($shift);
$form = $this->createShiftContactForm($shift, $coShifters);
$form->handleRequest($request);

if ($form->handleRequest($request)->isValid()) {
if ($form->isSubmitted() && $form->isValid()) {
$beneficiaries = $form->get('to')->getData();
$from = $form->get('from')->getData();
$from = $em->getRepository('App:Beneficiary')->findOneBy(array('id' => $from));
Expand Down
12 changes: 6 additions & 6 deletions src/Entity/EmailTemplate.php
Original file line number Diff line number Diff line change
Expand Up @@ -181,11 +181,11 @@ public function getCreatedAt()
/**
* Set createdBy
*
* @param \AppBundle\Entity\User $user
* @param \App\Entity\User $user
*
* @return EmailTemplate
*/
public function setCreatedBy(\AppBundle\Entity\User $user = null)
public function setCreatedBy(\App\Entity\User $user = null)
{
$this->createdBy = $user;

Expand All @@ -195,7 +195,7 @@ public function setCreatedBy(\AppBundle\Entity\User $user = null)
/**
* Get createdBy
*
* @return \AppBundle\Entity\User
* @return \App\Entity\User
*/
public function getCreatedBy()
{
Expand All @@ -215,11 +215,11 @@ public function getUpdatedAt()
/**
* Set updatedBy
*
* @param \AppBundle\Entity\User $user
* @param \App\Entity\User $user
*
* @return EmailTemplate
*/
public function setUpdatedBy(\AppBundle\Entity\User $user = null)
public function setUpdatedBy(\App\Entity\User $user = null)
{
$this->updatedBy = $user;

Expand All @@ -229,7 +229,7 @@ public function setUpdatedBy(\AppBundle\Entity\User $user = null)
/**
* Get updatedBy
*
* @return \AppBundle\Entity\User
* @return \App\Entity\User
*/
public function getUpdatedBy()
{
Expand Down
Loading