@@ -26,58 +26,58 @@ discard block |
||
| 26 | 26 | */ |
| 27 | 27 | class InterfaceMailOnIncident extends DolibarrTriggers |
| 28 | 28 | { |
| 29 | - /** |
|
| 30 | - * @var DoliDB Database handler |
|
| 31 | - */ |
|
| 32 | - protected $db; |
|
| 33 | - |
|
| 34 | - /** |
|
| 35 | - * Constructor |
|
| 36 | - * |
|
| 37 | - * @param DoliDB $db Database handler |
|
| 38 | - */ |
|
| 39 | - public function __construct($db) |
|
| 40 | - { |
|
| 41 | - $this->db = $db; |
|
| 42 | - |
|
| 43 | - $this->name = preg_replace('/^Interface/i', '', get_class($this)); |
|
| 44 | - $this->family = "Belgian balloon club"; |
|
| 45 | - $this->description = "Trigger that send an e-mail on flight incident."; |
|
| 46 | - $this->version = '1.0'; |
|
| 47 | - $this->picto = 'flightlog@flightlog'; |
|
| 48 | - } |
|
| 49 | - |
|
| 50 | - /** |
|
| 51 | - * Trigger name |
|
| 52 | - * |
|
| 53 | - * @return string Name of trigger file |
|
| 54 | - */ |
|
| 55 | - public function getName() |
|
| 56 | - { |
|
| 57 | - return $this->name; |
|
| 58 | - } |
|
| 59 | - |
|
| 60 | - /** |
|
| 61 | - * Trigger description |
|
| 62 | - * |
|
| 63 | - * @return string Description of trigger file |
|
| 64 | - */ |
|
| 65 | - public function getDesc() |
|
| 66 | - { |
|
| 67 | - return $this->description; |
|
| 68 | - } |
|
| 69 | - |
|
| 70 | - |
|
| 71 | - /** |
|
| 72 | - * @param string $action Event action code |
|
| 73 | - * @param Bbcvols $object Object |
|
| 74 | - * @param User $user Object user |
|
| 75 | - * @param Translate $langs Object langs |
|
| 76 | - * @param Conf $conf Object conf |
|
| 77 | - * @return int <0 if KO, 0 if no triggered ran, >0 if OK |
|
| 78 | - */ |
|
| 79 | - public function runTrigger($action, $object, User $user, Translate $langs, Conf $conf) |
|
| 80 | - { |
|
| 29 | + /** |
|
| 30 | + * @var DoliDB Database handler |
|
| 31 | + */ |
|
| 32 | + protected $db; |
|
| 33 | + |
|
| 34 | + /** |
|
| 35 | + * Constructor |
|
| 36 | + * |
|
| 37 | + * @param DoliDB $db Database handler |
|
| 38 | + */ |
|
| 39 | + public function __construct($db) |
|
| 40 | + { |
|
| 41 | + $this->db = $db; |
|
| 42 | + |
|
| 43 | + $this->name = preg_replace('/^Interface/i', '', get_class($this)); |
|
| 44 | + $this->family = "Belgian balloon club"; |
|
| 45 | + $this->description = "Trigger that send an e-mail on flight incident."; |
|
| 46 | + $this->version = '1.0'; |
|
| 47 | + $this->picto = 'flightlog@flightlog'; |
|
| 48 | + } |
|
| 49 | + |
|
| 50 | + /** |
|
| 51 | + * Trigger name |
|
| 52 | + * |
|
| 53 | + * @return string Name of trigger file |
|
| 54 | + */ |
|
| 55 | + public function getName() |
|
| 56 | + { |
|
| 57 | + return $this->name; |
|
| 58 | + } |
|
| 59 | + |
|
| 60 | + /** |
|
| 61 | + * Trigger description |
|
| 62 | + * |
|
| 63 | + * @return string Description of trigger file |
|
| 64 | + */ |
|
| 65 | + public function getDesc() |
|
| 66 | + { |
|
| 67 | + return $this->description; |
|
| 68 | + } |
|
| 69 | + |
|
| 70 | + |
|
| 71 | + /** |
|
| 72 | + * @param string $action Event action code |
|
| 73 | + * @param Bbcvols $object Object |
|
| 74 | + * @param User $user Object user |
|
| 75 | + * @param Translate $langs Object langs |
|
| 76 | + * @param Conf $conf Object conf |
|
| 77 | + * @return int <0 if KO, 0 if no triggered ran, >0 if OK |
|
| 78 | + */ |
|
| 79 | + public function runTrigger($action, $object, User $user, Translate $langs, Conf $conf) |
|
| 80 | + { |
|
| 81 | 81 | if (empty($conf->flightlog->enabled) || empty($conf->workflow->enabled)){ |
| 82 | 82 | return 0; |
| 83 | 83 | } |
@@ -132,6 +132,6 @@ discard block |
||
| 132 | 132 | dol_syslog("Error while sending mail in flight log module : incident", LOG_ERR); |
| 133 | 133 | } |
| 134 | 134 | |
| 135 | - return 0; |
|
| 136 | - } |
|
| 135 | + return 0; |
|
| 136 | + } |
|
| 137 | 137 | } |
@@ -132,12 +132,12 @@ discard block |
||
| 132 | 132 | //'t.justif_kilometers' => array('label' => $langs->trans("Fieldjustif_kilometers"), 'checked' => 1), |
| 133 | 133 | //'t.entity'=>array('label'=>$langs->trans("Entity"), 'checked'=>1, 'enabled'=>(! empty($conf->multicompany->enabled) && empty($conf->multicompany->transverse_mode))), |
| 134 | 134 | 't.datec' => array('label' => $langs->trans("DateCreationShort"), |
| 135 | - 'checked' => 0, |
|
| 136 | - 'position' => 500 |
|
| 135 | + 'checked' => 0, |
|
| 136 | + 'position' => 500 |
|
| 137 | 137 | ), |
| 138 | 138 | 't.tms' => array('label' => $langs->trans("DateModificationShort"), |
| 139 | - 'checked' => 0, |
|
| 140 | - 'position' => 500 |
|
| 139 | + 'checked' => 0, |
|
| 140 | + 'position' => 500 |
|
| 141 | 141 | ), |
| 142 | 142 | //'t.statut'=>array('label'=>$langs->trans("Status"), 'checked'=>1, 'position'=>1000), |
| 143 | 143 | ); |
@@ -145,9 +145,9 @@ discard block |
||
| 145 | 145 | if (is_array($extrafields->attribute_label) && count($extrafields->attribute_label)) { |
| 146 | 146 | foreach ($extrafields->attribute_label as $key => $val) { |
| 147 | 147 | $arrayfields["ef." . $key] = array('label' => $extrafields->attribute_label[$key], |
| 148 | - 'checked' => $extrafields->attribute_list[$key], |
|
| 149 | - 'position' => $extrafields->attribute_pos[$key], |
|
| 150 | - 'enabled' => $extrafields->attribute_perms[$key] |
|
| 148 | + 'checked' => $extrafields->attribute_list[$key], |
|
| 149 | + 'position' => $extrafields->attribute_pos[$key], |
|
| 150 | + 'enabled' => $extrafields->attribute_perms[$key] |
|
| 151 | 151 | ); |
| 152 | 152 | } |
| 153 | 153 | } |
@@ -4,8 +4,6 @@ |
||
| 4 | 4 | namespace FlightLog\Infrastructure\Common\Routes; |
| 5 | 5 | |
| 6 | 6 | |
| 7 | -use FlightLog\Http\Web\Controller\WebController; |
|
| 8 | - |
|
| 9 | 7 | final class Route |
| 10 | 8 | { |
| 11 | 9 | |
@@ -1,9 +1,6 @@ |
||
| 1 | 1 | <?php |
| 2 | 2 | |
| 3 | -use FlightLog\Http\Web\Controller\DamageController; |
|
| 4 | -use FlightLog\Http\Web\Controller\FlightController; |
|
| 5 | 3 | use FlightLog\Infrastructure\Common\Routes\Guard; |
| 6 | -use FlightLog\Infrastructure\Common\Routes\Route; |
|
| 7 | 4 | |
| 8 | 5 | global $db; |
| 9 | 6 | |
@@ -5,7 +5,6 @@ |
||
| 5 | 5 | |
| 6 | 6 | |
| 7 | 7 | use FlightLog\Application\Flight\ViewModel\Balloon; |
| 8 | -use FlightLog\Application\Flight\ViewModel\TakeOffPlace; |
|
| 9 | 8 | |
| 10 | 9 | final class BalloonQueryRepository |
| 11 | 10 | { |
@@ -4,12 +4,9 @@ |
||
| 4 | 4 | namespace FlightLog\Http\Web\Controller; |
| 5 | 5 | |
| 6 | 6 | |
| 7 | -use FlightLog\Application\Damage\Command\CreateDamageCommand; |
|
| 8 | -use FlightLog\Application\Damage\Command\CreateDamageCommandHandler; |
|
| 9 | 7 | use FlightLog\Application\Pilot\Command\CreateUpdatePilotInformationCommand; |
| 10 | 8 | use FlightLog\Application\Pilot\Command\CreateUpdatePilotInformationCommandHandler; |
| 11 | 9 | use FlightLog\Domain\Pilot\ValueObject\PilotId; |
| 12 | -use FlightLog\Http\Web\Form\DamageCreationForm; |
|
| 13 | 10 | use FlightLog\Http\Web\Form\PilotForm; |
| 14 | 11 | use FlightLog\Infrastructure\Pilot\Repository\PilotRepository; |
| 15 | 12 | |
@@ -4,7 +4,6 @@ discard block |
||
| 4 | 4 | namespace FlightLog\Http\Web\Form; |
| 5 | 5 | |
| 6 | 6 | |
| 7 | -use FlightLog\Application\Damage\Command\CreateDamageCommand; |
|
| 8 | 7 | use FlightLog\Application\Pilot\Command\CreateUpdatePilotInformationCommand; |
| 9 | 8 | use flightlog\form\Csrf; |
| 10 | 9 | use flightlog\form\Form; |
@@ -13,8 +12,6 @@ discard block |
||
| 13 | 12 | use flightlog\form\Input; |
| 14 | 13 | use flightlog\form\InputCheckBox; |
| 15 | 14 | use flightlog\form\InputDate; |
| 16 | -use flightlog\form\Number; |
|
| 17 | -use flightlog\form\UserSelect; |
|
| 18 | 15 | |
| 19 | 16 | final class PilotForm extends Form |
| 20 | 17 | { |