Merge branch '14.0' of git@github.com:Dolibarr/dolibarr.git into 14.0
This commit is contained in:
commit
9dc61adcc7
@ -52,22 +52,22 @@ if ($cancel) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
if ($action == 'update') {
|
if ($action == 'update') {
|
||||||
dolibarr_set_const($db, "MAIN_PDF_FORMAT", GETPOST("MAIN_PDF_FORMAT"), 'chaine', 0, '', $conf->entity);
|
if (GETPOSTISSET('MAIN_PDF_FORMAT')) dolibarr_set_const($db, "MAIN_PDF_FORMAT", GETPOST("MAIN_PDF_FORMAT"), 'chaine', 0, '', $conf->entity);
|
||||||
|
|
||||||
dolibarr_set_const($db, "MAIN_PDF_MARGIN_LEFT", GETPOST("MAIN_PDF_MARGIN_LEFT"), 'chaine', 0, '', $conf->entity);
|
if (GETPOSTISSET('MAIN_PDF_MARGIN_LEFT')) dolibarr_set_const($db, "MAIN_PDF_MARGIN_LEFT", GETPOST("MAIN_PDF_MARGIN_LEFT"), 'chaine', 0, '', $conf->entity);
|
||||||
dolibarr_set_const($db, "MAIN_PDF_MARGIN_RIGHT", GETPOST("MAIN_PDF_MARGIN_TOP"), 'chaine', 0, '', $conf->entity);
|
if (GETPOSTISSET('MAIN_PDF_MARGIN_RIGHT')) dolibarr_set_const($db, "MAIN_PDF_MARGIN_RIGHT", GETPOST("MAIN_PDF_MARGIN_TOP"), 'chaine', 0, '', $conf->entity);
|
||||||
dolibarr_set_const($db, "MAIN_PDF_MARGIN_BOTTOM", GETPOST("MAIN_PDF_MARGIN_BOTTOM"), 'chaine', 0, '', $conf->entity);
|
if (GETPOSTISSET('MAIN_PDF_MARGIN_BOTTOM')) dolibarr_set_const($db, "MAIN_PDF_MARGIN_BOTTOM", GETPOST("MAIN_PDF_MARGIN_BOTTOM"), 'chaine', 0, '', $conf->entity);
|
||||||
|
|
||||||
dolibarr_set_const($db, "MAIN_PROFID1_IN_ADDRESS", GETPOST("MAIN_PROFID1_IN_ADDRESS"), 'chaine', 0, '', $conf->entity);
|
if (GETPOSTISSET('MAIN_PROFID1_IN_ADDRESS')) dolibarr_set_const($db, "MAIN_PROFID1_IN_ADDRESS", GETPOST("MAIN_PROFID1_IN_ADDRESS"), 'chaine', 0, '', $conf->entity);
|
||||||
dolibarr_set_const($db, "MAIN_PROFID2_IN_ADDRESS", GETPOST("MAIN_PROFID2_IN_ADDRESS"), 'chaine', 0, '', $conf->entity);
|
if (GETPOSTISSET('MAIN_PROFID2_IN_ADDRESS')) dolibarr_set_const($db, "MAIN_PROFID2_IN_ADDRESS", GETPOST("MAIN_PROFID2_IN_ADDRESS"), 'chaine', 0, '', $conf->entity);
|
||||||
dolibarr_set_const($db, "MAIN_PROFID3_IN_ADDRESS", GETPOST("MAIN_PROFID3_IN_ADDRESS"), 'chaine', 0, '', $conf->entity);
|
if (GETPOSTISSET('MAIN_PROFID3_IN_ADDRESS')) dolibarr_set_const($db, "MAIN_PROFID3_IN_ADDRESS", GETPOST("MAIN_PROFID3_IN_ADDRESS"), 'chaine', 0, '', $conf->entity);
|
||||||
dolibarr_set_const($db, "MAIN_PROFID4_IN_ADDRESS", GETPOST("MAIN_PROFID4_IN_ADDRESS"), 'chaine', 0, '', $conf->entity);
|
if (GETPOSTISSET('MAIN_PROFID4_IN_ADDRESS')) dolibarr_set_const($db, "MAIN_PROFID4_IN_ADDRESS", GETPOST("MAIN_PROFID4_IN_ADDRESS"), 'chaine', 0, '', $conf->entity);
|
||||||
dolibarr_set_const($db, "MAIN_PROFID5_IN_ADDRESS", GETPOST("MAIN_PROFID5_IN_ADDRESS"), 'chaine', 0, '', $conf->entity);
|
if (GETPOSTISSET('MAIN_PROFID5_IN_ADDRESS')) dolibarr_set_const($db, "MAIN_PROFID5_IN_ADDRESS", GETPOST("MAIN_PROFID5_IN_ADDRESS"), 'chaine', 0, '', $conf->entity);
|
||||||
dolibarr_set_const($db, "MAIN_PROFID6_IN_ADDRESS", GETPOST("MAIN_PROFID6_IN_ADDRESS"), 'chaine', 0, '', $conf->entity);
|
if (GETPOSTISSET('MAIN_PROFID6_IN_ADDRESS')) dolibarr_set_const($db, "MAIN_PROFID6_IN_ADDRESS", GETPOST("MAIN_PROFID6_IN_ADDRESS"), 'chaine', 0, '', $conf->entity);
|
||||||
|
|
||||||
dolibarr_set_const($db, "MAIN_GENERATE_DOCUMENTS_WITHOUT_VAT", GETPOST("MAIN_GENERATE_DOCUMENTS_WITHOUT_VAT"), 'chaine', 0, '', $conf->entity);
|
if (GETPOSTISSET('MAIN_GENERATE_DOCUMENTS_WITHOUT_VAT')) dolibarr_set_const($db, "MAIN_GENERATE_DOCUMENTS_WITHOUT_VAT", GETPOST("MAIN_GENERATE_DOCUMENTS_WITHOUT_VAT"), 'chaine', 0, '', $conf->entity);
|
||||||
|
|
||||||
dolibarr_set_const($db, "MAIN_TVAINTRA_NOT_IN_ADDRESS", GETPOST("MAIN_TVAINTRA_NOT_IN_ADDRESS"), 'chaine', 0, '', $conf->entity);
|
if (GETPOSTISSET('MAIN_TVAINTRA_NOT_IN_ADDRESS')) dolibarr_set_const($db, "MAIN_TVAINTRA_NOT_IN_ADDRESS", GETPOST("MAIN_TVAINTRA_NOT_IN_ADDRESS"), 'chaine', 0, '', $conf->entity);
|
||||||
|
|
||||||
if (!empty($conf->projet->enabled)) {
|
if (!empty($conf->projet->enabled)) {
|
||||||
if (GETPOST('PDF_SHOW_PROJECT_REF_OR_LABEL') == 'no') {
|
if (GETPOST('PDF_SHOW_PROJECT_REF_OR_LABEL') == 'no') {
|
||||||
@ -82,20 +82,20 @@ if ($action == 'update') {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
dolibarr_set_const($db, "MAIN_GENERATE_DOCUMENTS_HIDE_DETAILS", GETPOST("MAIN_GENERATE_DOCUMENTS_HIDE_DETAILS"), 'chaine', 0, '', $conf->entity);
|
if (GETPOSTISSET('MAIN_GENERATE_DOCUMENTS_HIDE_DETAILS')) dolibarr_set_const($db, "MAIN_GENERATE_DOCUMENTS_HIDE_DETAILS", GETPOST("MAIN_GENERATE_DOCUMENTS_HIDE_DETAILS"), 'chaine', 0, '', $conf->entity);
|
||||||
dolibarr_set_const($db, "MAIN_GENERATE_DOCUMENTS_HIDE_DESC", GETPOST("MAIN_GENERATE_DOCUMENTS_HIDE_DESC"), 'chaine', 0, '', $conf->entity);
|
if (GETPOSTISSET('MAIN_GENERATE_DOCUMENTS_HIDE_DESC')) dolibarr_set_const($db, "MAIN_GENERATE_DOCUMENTS_HIDE_DESC", GETPOST("MAIN_GENERATE_DOCUMENTS_HIDE_DESC"), 'chaine', 0, '', $conf->entity);
|
||||||
dolibarr_set_const($db, "MAIN_GENERATE_DOCUMENTS_HIDE_REF", GETPOST("MAIN_GENERATE_DOCUMENTS_HIDE_REF"), 'chaine', 0, '', $conf->entity);
|
if (GETPOSTISSET('MAIN_GENERATE_DOCUMENTS_HIDE_REF')) dolibarr_set_const($db, "MAIN_GENERATE_DOCUMENTS_HIDE_REF", GETPOST("MAIN_GENERATE_DOCUMENTS_HIDE_REF"), 'chaine', 0, '', $conf->entity);
|
||||||
|
|
||||||
dolibarr_set_const($db, "MAIN_DOCUMENTS_LOGO_HEIGHT", GETPOST("MAIN_DOCUMENTS_LOGO_HEIGHT", 'int'), 'chaine', 0, '', $conf->entity);
|
if (GETPOSTISSET('MAIN_DOCUMENTS_LOGO_HEIGHT')) dolibarr_set_const($db, "MAIN_DOCUMENTS_LOGO_HEIGHT", GETPOST("MAIN_DOCUMENTS_LOGO_HEIGHT", 'int'), 'chaine', 0, '', $conf->entity);
|
||||||
dolibarr_set_const($db, "MAIN_INVERT_SENDER_RECIPIENT", GETPOST("MAIN_INVERT_SENDER_RECIPIENT"), 'chaine', 0, '', $conf->entity);
|
if (GETPOSTISSET('MAIN_INVERT_SENDER_RECIPIENT')) dolibarr_set_const($db, "MAIN_INVERT_SENDER_RECIPIENT", GETPOST("MAIN_INVERT_SENDER_RECIPIENT"), 'chaine', 0, '', $conf->entity);
|
||||||
dolibarr_set_const($db, "MAIN_PDF_USE_ISO_LOCATION", GETPOST("MAIN_PDF_USE_ISO_LOCATION"), 'chaine', 0, '', $conf->entity);
|
if (GETPOSTISSET('MAIN_PDF_USE_ISO_LOCATION')) dolibarr_set_const($db, "MAIN_PDF_USE_ISO_LOCATION", GETPOST("MAIN_PDF_USE_ISO_LOCATION"), 'chaine', 0, '', $conf->entity);
|
||||||
dolibarr_set_const($db, "MAIN_GENERATE_DOCUMENTS_SHOW_FOOT_DETAILS", GETPOST("MAIN_GENERATE_DOCUMENTS_SHOW_FOOT_DETAILS"), 'chaine', 0, '', $conf->entity);
|
if (GETPOSTISSET('MAIN_GENERATE_DOCUMENTS_SHOW_FOOT_DETAILS')) dolibarr_set_const($db, "MAIN_GENERATE_DOCUMENTS_SHOW_FOOT_DETAILS", GETPOST("MAIN_GENERATE_DOCUMENTS_SHOW_FOOT_DETAILS"), 'chaine', 0, '', $conf->entity);
|
||||||
|
|
||||||
dolibarr_set_const($db, "MAIN_PDF_MAIN_HIDE_SECOND_TAX", GETPOST("MAIN_PDF_MAIN_HIDE_SECOND_TAX"), 'chaine', 0, '', $conf->entity);
|
if (GETPOSTISSET('MAIN_PDF_MAIN_HIDE_SECOND_TAX')) dolibarr_set_const($db, "MAIN_PDF_MAIN_HIDE_SECOND_TAX", GETPOST("MAIN_PDF_MAIN_HIDE_SECOND_TAX"), 'chaine', 0, '', $conf->entity);
|
||||||
dolibarr_set_const($db, "MAIN_PDF_MAIN_HIDE_THIRD_TAX", GETPOST("MAIN_PDF_MAIN_HIDE_THIRD_TAX"), 'chaine', 0, '', $conf->entity);
|
if (GETPOSTISSET('MAIN_PDF_MAIN_HIDE_THIRD_TAX')) dolibarr_set_const($db, "MAIN_PDF_MAIN_HIDE_THIRD_TAX", GETPOST("MAIN_PDF_MAIN_HIDE_THIRD_TAX"), 'chaine', 0, '', $conf->entity);
|
||||||
|
|
||||||
dolibarr_set_const($db, "PDF_USE_ALSO_LANGUAGE_CODE", GETPOST('PDF_USE_ALSO_LANGUAGE_CODE', 'alpha'), 'chaine', 0, '', $conf->entity);
|
if (GETPOSTISSET('PDF_USE_ALSO_LANGUAGE_CODE')) dolibarr_set_const($db, "PDF_USE_ALSO_LANGUAGE_CODE", GETPOST('PDF_USE_ALSO_LANGUAGE_CODE', 'alpha'), 'chaine', 0, '', $conf->entity);
|
||||||
dolibarr_set_const($db, "SHOW_SUBPRODUCT_REF_IN_PDF", GETPOST('SHOW_SUBPRODUCT_REF_IN_PDF', 'alpha'), 'chaine', 0, '', $conf->entity);
|
if (GETPOSTISSET('SHOW_SUBPRODUCT_REF_IN_PDF')) dolibarr_set_const($db, "SHOW_SUBPRODUCT_REF_IN_PDF", GETPOST('SHOW_SUBPRODUCT_REF_IN_PDF', 'alpha'), 'chaine', 0, '', $conf->entity);
|
||||||
|
|
||||||
setEventMessages($langs->trans("SetupSaved"), null, 'mesgs');
|
setEventMessages($langs->trans("SetupSaved"), null, 'mesgs');
|
||||||
|
|
||||||
|
|||||||
@ -1628,7 +1628,7 @@ class CMailFile
|
|||||||
* @return array array of email => name
|
* @return array array of email => name
|
||||||
* @see getValidAddress()
|
* @see getValidAddress()
|
||||||
*/
|
*/
|
||||||
public function getArrayAddress($address)
|
public static function getArrayAddress($address)
|
||||||
{
|
{
|
||||||
global $conf;
|
global $conf;
|
||||||
|
|
||||||
|
|||||||
@ -62,98 +62,108 @@ if ($object->id > 0) {
|
|||||||
restrictedArea($user, 'produit|service', $fieldvalue, 'product&product', '', '', $fieldtype);
|
restrictedArea($user, 'produit|service', $fieldvalue, 'product&product', '', '', $fieldtype);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// Initialize technical object to manage hooks of page. Note that conf->hooks_modules contains array of hook context
|
||||||
|
$hookmanager->initHooks(array('producttranslationcard', 'globalcard'));
|
||||||
|
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Actions
|
* Actions
|
||||||
*/
|
*/
|
||||||
|
|
||||||
// retour a l'affichage des traduction si annulation
|
$parameters = array('id'=>$id, 'ref'=>$ref);
|
||||||
if ($cancel == $langs->trans("Cancel")) {
|
$reshook = $hookmanager->executeHooks('doActions', $parameters, $object, $action); // Note that $action and $object may have been modified by some hooks
|
||||||
$action = '';
|
if ($reshook < 0) {
|
||||||
|
setEventMessages($hookmanager->error, $hookmanager->errors, 'errors');
|
||||||
}
|
}
|
||||||
|
if (empty($reshook)) {
|
||||||
if ($action == 'delete' && GETPOST('langtodelete', 'alpha')) {
|
// retour a l'affichage des traduction si annulation
|
||||||
$object = new Product($db);
|
if ($cancel == $langs->trans("Cancel")) {
|
||||||
$object->fetch($id);
|
|
||||||
$object->delMultiLangs(GETPOST('langtodelete', 'alpha'), $user);
|
|
||||||
setEventMessages($langs->trans("RecordDeleted"), null, 'mesgs');
|
|
||||||
$action = '';
|
|
||||||
}
|
|
||||||
|
|
||||||
// Add translation
|
|
||||||
if ($action == 'vadd' && $cancel != $langs->trans("Cancel") && ($user->rights->produit->creer || $user->rights->service->creer)) {
|
|
||||||
$object = new Product($db);
|
|
||||||
$object->fetch($id);
|
|
||||||
$current_lang = $langs->getDefaultLang();
|
|
||||||
|
|
||||||
// update de l'objet
|
|
||||||
if (GETPOST("forcelangprod") == $current_lang) {
|
|
||||||
$object->label = GETPOST("libelle");
|
|
||||||
$object->description = dol_htmlcleanlastbr(GETPOST("desc", 'restricthtml'));
|
|
||||||
$object->other = dol_htmlcleanlastbr(GETPOST("other", 'restricthtml'));
|
|
||||||
|
|
||||||
$object->update($object->id, $user);
|
|
||||||
} else {
|
|
||||||
$object->multilangs[GETPOST("forcelangprod")]["label"] = GETPOST("libelle");
|
|
||||||
$object->multilangs[GETPOST("forcelangprod")]["description"] = dol_htmlcleanlastbr(GETPOST("desc", 'restricthtml'));
|
|
||||||
$object->multilangs[GETPOST("forcelangprod")]["other"] = dol_htmlcleanlastbr(GETPOST("other", 'restricthtml'));
|
|
||||||
}
|
|
||||||
|
|
||||||
// save in database
|
|
||||||
if (GETPOST("forcelangprod")) {
|
|
||||||
$result = $object->setMultiLangs($user);
|
|
||||||
} else {
|
|
||||||
$object->error = $langs->trans("ErrorFieldRequired", $langs->transnoentitiesnoconv("Language"));
|
|
||||||
$result = -1;
|
|
||||||
}
|
|
||||||
|
|
||||||
if ($result > 0) {
|
|
||||||
$action = '';
|
$action = '';
|
||||||
} else {
|
|
||||||
$action = 'add';
|
|
||||||
setEventMessages($object->error, $object->errors, 'errors');
|
|
||||||
}
|
}
|
||||||
}
|
|
||||||
|
|
||||||
// Edit translation
|
if ($action == 'delete' && GETPOST('langtodelete', 'alpha')) {
|
||||||
if ($action == 'vedit' && $cancel != $langs->trans("Cancel") && ($user->rights->produit->creer || $user->rights->service->creer)) {
|
$object = new Product($db);
|
||||||
$object = new Product($db);
|
$object->fetch($id);
|
||||||
$object->fetch($id);
|
$object->delMultiLangs(GETPOST('langtodelete', 'alpha'), $user);
|
||||||
$current_lang = $langs->getDefaultLang();
|
setEventMessages($langs->trans("RecordDeleted"), null, 'mesgs');
|
||||||
|
$action = '';
|
||||||
|
}
|
||||||
|
|
||||||
foreach ($object->multilangs as $key => $value) { // enregistrement des nouvelles valeurs dans l'objet
|
// Add translation
|
||||||
if ($key == $current_lang) {
|
if ($action == 'vadd' && $cancel != $langs->trans("Cancel") && ($user->rights->produit->creer || $user->rights->service->creer)) {
|
||||||
$object->label = GETPOST("libelle-".$key);
|
$object = new Product($db);
|
||||||
$object->description = dol_htmlcleanlastbr(GETPOST("desc-".$key, 'restricthtml'));
|
$object->fetch($id);
|
||||||
$object->other = dol_htmlcleanlastbr(GETPOST("other-".$key, 'restricthtml'));
|
$current_lang = $langs->getDefaultLang();
|
||||||
|
|
||||||
|
// update de l'objet
|
||||||
|
if (GETPOST("forcelangprod") == $current_lang) {
|
||||||
|
$object->label = GETPOST("libelle");
|
||||||
|
$object->description = dol_htmlcleanlastbr(GETPOST("desc", 'restricthtml'));
|
||||||
|
$object->other = dol_htmlcleanlastbr(GETPOST("other", 'restricthtml'));
|
||||||
|
|
||||||
|
$object->update($object->id, $user);
|
||||||
} else {
|
} else {
|
||||||
$object->multilangs[$key]["label"] = GETPOST("libelle-".$key);
|
$object->multilangs[GETPOST("forcelangprod")]["label"] = GETPOST("libelle");
|
||||||
$object->multilangs[$key]["description"] = dol_htmlcleanlastbr(GETPOST("desc-".$key, 'restricthtml'));
|
$object->multilangs[GETPOST("forcelangprod")]["description"] = dol_htmlcleanlastbr(GETPOST("desc", 'restricthtml'));
|
||||||
$object->multilangs[$key]["other"] = dol_htmlcleanlastbr(GETPOST("other-".$key, 'restricthtml'));
|
$object->multilangs[GETPOST("forcelangprod")]["other"] = dol_htmlcleanlastbr(GETPOST("other", 'restricthtml'));
|
||||||
|
}
|
||||||
|
|
||||||
|
// save in database
|
||||||
|
if (GETPOST("forcelangprod")) {
|
||||||
|
$result = $object->setMultiLangs($user);
|
||||||
|
} else {
|
||||||
|
$object->error = $langs->trans("ErrorFieldRequired", $langs->transnoentitiesnoconv("Language"));
|
||||||
|
$result = -1;
|
||||||
|
}
|
||||||
|
|
||||||
|
if ($result > 0) {
|
||||||
|
$action = '';
|
||||||
|
} else {
|
||||||
|
$action = 'add';
|
||||||
|
setEventMessages($object->error, $object->errors, 'errors');
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
$result = $object->setMultiLangs($user);
|
// Edit translation
|
||||||
if ($result > 0) {
|
if ($action == 'vedit' && $cancel != $langs->trans("Cancel") && ($user->rights->produit->creer || $user->rights->service->creer)) {
|
||||||
$action = '';
|
$object = new Product($db);
|
||||||
} else {
|
$object->fetch($id);
|
||||||
$action = 'edit';
|
$current_lang = $langs->getDefaultLang();
|
||||||
setEventMessages($object->error, $object->errors, 'errors');
|
|
||||||
|
foreach ($object->multilangs as $key => $value) { // enregistrement des nouvelles valeurs dans l'objet
|
||||||
|
if ($key == $current_lang) {
|
||||||
|
$object->label = GETPOST("libelle-" . $key);
|
||||||
|
$object->description = dol_htmlcleanlastbr(GETPOST("desc-" . $key, 'restricthtml'));
|
||||||
|
$object->other = dol_htmlcleanlastbr(GETPOST("other-" . $key, 'restricthtml'));
|
||||||
|
} else {
|
||||||
|
$object->multilangs[$key]["label"] = GETPOST("libelle-" . $key);
|
||||||
|
$object->multilangs[$key]["description"] = dol_htmlcleanlastbr(GETPOST("desc-" . $key, 'restricthtml'));
|
||||||
|
$object->multilangs[$key]["other"] = dol_htmlcleanlastbr(GETPOST("other-" . $key, 'restricthtml'));
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
$result = $object->setMultiLangs($user);
|
||||||
|
if ($result > 0) {
|
||||||
|
$action = '';
|
||||||
|
} else {
|
||||||
|
$action = 'edit';
|
||||||
|
setEventMessages($object->error, $object->errors, 'errors');
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
|
||||||
|
|
||||||
// Delete translation
|
// Delete translation
|
||||||
if ($action == 'vdelete' && $cancel != $langs->trans("Cancel") && ($user->rights->produit->creer || $user->rights->service->creer)) {
|
if ($action == 'vdelete' && $cancel != $langs->trans("Cancel") && ($user->rights->produit->creer || $user->rights->service->creer)) {
|
||||||
$object = new Product($db);
|
$object = new Product($db);
|
||||||
$object->fetch($id);
|
$object->fetch($id);
|
||||||
$langtodelete = GETPOST('langdel', 'alpha');
|
$langtodelete = GETPOST('langdel', 'alpha');
|
||||||
|
|
||||||
$result = $object->delMultiLangs($langtodelete, $user);
|
$result = $object->delMultiLangs($langtodelete, $user);
|
||||||
if ($result > 0) {
|
if ($result > 0) {
|
||||||
$action = '';
|
$action = '';
|
||||||
} else {
|
} else {
|
||||||
$action = 'edit';
|
$action = 'edit';
|
||||||
setEventMessages($object->error, $object->errors, 'errors');
|
setEventMessages($object->error, $object->errors, 'errors');
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -216,11 +226,15 @@ print dol_get_fiche_end();
|
|||||||
*/
|
*/
|
||||||
print "\n".'<div class="tabsAction">'."\n";
|
print "\n".'<div class="tabsAction">'."\n";
|
||||||
|
|
||||||
if ($action == '') {
|
$parameters = array();
|
||||||
if ($user->rights->produit->creer || $user->rights->service->creer) {
|
$reshook = $hookmanager->executeHooks('addMoreActionsButtons', $parameters, $object, $action); // Note that $action and $object may have been
|
||||||
print '<a class="butAction" href="'.DOL_URL_ROOT.'/product/traduction.php?action=add&id='.$object->id.'">'.$langs->trans("Add").'</a>';
|
if (empty($reshook)) {
|
||||||
if ($cnt_trans > 0) {
|
if ($action == '') {
|
||||||
print '<a class="butAction" href="'.DOL_URL_ROOT.'/product/traduction.php?action=edit&id='.$object->id.'">'.$langs->trans("Update").'</a>';
|
if ($user->rights->produit->creer || $user->rights->service->creer) {
|
||||||
|
print '<a class="butAction" href="' . DOL_URL_ROOT . '/product/traduction.php?action=add&id=' . $object->id . '">' . $langs->trans("Add") . '</a>';
|
||||||
|
if ($cnt_trans > 0) {
|
||||||
|
print '<a class="butAction" href="' . DOL_URL_ROOT . '/product/traduction.php?action=edit&id=' . $object->id . '">' . $langs->trans("Update") . '</a>';
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -263,6 +277,9 @@ if ($action == 'edit') {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
$parameters = array();
|
||||||
|
$reshook = $hookmanager->executeHooks('formObjectOptions', $parameters, $object, $action); // Note that $action and $object may have been modified by hook
|
||||||
|
|
||||||
print '<br>';
|
print '<br>';
|
||||||
|
|
||||||
print '<div class="center">';
|
print '<div class="center">';
|
||||||
@ -334,6 +351,9 @@ if ($action == 'add' && ($user->rights->produit->creer || $user->rights->service
|
|||||||
}
|
}
|
||||||
print '</table>';
|
print '</table>';
|
||||||
|
|
||||||
|
$parameters = array();
|
||||||
|
$reshook = $hookmanager->executeHooks('formObjectOptions', $parameters, $object, $action); // Note that $action and $object may have been modified by hook
|
||||||
|
|
||||||
print dol_get_fiche_end();
|
print dol_get_fiche_end();
|
||||||
|
|
||||||
print '<div class="center">';
|
print '<div class="center">';
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user