';
print '| '.$langs->trans("ACCOUNTING_DISABLE_BINDING_ON_EXPENSEREPORTS").' | ';
if (!empty($conf->global->ACCOUNTING_DISABLE_BINDING_ON_EXPENSEREPORTS)) {
print '';
- print img_picto($langs->trans("Activated"), 'switch_on');
+ print img_picto($langs->trans("Activated"), 'switch_on', '', false, 0, 0, '', 'warning');
print ' | ';
} else {
print '';
diff --git a/htdocs/adherents/document.php b/htdocs/adherents/document.php
index 969bf3a8906..652d62571a0 100644
--- a/htdocs/adherents/document.php
+++ b/htdocs/adherents/document.php
@@ -152,7 +152,7 @@ if ($id > 0) {
$permission = $user->rights->adherent->creer;
$permtoedit = $user->rights->adherent->creer;
$param = '&id='.$object->id;
- include_once DOL_DOCUMENT_ROOT.'/core/tpl/document_actions_post_headers.tpl.php';
+ include DOL_DOCUMENT_ROOT.'/core/tpl/document_actions_post_headers.tpl.php';
print "
";
} else {
dol_print_error($db);
diff --git a/htdocs/asset/document.php b/htdocs/asset/document.php
index 32a4163dd12..dc7be10b704 100644
--- a/htdocs/asset/document.php
+++ b/htdocs/asset/document.php
@@ -126,7 +126,7 @@ if ($id > 0 || !empty($ref))
$permission = $user->rights->asset->write;
$permtoedit = $user->rights->asset->write;
$param = '&id='.$object->id;
- include_once DOL_DOCUMENT_ROOT.'/core/tpl/document_actions_post_headers.tpl.php';
+ include DOL_DOCUMENT_ROOT.'/core/tpl/document_actions_post_headers.tpl.php';
} else {
dol_print_error($db);
}
diff --git a/htdocs/bom/bom_document.php b/htdocs/bom/bom_document.php
index cf752878605..9dce260370a 100644
--- a/htdocs/bom/bom_document.php
+++ b/htdocs/bom/bom_document.php
@@ -139,7 +139,7 @@ if ($object->id)
//$relativepathwithnofile='bom/' . dol_sanitizeFileName($object->id).'/';
$relativepathwithnofile = 'bom/'.dol_sanitizeFileName($object->ref).'/';
- include_once DOL_DOCUMENT_ROOT.'/core/tpl/document_actions_post_headers.tpl.php';
+ include DOL_DOCUMENT_ROOT.'/core/tpl/document_actions_post_headers.tpl.php';
} else {
accessforbidden('', 0, 1);
}
diff --git a/htdocs/categories/index.php b/htdocs/categories/index.php
index 5adc7bbb17b..164c07c7ae0 100644
--- a/htdocs/categories/index.php
+++ b/htdocs/categories/index.php
@@ -44,6 +44,8 @@ $nosearch = GETPOST('nosearch', 'int');
$categstatic = new Categorie($db);
if (is_numeric($type)) $type = Categorie::$MAP_ID_TO_CODE[$type]; // For backward compatibility
+// Initialize technical object to manage hooks. Note that conf->hooks_modules contains array array
+$hookmanager->initHooks(array('categoryindex'));
/*
* View
diff --git a/htdocs/comm/action/document.php b/htdocs/comm/action/document.php
index 5b4cc58bb08..7bb48bbd8ba 100644
--- a/htdocs/comm/action/document.php
+++ b/htdocs/comm/action/document.php
@@ -260,7 +260,7 @@ if ($object->id > 0)
$modulepart = 'actions';
$permission = $user->rights->agenda->myactions->create || $user->rights->agenda->allactions->create;
$param = '&id='.$object->id;
- include_once DOL_DOCUMENT_ROOT.'/core/tpl/document_actions_post_headers.tpl.php';
+ include DOL_DOCUMENT_ROOT.'/core/tpl/document_actions_post_headers.tpl.php';
} else {
print $langs->trans("ErrorUnknown");
}
diff --git a/htdocs/comm/propal/document.php b/htdocs/comm/propal/document.php
index fbe7fdbec5c..b5bb8df308b 100644
--- a/htdocs/comm/propal/document.php
+++ b/htdocs/comm/propal/document.php
@@ -178,7 +178,7 @@ if ($object->id > 0)
$permission = $user->rights->propal->creer;
$permtoedit = $user->rights->propal->creer;
$param = '&id='.$object->id;
- include_once DOL_DOCUMENT_ROOT.'/core/tpl/document_actions_post_headers.tpl.php';
+ include DOL_DOCUMENT_ROOT.'/core/tpl/document_actions_post_headers.tpl.php';
} else {
print $langs->trans("ErrorUnknown");
}
diff --git a/htdocs/commande/document.php b/htdocs/commande/document.php
index f95f61b6025..9ec4e1250f5 100644
--- a/htdocs/commande/document.php
+++ b/htdocs/commande/document.php
@@ -181,7 +181,7 @@ if ($id > 0 || !empty($ref))
$permission = $user->rights->commande->creer;
$permtoedit = $user->rights->commande->creer;
$param = '&id='.$object->id.'&entity='.(!empty($object->entity) ? $object->entity : $conf->entity);
- include_once DOL_DOCUMENT_ROOT.'/core/tpl/document_actions_post_headers.tpl.php';
+ include DOL_DOCUMENT_ROOT.'/core/tpl/document_actions_post_headers.tpl.php';
} else {
dol_print_error($db);
}
diff --git a/htdocs/compta/bank/account_statement_document.php b/htdocs/compta/bank/account_statement_document.php
index fd7c6b1d292..8c9432c6837 100644
--- a/htdocs/compta/bank/account_statement_document.php
+++ b/htdocs/compta/bank/account_statement_document.php
@@ -191,7 +191,7 @@ if ($id > 0 || !empty($ref)) {
$param = '&id='.$object->id.'&num='.urlencode($numref);
$moreparam = '&num='.urlencode($numref); ;
$relativepathwithnofile = $id."/statement/".dol_sanitizeFileName($numref)."/";
- include_once DOL_DOCUMENT_ROOT.'/core/tpl/document_actions_post_headers.tpl.php';
+ include DOL_DOCUMENT_ROOT.'/core/tpl/document_actions_post_headers.tpl.php';
} else {
dol_print_error($db);
}
diff --git a/htdocs/compta/bank/document.php b/htdocs/compta/bank/document.php
index c67c0496727..f69337a169c 100644
--- a/htdocs/compta/bank/document.php
+++ b/htdocs/compta/bank/document.php
@@ -130,7 +130,7 @@ if ($id > 0 || !empty($ref)) {
$permission = $user->rights->banque->modifier;
$permtoedit = $user->rights->banque->modifier;
$param = '&id='.$object->id;
- include_once DOL_DOCUMENT_ROOT.'/core/tpl/document_actions_post_headers.tpl.php';
+ include DOL_DOCUMENT_ROOT.'/core/tpl/document_actions_post_headers.tpl.php';
} else {
dol_print_error($db);
}
diff --git a/htdocs/compta/bank/various_payment/document.php b/htdocs/compta/bank/various_payment/document.php
index 14187bf51e3..f3f87bdc7b1 100644
--- a/htdocs/compta/bank/various_payment/document.php
+++ b/htdocs/compta/bank/various_payment/document.php
@@ -148,7 +148,7 @@ if ($object->id)
$modulepart = 'banque';
$permission = $user->rights->banque->modifier;
$param = '&id='.$object->id;
- include_once DOL_DOCUMENT_ROOT.'/core/tpl/document_actions_post_headers.tpl.php';
+ include DOL_DOCUMENT_ROOT.'/core/tpl/document_actions_post_headers.tpl.php';
} else {
print $langs->trans("ErrorUnknown");
}
diff --git a/htdocs/compta/deplacement/document.php b/htdocs/compta/deplacement/document.php
index 86d0dd383f1..6d5f4ba9409 100644
--- a/htdocs/compta/deplacement/document.php
+++ b/htdocs/compta/deplacement/document.php
@@ -122,7 +122,7 @@ if ($object->id)
$modulepart = 'deplacement';
$permission = $user->rights->deplacement->creer;
$param = '&id='.$object->id;
- include_once DOL_DOCUMENT_ROOT.'/core/tpl/document_actions_post_headers.tpl.php';
+ include DOL_DOCUMENT_ROOT.'/core/tpl/document_actions_post_headers.tpl.php';
} else {
print $langs->trans("ErrorUnknown");
}
diff --git a/htdocs/compta/facture/document.php b/htdocs/compta/facture/document.php
index 3922228c4fa..5144b2c0367 100644
--- a/htdocs/compta/facture/document.php
+++ b/htdocs/compta/facture/document.php
@@ -180,7 +180,7 @@ if ($id > 0 || !empty($ref))
$permission = $user->rights->facture->creer;
$permtoedit = $user->rights->facture->creer;
$param = '&id='.$object->id;
- include_once DOL_DOCUMENT_ROOT.'/core/tpl/document_actions_post_headers.tpl.php';
+ include DOL_DOCUMENT_ROOT.'/core/tpl/document_actions_post_headers.tpl.php';
} else {
dol_print_error($db);
}
diff --git a/htdocs/compta/facture/list.php b/htdocs/compta/facture/list.php
index ca2a8f6ae44..f427466c560 100644
--- a/htdocs/compta/facture/list.php
+++ b/htdocs/compta/facture/list.php
@@ -1016,11 +1016,6 @@ if ($resql)
print ' | ';
print ' | ';
}
- if (!empty($arrayfields['f.date_closing']['checked']))
- {
- print '';
- print ' | ';
- }
if (!empty($arrayfields['total_pa']['checked']))
{
print '';
@@ -1061,6 +1056,12 @@ if ($resql)
print ' | ';
print ' | ';
}
+ // Date closing
+ if (!empty($arrayfields['f.date_closing']['checked']))
+ {
+ print '';
+ print ' | ';
+ }
if (!empty($arrayfields['f.note_public']['checked']))
{
// Note public
diff --git a/htdocs/compta/sociales/document.php b/htdocs/compta/sociales/document.php
index dbb01060a4d..87ce284f953 100644
--- a/htdocs/compta/sociales/document.php
+++ b/htdocs/compta/sociales/document.php
@@ -160,9 +160,9 @@ if ($object->id)
$modulepart = 'tax';
$permission = $user->rights->tax->charges->creer;
- $permtoedit = $user->rights->fournisseur->facture->creer;
+ $permtoedit = $user->rights->tax->charges->creer;
$param = '&id='.$object->id;
- include_once DOL_DOCUMENT_ROOT.'/core/tpl/document_actions_post_headers.tpl.php';
+ include DOL_DOCUMENT_ROOT.'/core/tpl/document_actions_post_headers.tpl.php';
} else {
print $langs->trans("ErrorUnknown");
}
diff --git a/htdocs/compta/tva/document.php b/htdocs/compta/tva/document.php
index e310e61fcb8..f8524dcfb3e 100644
--- a/htdocs/compta/tva/document.php
+++ b/htdocs/compta/tva/document.php
@@ -145,9 +145,9 @@ if ($object->id)
print dol_get_fiche_end();
$permission = $user->rights->tax->charges->creer;
- $permtoedit = $user->rights->fournisseur->facture->creer;
+ $permtoedit = $user->rights->tax->charges->creer;
$param = '&id='.$object->id;
- include_once DOL_DOCUMENT_ROOT.'/core/tpl/document_actions_post_headers.tpl.php';
+ include DOL_DOCUMENT_ROOT.'/core/tpl/document_actions_post_headers.tpl.php';
} else {
print $langs->trans("ErrorUnknown");
}
diff --git a/htdocs/contact/document.php b/htdocs/contact/document.php
index 2065ab772e6..ad9a0e9c0d5 100644
--- a/htdocs/contact/document.php
+++ b/htdocs/contact/document.php
@@ -75,6 +75,8 @@ if ($id > 0) $object->fetch($id);
$upload_dir = $conf->societe->multidir_output[$object->entity].'/contact/'.dol_sanitizeFileName($object->ref);
$modulepart = 'contact';
+// Initialize technical object to manage hooks of page. Note that conf->hooks_modules contains array of hook context
+$hookmanager->initHooks(array('contactdocument'));
/*
* Actions
diff --git a/htdocs/contact/note.php b/htdocs/contact/note.php
index ae32ef5c95e..6a6ccd5a7ee 100644
--- a/htdocs/contact/note.php
+++ b/htdocs/contact/note.php
@@ -44,6 +44,8 @@ if ($id > 0) $object->fetch($id);
$permissionnote = $user->rights->societe->creer; // Used by the include of actions_setnotes.inc.php
+// Initialize technical object to manage hooks of page. Note that conf->hooks_modules contains array of hook context
+$hookmanager->initHooks(array('contactcard'));
/*
* Actions
diff --git a/htdocs/contrat/document.php b/htdocs/contrat/document.php
index ba15af0de19..4600f17e206 100644
--- a/htdocs/contrat/document.php
+++ b/htdocs/contrat/document.php
@@ -192,7 +192,7 @@ if ($object->id)
$permission = $user->rights->contrat->creer;
$permtoedit = $user->rights->contrat->creer;
$param = '&id='.$object->id;
- include_once DOL_DOCUMENT_ROOT.'/core/tpl/document_actions_post_headers.tpl.php';
+ include DOL_DOCUMENT_ROOT.'/core/tpl/document_actions_post_headers.tpl.php';
} else {
print $langs->trans("ErrorUnknown");
}
diff --git a/htdocs/core/class/html.form.class.php b/htdocs/core/class/html.form.class.php
index c5d239e5372..7f52cb099a1 100644
--- a/htdocs/core/class/html.form.class.php
+++ b/htdocs/core/class/html.form.class.php
@@ -4295,9 +4295,17 @@ class Form
$more .= ''."\n";
} elseif ($input['type'] == 'select')
{
+ $show_empty = isset($input['select_show_empty']) ? $input['select_show_empty'] : 1;
+ $key_in_label = isset($input['select_key_in_label']) ? $input['select_key_in_label'] : 0;
+ $value_as_key = isset($input['select_value_as_key']) ? $input['select_value_as_key'] : 0;
+ $translate = isset($input['select_translate']) ? $input['select_translate'] : 0;
+ $maxlen = isset($input['select_maxlen']) ? $input['select_maxlen'] : 0;
+ $disabled = isset($input['select_disabled']) ? $input['select_disabled'] : 0;
+ $sort = isset($input['select_sort']) ? $input['select_sort'] : '';
+
$more .= '';
if (!empty($input['label'])) $more .= $input['label'].'
';
- $more .= $this->selectarray($input['name'], $input['values'], $input['default'], 1, 0, 0, $moreattr, 0, 0, 0, '', $morecss);
+ $more .= $this->selectarray($input['name'], $input['values'], $input['default'], $show_empty, $key_in_label, $value_as_key, $moreattr, $translate, $maxlen, $disabled, $sort, $morecss);
$more .= '
'."\n";
} elseif ($input['type'] == 'checkbox')
{
diff --git a/htdocs/core/lib/payments.lib.php b/htdocs/core/lib/payments.lib.php
index 601dad3275d..286243564f1 100644
--- a/htdocs/core/lib/payments.lib.php
+++ b/htdocs/core/lib/payments.lib.php
@@ -28,7 +28,6 @@
*/
function payment_prepare_head(Paiement $object)
{
-
global $langs, $conf;
$h = 0;
@@ -264,9 +263,9 @@ function getOnlinePaymentUrl($mode, $type, $ref = '', $amount = '9.99', $freetag
$out .= ($mode ? '' : '');
}
}
- } elseif ($type == 'member' || $type == 'membersubscription')
- {
- $out = $urltouse.'/public/payment/newpayment.php?source=membersubscription&ref='.($mode ? '' : '');
+ } elseif ($type == 'member' || $type == 'membersubscription') {
+ $newtype = 'member';
+ $out = $urltouse.'/public/payment/newpayment.php?source='.$newtype.'&ref='.($mode ? '' : '');
if ($mode == 1) $out .= 'member_ref';
if ($mode == 0) $out .= urlencode($ref);
$out .= ($mode ? '' : '');
@@ -275,8 +274,8 @@ function getOnlinePaymentUrl($mode, $type, $ref = '', $amount = '9.99', $freetag
if (empty($conf->global->PAYMENT_SECURITY_TOKEN_UNIQUE)) $out .= '&securekey='.$conf->global->PAYMENT_SECURITY_TOKEN;
else {
$out .= '&securekey='.($mode ? '' : '');
- if ($mode == 1) $out .= "hash('".$conf->global->PAYMENT_SECURITY_TOKEN."' + '".$type."' + member_ref)";
- if ($mode == 0) $out .= dol_hash($conf->global->PAYMENT_SECURITY_TOKEN.$type.$ref, 2);
+ if ($mode == 1) $out .= "hash('".$conf->global->PAYMENT_SECURITY_TOKEN."' + '".$newtype."' + member_ref)";
+ if ($mode == 0) $out .= dol_hash($conf->global->PAYMENT_SECURITY_TOKEN.$newtype.$ref, 2);
$out .= ($mode ? '' : '');
}
}
diff --git a/htdocs/core/modules/commande/doc/pdf_einstein.modules.php b/htdocs/core/modules/commande/doc/pdf_einstein.modules.php
index f2f78efbaa2..43bbcdd5959 100644
--- a/htdocs/core/modules/commande/doc/pdf_einstein.modules.php
+++ b/htdocs/core/modules/commande/doc/pdf_einstein.modules.php
@@ -290,9 +290,12 @@ class pdf_einstein extends ModelePDFCommandes
}
$pdf->SetFont(pdf_getPDFFont($outputlangs));
// Set path to the background PDF File
- if (!empty($conf->global->MAIN_ADD_PDF_BACKGROUND))
- {
- $pagecount = $pdf->setSourceFile($conf->mycompany->multidir_output[$object->entity].'/'.$conf->global->MAIN_ADD_PDF_BACKGROUND);
+ if (!empty($conf->global->MAIN_ADD_PDF_BACKGROUND)) {
+ $logodir = $conf->mycompany->dir_output;
+ if (!empty($conf->mycompany->multidir_output[$object->entity])) {
+ $logodir = $conf->mycompany->multidir_output[$object->entity];
+ }
+ $pagecount = $pdf->setSourceFile($logodir.'/'.$conf->global->MAIN_ADD_PDF_BACKGROUND);
$tplidx = $pdf->importPage(1);
}
diff --git a/htdocs/core/modules/commande/doc/pdf_eratosthene.modules.php b/htdocs/core/modules/commande/doc/pdf_eratosthene.modules.php
index 6037714f6db..16f29f95dcb 100644
--- a/htdocs/core/modules/commande/doc/pdf_eratosthene.modules.php
+++ b/htdocs/core/modules/commande/doc/pdf_eratosthene.modules.php
@@ -338,9 +338,12 @@ class pdf_eratosthene extends ModelePDFCommandes
}
$pdf->SetFont(pdf_getPDFFont($outputlangs));
// Set path to the background PDF File
- if (!empty($conf->global->MAIN_ADD_PDF_BACKGROUND))
- {
- $pagecount = $pdf->setSourceFile($conf->mycompany->multidir_output[$object->entity].'/'.$conf->global->MAIN_ADD_PDF_BACKGROUND);
+ if (!empty($conf->global->MAIN_ADD_PDF_BACKGROUND)) {
+ $logodir = $conf->mycompany->dir_output;
+ if (!empty($conf->mycompany->multidir_output[$object->entity])) {
+ $logodir = $conf->mycompany->multidir_output[$object->entity];
+ }
+ $pagecount = $pdf->setSourceFile($logodir.'/'.$conf->global->MAIN_ADD_PDF_BACKGROUND);
$tplidx = $pdf->importPage(1);
}
diff --git a/htdocs/core/modules/facture/doc/pdf_crabe.modules.php b/htdocs/core/modules/facture/doc/pdf_crabe.modules.php
index 9e336863467..f92deff0c88 100644
--- a/htdocs/core/modules/facture/doc/pdf_crabe.modules.php
+++ b/htdocs/core/modules/facture/doc/pdf_crabe.modules.php
@@ -335,9 +335,12 @@ class pdf_crabe extends ModelePDFFactures
$pdf->SetFont(pdf_getPDFFont($outputlangs));
// Set path to the background PDF File
- if (!empty($conf->global->MAIN_ADD_PDF_BACKGROUND))
- {
- $pagecount = $pdf->setSourceFile($conf->mycompany->multidir_output[$object->entity].'/'.$conf->global->MAIN_ADD_PDF_BACKGROUND);
+ if (!empty($conf->global->MAIN_ADD_PDF_BACKGROUND)) {
+ $logodir = $conf->mycompany->dir_output;
+ if (!empty($conf->mycompany->multidir_output[$object->entity])) {
+ $logodir = $conf->mycompany->multidir_output[$object->entity];
+ }
+ $pagecount = $pdf->setSourceFile($logodir.'/'.$conf->global->MAIN_ADD_PDF_BACKGROUND);
$tplidx = $pdf->importPage(1);
}
diff --git a/htdocs/core/modules/facture/doc/pdf_sponge.modules.php b/htdocs/core/modules/facture/doc/pdf_sponge.modules.php
index cf6ec0e4711..b42858ca4c9 100644
--- a/htdocs/core/modules/facture/doc/pdf_sponge.modules.php
+++ b/htdocs/core/modules/facture/doc/pdf_sponge.modules.php
@@ -355,9 +355,12 @@ class pdf_sponge extends ModelePDFFactures
$pdf->SetFont(pdf_getPDFFont($outputlangs));
// Set path to the background PDF File
- if (!empty($conf->global->MAIN_ADD_PDF_BACKGROUND))
- {
- $pagecount = $pdf->setSourceFile($conf->mycompany->multidir_output[$object->entity].'/'.$conf->global->MAIN_ADD_PDF_BACKGROUND);
+ if (!empty($conf->global->MAIN_ADD_PDF_BACKGROUND)) {
+ $logodir = $conf->mycompany->dir_output;
+ if (!empty($conf->mycompany->multidir_output[$object->entity])) {
+ $logodir = $conf->mycompany->multidir_output[$object->entity];
+ }
+ $pagecount = $pdf->setSourceFile($logodir.'/'.$conf->global->MAIN_ADD_PDF_BACKGROUND);
$tplidx = $pdf->importPage(1);
}
diff --git a/htdocs/core/modules/propale/doc/pdf_azur.modules.php b/htdocs/core/modules/propale/doc/pdf_azur.modules.php
index 856828edc00..e138fb43305 100644
--- a/htdocs/core/modules/propale/doc/pdf_azur.modules.php
+++ b/htdocs/core/modules/propale/doc/pdf_azur.modules.php
@@ -335,9 +335,12 @@ class pdf_azur extends ModelePDFPropales
}
$pdf->SetFont(pdf_getPDFFont($outputlangs));
// Set path to the background PDF File
- if (!empty($conf->global->MAIN_ADD_PDF_BACKGROUND))
- {
- $pagecount = $pdf->setSourceFile($conf->mycompany->multidir_output[$object->entity].'/'.$conf->global->MAIN_ADD_PDF_BACKGROUND);
+ if (!empty($conf->global->MAIN_ADD_PDF_BACKGROUND)) {
+ $logodir = $conf->mycompany->dir_output;
+ if (!empty($conf->mycompany->multidir_output[$object->entity])) {
+ $logodir = $conf->mycompany->multidir_output[$object->entity];
+ }
+ $pagecount = $pdf->setSourceFile($logodir.'/'.$conf->global->MAIN_ADD_PDF_BACKGROUND);
$tplidx = $pdf->importPage(1);
}
diff --git a/htdocs/core/modules/propale/doc/pdf_cyan.modules.php b/htdocs/core/modules/propale/doc/pdf_cyan.modules.php
index c82fb592d82..7c9f4e6fe77 100644
--- a/htdocs/core/modules/propale/doc/pdf_cyan.modules.php
+++ b/htdocs/core/modules/propale/doc/pdf_cyan.modules.php
@@ -339,9 +339,12 @@ class pdf_cyan extends ModelePDFPropales
}
$pdf->SetFont(pdf_getPDFFont($outputlangs));
// Set path to the background PDF File
- if (!empty($conf->global->MAIN_ADD_PDF_BACKGROUND))
- {
- $pagecount = $pdf->setSourceFile($conf->mycompany->multidir_output[$object->entity].'/'.$conf->global->MAIN_ADD_PDF_BACKGROUND);
+ if (!empty($conf->global->MAIN_ADD_PDF_BACKGROUND)) {
+ $logodir = $conf->mycompany->dir_output;
+ if (!empty($conf->mycompany->multidir_output[$object->entity])) {
+ $logodir = $conf->mycompany->multidir_output[$object->entity];
+ }
+ $pagecount = $pdf->setSourceFile($logodir.'/'.$conf->global->MAIN_ADD_PDF_BACKGROUND);
$tplidx = $pdf->importPage(1);
}
diff --git a/htdocs/don/document.php b/htdocs/don/document.php
index 9ff1fa98ea2..203ed9da97f 100644
--- a/htdocs/don/document.php
+++ b/htdocs/don/document.php
@@ -182,10 +182,10 @@ if ($object->id)
print dol_get_fiche_end();
$modulepart = 'don';
- $permission = $user->rights->don->lire;
+ $permission = $user->rights->don->creer;
$permtoedit = $user->rights->don->creer;
$param = '&id='.$object->id;
- include_once DOL_DOCUMENT_ROOT.'/core/tpl/document_actions_post_headers.tpl.php';
+ include DOL_DOCUMENT_ROOT.'/core/tpl/document_actions_post_headers.tpl.php';
} else {
print $langs->trans("ErrorUnknown");
}
diff --git a/htdocs/expedition/document.php b/htdocs/expedition/document.php
index a9b19ede7c3..933763bd29a 100644
--- a/htdocs/expedition/document.php
+++ b/htdocs/expedition/document.php
@@ -175,7 +175,7 @@ if ($id > 0 || !empty($ref)) {
$permission = $user->rights->expedition->creer;
$permtoedit = $user->rights->expedition->creer;
$param = '&id='.$object->id;
- include_once DOL_DOCUMENT_ROOT.'/core/tpl/document_actions_post_headers.tpl.php';
+ include DOL_DOCUMENT_ROOT.'/core/tpl/document_actions_post_headers.tpl.php';
} else {
dol_print_error($db);
}
diff --git a/htdocs/expensereport/document.php b/htdocs/expensereport/document.php
index 55799b10589..bc03a300801 100644
--- a/htdocs/expensereport/document.php
+++ b/htdocs/expensereport/document.php
@@ -149,7 +149,7 @@ if ($object->id)
$permission = $user->rights->expensereport->creer;
$permtoedit = $user->rights->expensereport->creer;
$param = '&id='.$object->id;
- include_once DOL_DOCUMENT_ROOT.'/core/tpl/document_actions_post_headers.tpl.php';
+ include DOL_DOCUMENT_ROOT.'/core/tpl/document_actions_post_headers.tpl.php';
} else {
print $langs->trans("ErrorUnknown");
}
diff --git a/htdocs/fichinter/document.php b/htdocs/fichinter/document.php
index 1b9326468f4..0795072fa55 100644
--- a/htdocs/fichinter/document.php
+++ b/htdocs/fichinter/document.php
@@ -169,7 +169,7 @@ if ($object->id)
$permission = $user->rights->ficheinter->creer;
$permtoedit = $user->rights->ficheinter->creer;
$param = '&id='.$object->id;
- include_once DOL_DOCUMENT_ROOT.'/core/tpl/document_actions_post_headers.tpl.php';
+ include DOL_DOCUMENT_ROOT.'/core/tpl/document_actions_post_headers.tpl.php';
} else {
print $langs->trans("ErrorUnknown");
}
diff --git a/htdocs/fourn/commande/document.php b/htdocs/fourn/commande/document.php
index d5a4455db06..ef37ad16241 100644
--- a/htdocs/fourn/commande/document.php
+++ b/htdocs/fourn/commande/document.php
@@ -176,7 +176,7 @@ if ($object->id > 0)
$permission = $user->rights->fournisseur->commande->creer;
$permtoedit = $user->rights->fournisseur->commande->creer;
$param = '&id='.$object->id;
- include_once DOL_DOCUMENT_ROOT.'/core/tpl/document_actions_post_headers.tpl.php';
+ include DOL_DOCUMENT_ROOT.'/core/tpl/document_actions_post_headers.tpl.php';
} else {
header('Location: index.php');
exit;
diff --git a/htdocs/holiday/document.php b/htdocs/holiday/document.php
index f366bb50c85..732c4471763 100644
--- a/htdocs/holiday/document.php
+++ b/htdocs/holiday/document.php
@@ -300,7 +300,7 @@ if ($object->id)
$permission = $user->rights->holiday->write;
$permtoedit = $user->rights->holiday->write;
$param = '&id='.$object->id;
- include_once DOL_DOCUMENT_ROOT.'/core/tpl/document_actions_post_headers.tpl.php';
+ include DOL_DOCUMENT_ROOT.'/core/tpl/document_actions_post_headers.tpl.php';
} else {
print $langs->trans("ErrorUnknown");
}
diff --git a/htdocs/langs/en_US/accountancy.lang b/htdocs/langs/en_US/accountancy.lang
index bda6502aeed..e65eb2c3e14 100644
--- a/htdocs/langs/en_US/accountancy.lang
+++ b/htdocs/langs/en_US/accountancy.lang
@@ -207,7 +207,7 @@ Codejournal=Journal
JournalLabel=Journal label
NumPiece=Piece number
TransactionNumShort=Num. transaction
-AccountingCategory=Personalized groups
+AccountingCategory=Custom group
GroupByAccountAccounting=Group by general ledger account
GroupBySubAccountAccounting=Group by subledger account
AccountingAccountGroupsDesc=You can define here some groups of accounting account. They will be used for personalized accounting reports.
diff --git a/htdocs/loan/document.php b/htdocs/loan/document.php
index 91bfaf1f921..8606db2622b 100644
--- a/htdocs/loan/document.php
+++ b/htdocs/loan/document.php
@@ -157,7 +157,7 @@ if ($object->id)
$permission = $user->rights->loan->write;
$permtoedit = $user->rights->loan->write;
$param = '&id='.$object->id;
- include_once DOL_DOCUMENT_ROOT.'/core/tpl/document_actions_post_headers.tpl.php';
+ include DOL_DOCUMENT_ROOT.'/core/tpl/document_actions_post_headers.tpl.php';
} else {
print $langs->trans("ErrorUnknown");
}
diff --git a/htdocs/modulebuilder/template/myobject_document.php b/htdocs/modulebuilder/template/myobject_document.php
index 7399fa6fb09..64a7075348d 100644
--- a/htdocs/modulebuilder/template/myobject_document.php
+++ b/htdocs/modulebuilder/template/myobject_document.php
@@ -218,7 +218,7 @@ if ($object->id)
//$relativepathwithnofile='myobject/' . dol_sanitizeFileName($object->id).'/';
$relativepathwithnofile = 'myobject/'.dol_sanitizeFileName($object->ref).'/';
- include_once DOL_DOCUMENT_ROOT.'/core/tpl/document_actions_post_headers.tpl.php';
+ include DOL_DOCUMENT_ROOT.'/core/tpl/document_actions_post_headers.tpl.php';
} else {
accessforbidden('', 0, 1);
}
diff --git a/htdocs/mrp/mo_document.php b/htdocs/mrp/mo_document.php
index 01131b9ffa2..9db6dffd014 100644
--- a/htdocs/mrp/mo_document.php
+++ b/htdocs/mrp/mo_document.php
@@ -181,7 +181,7 @@ if ($object->id)
//$relativepathwithnofile='mo/' . dol_sanitizeFileName($object->id).'/';
$relativepathwithnofile = 'mo/'.dol_sanitizeFileName($object->ref).'/';
- include_once DOL_DOCUMENT_ROOT.'/core/tpl/document_actions_post_headers.tpl.php';
+ include DOL_DOCUMENT_ROOT.'/core/tpl/document_actions_post_headers.tpl.php';
} else {
accessforbidden('', 0, 1);
}
diff --git a/htdocs/product/document.php b/htdocs/product/document.php
index f8f5322f2f8..76b54df8d35 100644
--- a/htdocs/product/document.php
+++ b/htdocs/product/document.php
@@ -237,7 +237,7 @@ if ($object->id)
print dol_get_fiche_end();
$param = '&id='.$object->id;
- include_once DOL_DOCUMENT_ROOT.'/core/tpl/document_actions_post_headers.tpl.php';
+ include DOL_DOCUMENT_ROOT.'/core/tpl/document_actions_post_headers.tpl.php';
// Merge propal PDF document PDF files
diff --git a/htdocs/product/stock/productlot_document.php b/htdocs/product/stock/productlot_document.php
index 2882bbf1c9f..e6b9bb927b8 100644
--- a/htdocs/product/stock/productlot_document.php
+++ b/htdocs/product/stock/productlot_document.php
@@ -153,7 +153,7 @@ if ($object->id)
$permission = ($user->rights->produit->creer);
$param = '&id='.$object->id;
- include_once DOL_DOCUMENT_ROOT.'/core/tpl/document_actions_post_headers.tpl.php';
+ include DOL_DOCUMENT_ROOT.'/core/tpl/document_actions_post_headers.tpl.php';
} else {
print $langs->trans("ErrorUnknown");
}
diff --git a/htdocs/projet/card.php b/htdocs/projet/card.php
index 7a12f797913..df63c805948 100644
--- a/htdocs/projet/card.php
+++ b/htdocs/projet/card.php
@@ -612,7 +612,18 @@ if ($action == 'create' && $user->rights->projet->creer)
$array = array();
if (empty($conf->global->PROJECT_DISABLE_PRIVATE_PROJECT)) $array[0] = $langs->trans("PrivateProject");
if (empty($conf->global->PROJECT_DISABLE_PUBLIC_PROJECT)) $array[1] = $langs->trans("SharedProject");
- print $form->selectarray('public', $array, GETPOST('public') ?GETPOST('public') : $object->public, 0, 0, 0, '', 0, 0, 0, '', '', 1);
+
+ if (count($array) > 0) {
+ print $form->selectarray('public', $array, GETPOSTISSET('public') ? GETPOST('public') : $object->public, 0, 0, 0, '', 0, 0, 0, '', '', 1);
+ } else {
+ print '';
+
+ if ( (GETPOSTISSET('public') ? GETPOST('public') : $object->public)==0) {
+ print $langs->trans("PrivateProject");
+ } else {
+ print $langs->trans("SharedProject");
+ }
+ }
print '
';
// Date start
@@ -886,11 +897,21 @@ if ($action == 'create' && $user->rights->projet->creer)
$array = array();
if (empty($conf->global->PROJECT_DISABLE_PRIVATE_PROJECT)) $array[0] = $langs->trans("PrivateProject");
if (empty($conf->global->PROJECT_DISABLE_PUBLIC_PROJECT)) $array[1] = $langs->trans("SharedProject");
- print $form->selectarray('public', $array, $object->public, 0, 0, 0, '', 0, 0, 0, '', '', 1);
+
+ if (count($array) > 0) {
+ print $form->selectarray('public', $array, $object->public, 0, 0, 0, '', 0, 0, 0, '', '', 1);
+ } else {
+ print '