Skip to content

Commit

Permalink
[SharedRisks] fix: uncheck risks by default on import box
Browse files Browse the repository at this point in the history
  • Loading branch information
Théo David committed Jun 10, 2022
1 parent 9be0017 commit ee63749
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions view/digiriskelement/digiriskelement_risk.php
Original file line number Diff line number Diff line change
Expand Up @@ -241,7 +241,7 @@
'text' => '<i class="fas fa-circle-info"></i>' . $langs->trans("ConfirmImportSharedRisks"),
);

$formquestionimportsharedrisks[] = array('type' => 'checkbox', 'name' =>'select_all_shared_risks', 'value' => 1);
$formquestionimportsharedrisks[] = array('type' => 'checkbox', 'name' =>'select_all_shared_risks', 'value' => 0);

foreach ($allrisks as $key => $risks) {
$digiriskelementtmp->fetch($risks->fk_element);
Expand Down Expand Up @@ -286,7 +286,7 @@
if ($alreadyImported > 0) {
$formquestionimportsharedrisks[] = array('type' => 'checkbox', 'name' => 'import_shared_risks' . '_S' . $risks->entity . '_' . $digiriskelementtmp->ref . '_' . $risks->ref, 'label' => $importValue . '<span class="importsharedrisk imported">' . $langs->trans('AlreadyImported') . '</span>', 'value' => 0, 'disabled' => 1);
} else {
$formquestionimportsharedrisks[] = array('type' => 'checkbox', 'name' => 'import_shared_risks' . '_S' . $risks->entity . '_' . $digiriskelementtmp->ref . '_' . $risks->ref, 'label' => $importValue, 'value' => 1);
$formquestionimportsharedrisks[] = array('type' => 'checkbox', 'name' => 'import_shared_risks' . '_S' . $risks->entity . '_' . $digiriskelementtmp->ref . '_' . $risks->ref, 'label' => $importValue, 'value' => 0);
}
}
$formconfirm .= $form->formconfirm($_SERVER["PHP_SELF"] . '?id=' . $object->id, $langs->trans('ImportSharedRisks'), '', 'confirm_import_shared_risks', $formquestionimportsharedrisks, 'yes', 'actionButtonImportSharedRisks', 800, 800);
Expand Down

0 comments on commit ee63749

Please sign in to comment.