Loading config/autoload/global.php +4 −0 Changes for config/autoload/global.php: 4 added lines, 0 removed lines. Original line number Diff line number Diff line Loading @@ -30,6 +30,10 @@ return array( 'authPersonNormalize' => false, // Active l'option autorisant l'importation de calendrier pour les déclarants 'importEnable' => true, 'export' => [ 'payments' => [ 'separator' => '$$', Loading module/Oscar/src/Oscar/Controller/TimesheetController.php +3 −0 Changes for module/Oscar/src/Oscar/Controller/TimesheetController.php: 3 added lines, 0 removed lines. Original line number Diff line number Diff line Loading @@ -1126,6 +1126,9 @@ class TimesheetController extends AbstractOscarController // ------------------------------------------------------------------------------------------------------------- // Période URL $period = $this->params()->fromQuery('period', null); if( !$this->getOscarConfigurationService()->getConfiguration('importEnable') ){ throw new OscarException("Cette option n'est activée"); } if( !$period ) return $this->getResponseBadRequest("La période est non définit"); Loading module/Oscar/src/Oscar/Service/TimesheetService.php +2 −0 Changes for module/Oscar/src/Oscar/Service/TimesheetService.php: 2 added lines, 0 removed lines. Original line number Diff line number Diff line Loading @@ -2219,6 +2219,7 @@ class TimesheetService implements ServiceLocatorAwareInterface, EntityManagerAwa $submitable = false; $submitableInfos = "Vous ne pouvez pas soumettre cette période pour une raison inconnue"; $importEnable = $this->getOscarConfig()->getConfiguration('importEnable'); $hasConflict = false; Loading Loading @@ -2478,6 +2479,7 @@ class TimesheetService implements ServiceLocatorAwareInterface, EntityManagerAwa 'icsUidList' => $icsUidList, 'feries' => $this->getLockedDays($year, $month), 'person' => (string)$person, 'importEnable' => $importEnable, 'person_id' => $person->getId(), 'period' => $periodFirstDay->format('Y-m'), 'periodMax' => $periodMax, Loading module/Oscar/src/Oscar/View/Helpers/Options.php +4 −0 Changes for module/Oscar/src/Oscar/View/Helpers/Options.php: 4 added lines, 0 removed lines. Original line number Diff line number Diff line Loading @@ -35,4 +35,8 @@ class Options extends AbstractHtmlElement implements ServiceLocatorAwareInterfac return $this->getConfiguration()->getConfiguration('oscar_num_separator'); } public function importEnable(){ return $this->getConfiguration()->getConfiguration('importEnable'); } } module/Oscar/view/oscar/timesheet/declarant.phtml +2 −2 Changes for module/Oscar/view/oscar/timesheet/declarant.phtml: 2 added lines, 2 removed lines. Original line number Diff line number Diff line Loading @@ -57,8 +57,8 @@ defaultMonth: <?= $month ?>, moment: moment, bootbox: bootbox, url: '<?= $this->url('timesheet/declarant').($usurpation?"?person=$usurpation":"?") ?>', urlimport: '<?= $this->url('timesheet/import_ical'). ($usurpation?"?person=$usurpation":"?")?>' url: '<?= $this->url('timesheet/declarant').($usurpation?"?person=$usurpation":"?") ?>' ,urlimport: '<?= $this->options()->importEnable() ? $this->url('timesheet/import_ical'). ($usurpation?"?person=$usurpation":"?") : '' ?>' } }); } Loading Loading
config/autoload/global.php +4 −0 Changes for config/autoload/global.php: 4 added lines, 0 removed lines. Original line number Diff line number Diff line Loading @@ -30,6 +30,10 @@ return array( 'authPersonNormalize' => false, // Active l'option autorisant l'importation de calendrier pour les déclarants 'importEnable' => true, 'export' => [ 'payments' => [ 'separator' => '$$', Loading
module/Oscar/src/Oscar/Controller/TimesheetController.php +3 −0 Changes for module/Oscar/src/Oscar/Controller/TimesheetController.php: 3 added lines, 0 removed lines. Original line number Diff line number Diff line Loading @@ -1126,6 +1126,9 @@ class TimesheetController extends AbstractOscarController // ------------------------------------------------------------------------------------------------------------- // Période URL $period = $this->params()->fromQuery('period', null); if( !$this->getOscarConfigurationService()->getConfiguration('importEnable') ){ throw new OscarException("Cette option n'est activée"); } if( !$period ) return $this->getResponseBadRequest("La période est non définit"); Loading
module/Oscar/src/Oscar/Service/TimesheetService.php +2 −0 Changes for module/Oscar/src/Oscar/Service/TimesheetService.php: 2 added lines, 0 removed lines. Original line number Diff line number Diff line Loading @@ -2219,6 +2219,7 @@ class TimesheetService implements ServiceLocatorAwareInterface, EntityManagerAwa $submitable = false; $submitableInfos = "Vous ne pouvez pas soumettre cette période pour une raison inconnue"; $importEnable = $this->getOscarConfig()->getConfiguration('importEnable'); $hasConflict = false; Loading Loading @@ -2478,6 +2479,7 @@ class TimesheetService implements ServiceLocatorAwareInterface, EntityManagerAwa 'icsUidList' => $icsUidList, 'feries' => $this->getLockedDays($year, $month), 'person' => (string)$person, 'importEnable' => $importEnable, 'person_id' => $person->getId(), 'period' => $periodFirstDay->format('Y-m'), 'periodMax' => $periodMax, Loading
module/Oscar/src/Oscar/View/Helpers/Options.php +4 −0 Changes for module/Oscar/src/Oscar/View/Helpers/Options.php: 4 added lines, 0 removed lines. Original line number Diff line number Diff line Loading @@ -35,4 +35,8 @@ class Options extends AbstractHtmlElement implements ServiceLocatorAwareInterfac return $this->getConfiguration()->getConfiguration('oscar_num_separator'); } public function importEnable(){ return $this->getConfiguration()->getConfiguration('importEnable'); } }
module/Oscar/view/oscar/timesheet/declarant.phtml +2 −2 Changes for module/Oscar/view/oscar/timesheet/declarant.phtml: 2 added lines, 2 removed lines. Original line number Diff line number Diff line Loading @@ -57,8 +57,8 @@ defaultMonth: <?= $month ?>, moment: moment, bootbox: bootbox, url: '<?= $this->url('timesheet/declarant').($usurpation?"?person=$usurpation":"?") ?>', urlimport: '<?= $this->url('timesheet/import_ical'). ($usurpation?"?person=$usurpation":"?")?>' url: '<?= $this->url('timesheet/declarant').($usurpation?"?person=$usurpation":"?") ?>' ,urlimport: '<?= $this->options()->importEnable() ? $this->url('timesheet/import_ical'). ($usurpation?"?person=$usurpation":"?") : '' ?>' } }); } Loading