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
|
||||
$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);
|
||||
|
||||
Loading…
Reference in New Issue
Block a user