From d2a19b530ff541f6c05b5f699fcadf1983388586 Mon Sep 17 00:00:00 2001 From: UT from dolibit <45215329+dolibit-ut@users.noreply.github.com> Date: Mon, 14 Jun 2021 14:24:21 +0200 Subject: [PATCH] Update card.php --- htdocs/don/card.php | 18 +++++++++++++++++- 1 file changed, 17 insertions(+), 1 deletion(-) diff --git a/htdocs/don/card.php b/htdocs/don/card.php index 0763ff9b7e5..1b3c72906b4 100644 --- a/htdocs/don/card.php +++ b/htdocs/don/card.php @@ -64,6 +64,7 @@ $result = restrictedArea($user, 'don', $id); // fetch optionals attributes and labels $extrafields->fetch_name_optionals_label($object->table_element); +$search_array_options = $extrafields->getOptionalsFromPost($object->table_element, '', 'search_'); // Initialize technical object to manage hooks of page. Note that conf->hooks_modules contains array of hook context $hookmanager->initHooks(array('doncard', 'globalcard')); @@ -118,6 +119,8 @@ if ($action == 'confirm_reopen' && $confirm == 'yes' && $permissiontoadd) { } } + +// Action update object if ($action == 'update') { if (!empty($cancel)) { header("Location: ".$_SERVER['PHP_SELF']."?id=".urlencode($id)); @@ -170,6 +173,8 @@ if ($action == 'update') { } } + +// Action add/create object if ($action == 'add') { if (!empty($cancel)) { header("Location: index.php"); @@ -228,6 +233,8 @@ if ($action == 'add') { } } } + +// Action delete object if ($action == 'confirm_delete' && GETPOST("confirm") == "yes" && $user->rights->don->supprimer) { $object->fetch($id); $result = $object->delete($user); @@ -239,6 +246,8 @@ if ($action == 'confirm_delete' && GETPOST("confirm") == "yes" && $user->rights- setEventMessages($object->error, $object->errors, 'errors'); } } + +// Action validation if ($action == 'valid_promesse') { $object->fetch($id); if ($object->valid_promesse($id, $user->id) >= 0) { @@ -248,6 +257,8 @@ if ($action == 'valid_promesse') { setEventMessages($object->error, $object->errors, 'errors'); } } + +// Action cancel if ($action == 'set_cancel') { $object->fetch($id); if ($object->set_cancel($id) >= 0) { @@ -256,6 +267,8 @@ if ($action == 'set_cancel') { setEventMessages($object->error, $object->errors, 'errors'); } } + +// Action set paid if ($action == 'set_paid') { $object->fetch($id); if ($object->setPaid($id, $modepayment) >= 0) { @@ -268,6 +281,7 @@ if ($action == 'set_paid') { $object->setProject($projectid); } + // Actions to build doc include DOL_DOCUMENT_ROOT.'/core/actions_builddoc.inc.php'; @@ -329,9 +343,11 @@ if ($action == 'builddoc') * View */ +$title = $langs->trans("Donation"); + $help_url = 'EN:Module_Donations|FR:Module_Dons|ES:Módulo_Donaciones|DE:Modul_Spenden'; -llxHeader('', $langs->trans("Donation"), $help_url); +llxHeader('', $title, $help_url); $form = new Form($db); $formfile = new FormFile($db);