Update card.php
This commit is contained in:
parent
46752186fc
commit
d2a19b530f
@ -64,6 +64,7 @@ $result = restrictedArea($user, 'don', $id);
|
|||||||
|
|
||||||
// fetch optionals attributes and labels
|
// fetch optionals attributes and labels
|
||||||
$extrafields->fetch_name_optionals_label($object->table_element);
|
$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
|
// Initialize technical object to manage hooks of page. Note that conf->hooks_modules contains array of hook context
|
||||||
$hookmanager->initHooks(array('doncard', 'globalcard'));
|
$hookmanager->initHooks(array('doncard', 'globalcard'));
|
||||||
@ -118,6 +119,8 @@ if ($action == 'confirm_reopen' && $confirm == 'yes' && $permissiontoadd) {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
// Action update object
|
||||||
if ($action == 'update') {
|
if ($action == 'update') {
|
||||||
if (!empty($cancel)) {
|
if (!empty($cancel)) {
|
||||||
header("Location: ".$_SERVER['PHP_SELF']."?id=".urlencode($id));
|
header("Location: ".$_SERVER['PHP_SELF']."?id=".urlencode($id));
|
||||||
@ -170,6 +173,8 @@ if ($action == 'update') {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
// Action add/create object
|
||||||
if ($action == 'add') {
|
if ($action == 'add') {
|
||||||
if (!empty($cancel)) {
|
if (!empty($cancel)) {
|
||||||
header("Location: index.php");
|
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) {
|
if ($action == 'confirm_delete' && GETPOST("confirm") == "yes" && $user->rights->don->supprimer) {
|
||||||
$object->fetch($id);
|
$object->fetch($id);
|
||||||
$result = $object->delete($user);
|
$result = $object->delete($user);
|
||||||
@ -239,6 +246,8 @@ if ($action == 'confirm_delete' && GETPOST("confirm") == "yes" && $user->rights-
|
|||||||
setEventMessages($object->error, $object->errors, 'errors');
|
setEventMessages($object->error, $object->errors, 'errors');
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// Action validation
|
||||||
if ($action == 'valid_promesse') {
|
if ($action == 'valid_promesse') {
|
||||||
$object->fetch($id);
|
$object->fetch($id);
|
||||||
if ($object->valid_promesse($id, $user->id) >= 0) {
|
if ($object->valid_promesse($id, $user->id) >= 0) {
|
||||||
@ -248,6 +257,8 @@ if ($action == 'valid_promesse') {
|
|||||||
setEventMessages($object->error, $object->errors, 'errors');
|
setEventMessages($object->error, $object->errors, 'errors');
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// Action cancel
|
||||||
if ($action == 'set_cancel') {
|
if ($action == 'set_cancel') {
|
||||||
$object->fetch($id);
|
$object->fetch($id);
|
||||||
if ($object->set_cancel($id) >= 0) {
|
if ($object->set_cancel($id) >= 0) {
|
||||||
@ -256,6 +267,8 @@ if ($action == 'set_cancel') {
|
|||||||
setEventMessages($object->error, $object->errors, 'errors');
|
setEventMessages($object->error, $object->errors, 'errors');
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// Action set paid
|
||||||
if ($action == 'set_paid') {
|
if ($action == 'set_paid') {
|
||||||
$object->fetch($id);
|
$object->fetch($id);
|
||||||
if ($object->setPaid($id, $modepayment) >= 0) {
|
if ($object->setPaid($id, $modepayment) >= 0) {
|
||||||
@ -268,6 +281,7 @@ if ($action == 'set_paid') {
|
|||||||
$object->setProject($projectid);
|
$object->setProject($projectid);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
// Actions to build doc
|
// Actions to build doc
|
||||||
include DOL_DOCUMENT_ROOT.'/core/actions_builddoc.inc.php';
|
include DOL_DOCUMENT_ROOT.'/core/actions_builddoc.inc.php';
|
||||||
|
|
||||||
@ -329,9 +343,11 @@ if ($action == 'builddoc')
|
|||||||
* View
|
* View
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
$title = $langs->trans("Donation");
|
||||||
|
|
||||||
$help_url = 'EN:Module_Donations|FR:Module_Dons|ES:Módulo_Donaciones|DE:Modul_Spenden';
|
$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);
|
$form = new Form($db);
|
||||||
$formfile = new FormFile($db);
|
$formfile = new FormFile($db);
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user