@@ -95,6 +95,7 @@ discard block |
||
| 95 | 95 | |
| 96 | 96 | /** |
| 97 | 97 | * @inheritDoc |
| 98 | + * @param string $fieldName |
|
| 98 | 99 | */ |
| 99 | 100 | public function remove($fieldName) |
| 100 | 101 | { |
@@ -142,7 +143,7 @@ discard block |
||
| 142 | 143 | } |
| 143 | 144 | |
| 144 | 145 | /** |
| 145 | - * @param null|\ValidatorInterface $validator |
|
| 146 | + * @param ValidatorInterface $validator |
|
| 146 | 147 | * |
| 147 | 148 | * @return Form |
| 148 | 149 | */ |
@@ -116,7 +116,7 @@ discard block |
||
| 116 | 116 | $extralabels = $extrafields->fetch_name_optionals_label($object->table_element); |
| 117 | 117 | |
| 118 | 118 | // Load object |
| 119 | -include DOL_DOCUMENT_ROOT . '/core/actions_fetchobject.inc.php'; // Must be include, not include_once. Include fetch and fetch_thirdparty but not fetch_optionals |
|
| 119 | +include DOL_DOCUMENT_ROOT . '/core/actions_fetchobject.inc.php'; // Must be include, not include_once. Include fetch and fetch_thirdparty but not fetch_optionals |
|
| 120 | 120 | include DOL_DOCUMENT_ROOT . '/core/actions_dellink.inc.php'; |
| 121 | 121 | |
| 122 | 122 | // Initialize technical object to manage hooks of modules. Note that conf->hooks_modules contains array array |
@@ -145,7 +145,7 @@ discard block |
||
| 145 | 145 | |
| 146 | 146 | $parameters = array(); |
| 147 | 147 | $reshook = $hookmanager->executeHooks('doActions', $parameters, $object, |
| 148 | - $action); // Note that $action and $object may have been modified by some hooks |
|
| 148 | + $action); // Note that $action and $object may have been modified by some hooks |
|
| 149 | 149 | if ($reshook < 0) { |
| 150 | 150 | setEventMessages($hookmanager->error, $hookmanager->errors, 'errors'); |
| 151 | 151 | } |
@@ -251,7 +251,7 @@ discard block |
||
| 251 | 251 | |
| 252 | 252 | |
| 253 | 253 | // Part to edit record |
| 254 | -if (($user->rights->flightlog->vol->edit || ($user->rights->flightlog->vol->add && $object->fk_pilot == $user->id )) && ($id || $ref) && $action == 'edit'): ?> |
|
| 254 | +if (($user->rights->flightlog->vol->edit || ($user->rights->flightlog->vol->add && $object->fk_pilot == $user->id)) && ($id || $ref) && $action == 'edit'): ?> |
|
| 255 | 255 | |
| 256 | 256 | <?php $renderer = new \flightlog\form\SimpleFormRenderer(); ?> |
| 257 | 257 | |
@@ -269,7 +269,7 @@ discard block |
||
| 269 | 269 | <?php echo $renderer->render($formFlight->getElement('idBBC_vols')); ?> |
| 270 | 270 | |
| 271 | 271 | <!-- Date et heures --> |
| 272 | - <?php if($formFlight->has('fk_type')): ?> |
|
| 272 | + <?php if ($formFlight->has('fk_type')): ?> |
|
| 273 | 273 | <section class="form-section"> |
| 274 | 274 | <h1 class="form-section-title"><?php echo $langs->trans('Type de vol'); ?></h1> |
| 275 | 275 | <table class="border" width="50%"> |
@@ -286,14 +286,14 @@ discard block |
||
| 286 | 286 | <h1 class="form-section-title"><?php echo $langs->trans('Pilote & ballon') ?></h1> |
| 287 | 287 | <table class="border" width="50%"> |
| 288 | 288 | |
| 289 | - <?php if($formFlight->has('fk_pilot')): ?> |
|
| 289 | + <?php if ($formFlight->has('fk_pilot')): ?> |
|
| 290 | 290 | <tr> |
| 291 | 291 | <td class="fieldrequired"> Pilote </td> |
| 292 | - <td><?php echo $renderer->render($formFlight->getElement('fk_pilot'),['ajax' => true]); ?></td> |
|
| 292 | + <td><?php echo $renderer->render($formFlight->getElement('fk_pilot'), ['ajax' => true]); ?></td> |
|
| 293 | 293 | </tr> |
| 294 | 294 | <?php endif; ?> |
| 295 | 295 | |
| 296 | - <?php if($formFlight->has('BBC_ballons_idBBC_ballons')): ?> |
|
| 296 | + <?php if ($formFlight->has('BBC_ballons_idBBC_ballons')): ?> |
|
| 297 | 297 | <tr> |
| 298 | 298 | <td width="25%" class="fieldrequired">Ballon</td> |
| 299 | 299 | <td><?php echo $renderer->render($formFlight->getElement('BBC_ballons_idBBC_ballons')); ?></td> |
@@ -328,7 +328,7 @@ discard block |
||
| 328 | 328 | </table> |
| 329 | 329 | </section> |
| 330 | 330 | |
| 331 | - <?php if($formFlight->has('fk_organisateur')): ?> |
|
| 331 | + <?php if ($formFlight->has('fk_organisateur')): ?> |
|
| 332 | 332 | <section class="form-section"> |
| 333 | 333 | <h1 class="form-section-title"><span class="js-organisator-field">Organisateur</span></h1> |
| 334 | 334 | <table class="border" width="50%"> |
@@ -337,7 +337,7 @@ discard block |
||
| 337 | 337 | <td> |
| 338 | 338 | <?php |
| 339 | 339 | //organisateur |
| 340 | - print $renderer->render($formFlight->getElement('fk_organisateur'),['ajax' => true]); |
|
| 340 | + print $renderer->render($formFlight->getElement('fk_organisateur'), ['ajax' => true]); |
|
| 341 | 341 | ?> |
| 342 | 342 | </td> |
| 343 | 343 | </tr> |
@@ -349,7 +349,7 @@ discard block |
||
| 349 | 349 | <section class="form-section js-expensable-field"> |
| 350 | 350 | <h1 class="form-section-title"><?php echo $langs->trans('Déplacements') ?></h1> |
| 351 | 351 | <table class="border" width="50%"> |
| 352 | - <?php if($formFlight->has('kilometers')): ?> |
|
| 352 | + <?php if ($formFlight->has('kilometers')): ?> |
|
| 353 | 353 | <!-- number of kilometers done for the flight --> |
| 354 | 354 | <tr> |
| 355 | 355 | <td class="fieldrequired">Nombre de kilometres effectués pour le vol</td> |
@@ -359,7 +359,7 @@ discard block |
||
| 359 | 359 | </tr> |
| 360 | 360 | <?php endif; ?> |
| 361 | 361 | |
| 362 | - <?php if($formFlight->has('justif_kilometers')): ?> |
|
| 362 | + <?php if ($formFlight->has('justif_kilometers')): ?> |
|
| 363 | 363 | <!-- Justif Kilometers --> |
| 364 | 364 | <tr> |
| 365 | 365 | |
@@ -377,7 +377,7 @@ discard block |
||
| 377 | 377 | <section class="form-section"> |
| 378 | 378 | <h1 class="form-section-title"><?php echo $langs->trans('Passager') ?></h1> |
| 379 | 379 | <table class="border" width="50%"> |
| 380 | - <?php if($formFlight->has('nbrPax')): ?> |
|
| 380 | + <?php if ($formFlight->has('nbrPax')): ?> |
|
| 381 | 381 | <tr> |
| 382 | 382 | <td class="fieldrequired"><?php echo $langs->trans('Nombre de passagers'); ?></td> |
| 383 | 383 | <td> |
@@ -386,7 +386,7 @@ discard block |
||
| 386 | 386 | </tr> |
| 387 | 387 | <?php endif; ?> |
| 388 | 388 | |
| 389 | - <?php if($formFlight->has('passengerNames')): ?> |
|
| 389 | + <?php if ($formFlight->has('passengerNames')): ?> |
|
| 390 | 390 | <!-- passenger names --> |
| 391 | 391 | <tr> |
| 392 | 392 | <td width="25%" class="fieldrequired"><?php echo $langs->trans('Noms des passagers'); ?><br/>(Séparé |
@@ -396,7 +396,7 @@ discard block |
||
| 396 | 396 | <?php print $renderer->render($formFlight->getElement('passengerNames')); ?> |
| 397 | 397 | </td> |
| 398 | 398 | </tr> |
| 399 | - <?php endif;?> |
|
| 399 | + <?php endif; ?> |
|
| 400 | 400 | </table> |
| 401 | 401 | </section> |
| 402 | 402 | |
@@ -405,17 +405,17 @@ discard block |
||
| 405 | 405 | <h1 class="form-section-title js-billable-field"><?php echo $langs->trans('Facturation') ?></h1> |
| 406 | 406 | <table class="border" width="50%"> |
| 407 | 407 | |
| 408 | - <?php if($formFlight->has('fk_receiver')): ?> |
|
| 408 | + <?php if ($formFlight->has('fk_receiver')): ?> |
|
| 409 | 409 | <!-- Money receiver --> |
| 410 | 410 | <tr class="js-hide-order js-billable-field"> |
| 411 | 411 | <td class="fieldrequired"><?php echo $langs->trans('Qui a perçu l\'argent') ?></td> |
| 412 | 412 | <td> |
| 413 | - <?php print $renderer->render($formFlight->getElement('fk_receiver'),['ajax' => true]); ?> |
|
| 413 | + <?php print $renderer->render($formFlight->getElement('fk_receiver'), ['ajax' => true]); ?> |
|
| 414 | 414 | </td> |
| 415 | 415 | </tr> |
| 416 | 416 | <?php endif; ?> |
| 417 | 417 | |
| 418 | - <?php if($formFlight->has('cost')): ?> |
|
| 418 | + <?php if ($formFlight->has('cost')): ?> |
|
| 419 | 419 | <!-- Flight cost --> |
| 420 | 420 | <tr class="js-hide-order js-billable-field"> |
| 421 | 421 | <td class="fieldrequired">Montant perçu</td> |
@@ -433,7 +433,7 @@ discard block |
||
| 433 | 433 | <h1 class="form-section-title"><?php echo $langs->trans('Commentaires') ?></h1> |
| 434 | 434 | <table class="border" width="50%"> |
| 435 | 435 | |
| 436 | - <?php if($formFlight->has('remarque')): ?> |
|
| 436 | + <?php if ($formFlight->has('remarque')): ?> |
|
| 437 | 437 | <!-- commentaires --> |
| 438 | 438 | <tr class=""> |
| 439 | 439 | <td class="fieldrequired"> Commentaire</td> |
@@ -443,7 +443,7 @@ discard block |
||
| 443 | 443 | </tr> |
| 444 | 444 | <?php endif; ?> |
| 445 | 445 | |
| 446 | - <?php if($formFlight->has('incidents')): ?> |
|
| 446 | + <?php if ($formFlight->has('incidents')): ?> |
|
| 447 | 447 | <!-- incidents --> |
| 448 | 448 | <tr class=""> |
| 449 | 449 | <td class="fieldrequired"> incidents</td> |
@@ -477,7 +477,7 @@ discard block |
||
| 477 | 477 | $formconfirm = $form->formconfirm($_SERVER["PHP_SELF"] . '?id=' . $object->id, $langs->trans('DeleteMyOjbect'), |
| 478 | 478 | $langs->trans('êtes-vous sure de vouloir supprimer ce vol ?'), 'confirm_delete', '', 0, 1); |
| 479 | 479 | print $formconfirm; |
| 480 | - } elseif ($user->rights->flightlog->vol->financial && $action == ACTION_FLAG_BILLED) { |
|
| 480 | + } elseif ($user->rights->flightlog->vol->financial && $action == ACTION_FLAG_BILLED) { |
|
| 481 | 481 | $formconfirm = $form->formconfirm($_SERVER["PHP_SELF"] . '?id=' . $object->id, |
| 482 | 482 | $langs->trans('Marque comme facturé'), |
| 483 | 483 | $langs->trans('Ce vol va être marqué comme facturé, est-ce bien le cas ?'), ACTION_CONFIRM_FLAG_BILLED, '', |
@@ -509,7 +509,7 @@ discard block |
||
| 509 | 509 | print '<div class="tabsAction">' . "\n"; |
| 510 | 510 | $parameters = array(); |
| 511 | 511 | $reshook = $hookmanager->executeHooks('addMoreActionsButtons', $parameters, $object, |
| 512 | - $action); // Note that $action and $object may have been modified by hook |
|
| 512 | + $action); // Note that $action and $object may have been modified by hook |
|
| 513 | 513 | if ($reshook < 0) { |
| 514 | 514 | setEventMessages($hookmanager->error, $hookmanager->errors, 'errors'); |
| 515 | 515 | } |