Merge branch 'develop' of git@github.com:Dolibarr/dolibarr.git into develop
This commit is contained in:
commit
3728cca2f3
@ -602,7 +602,7 @@ if ($user->rights->societe->creer) {
|
||||
if ($user->rights->adherent->creer && $user->rights->user->user->creer) {
|
||||
$arrayofmassactions['createexternaluser'] = img_picto('', 'user', 'class="pictofixedwidth"').$langs->trans("CreateExternalUser");
|
||||
}
|
||||
if (in_array($massaction, array('presend', 'predelete','preaffecttag'))) {
|
||||
if (in_array($massaction, array('presend', 'predelete', 'preaffecttag'))) {
|
||||
$arrayofmassactions = array();
|
||||
}
|
||||
$massactionbutton = $form->selectMassAction('', $arrayofmassactions);
|
||||
|
||||
@ -209,7 +209,7 @@ if ($user->rights->adherent->cotisation->creer && $action == 'subscription' && !
|
||||
// Subscription informations
|
||||
$datesubscription = 0;
|
||||
$datesubend = 0;
|
||||
$paymentdate = ''; // Do not use 0 here, default value is '' that means not filled where 0 means 1970-01-01
|
||||
$paymentdate = ''; // Do not use 0 here, default value is '' that means not filled where 0 means 1970-01-01
|
||||
if (GETPOST("reyear", "int") && GETPOST("remonth", "int") && GETPOST("reday", "int")) {
|
||||
$datesubscription = dol_mktime(0, 0, 0, GETPOST("remonth", "int"), GETPOST("reday", "int"), GETPOST("reyear", "int"));
|
||||
}
|
||||
|
||||
@ -41,8 +41,7 @@ if (!$user->admin) {
|
||||
$langs->loadLangs(array('agenda', 'admin', 'other'));
|
||||
|
||||
$def = array();
|
||||
$actiontest = GETPOST('test', 'alpha');
|
||||
$actionsave = GETPOST('save', 'alpha');
|
||||
$action = GETPOST('action', 'alpha');
|
||||
|
||||
if (empty($conf->global->AGENDA_EXT_NB)) {
|
||||
$conf->global->AGENDA_EXT_NB = 5;
|
||||
@ -57,14 +56,57 @@ $colorlist = array('BECEDD', 'DDBECE', 'BFDDBE', 'F598B4', 'F68654', 'CBF654', '
|
||||
* Actions
|
||||
*/
|
||||
|
||||
if ($actionsave) {
|
||||
$error = 0;
|
||||
$errors = array();
|
||||
|
||||
if (preg_match('/set_(.*)/', $action, $reg)) {
|
||||
$db->begin();
|
||||
|
||||
$code = $reg[1];
|
||||
$value = (GETPOST($code) ? GETPOST($code) : 1);
|
||||
|
||||
$res = dolibarr_set_const($db, $code, $value, 'chaine', 0, '', $conf->entity);
|
||||
if (!$res > 0) {
|
||||
$error++;
|
||||
$errors[] = $db->lasterror();
|
||||
}
|
||||
|
||||
if ($error) {
|
||||
$db->rollback();
|
||||
setEventMessages('', $errors, 'errors');
|
||||
} else {
|
||||
$db->commit();
|
||||
setEventMessage($langs->trans('SetupSaved'));
|
||||
header('Location: ' . $_SERVER["PHP_SELF"]);
|
||||
exit();
|
||||
}
|
||||
} elseif (preg_match('/del_(.*)/', $action, $reg)) {
|
||||
$db->begin();
|
||||
|
||||
$code = $reg[1];
|
||||
|
||||
$res = dolibarr_del_const($db, $code, $conf->entity);
|
||||
if (!$res > 0) {
|
||||
$error++;
|
||||
$errors[] = $db->lasterror();
|
||||
}
|
||||
|
||||
if ($error) {
|
||||
$db->rollback();
|
||||
setEventMessages('', $errors, 'errors');
|
||||
} else {
|
||||
$db->commit();
|
||||
setEventMessage($langs->trans('SetupSaved'));
|
||||
header('Location: ' . $_SERVER["PHP_SELF"]);
|
||||
exit();
|
||||
}
|
||||
} elseif ($action == 'save') {
|
||||
$db->begin();
|
||||
|
||||
$disableext = GETPOST('AGENDA_DISABLE_EXT', 'alpha');
|
||||
$res = dolibarr_set_const($db, 'AGENDA_DISABLE_EXT', $disableext, 'chaine', 0, '', $conf->entity);
|
||||
|
||||
$i = 1; $errorsaved = 0;
|
||||
$error = 0;
|
||||
|
||||
// Save agendas
|
||||
while ($i <= $MAXAGENDA) {
|
||||
@ -159,6 +201,10 @@ print dol_get_fiche_head($head, 'extsites', $langs->trans("Agenda"), -1, 'action
|
||||
print '<span class="opacitymedium">'.$langs->trans("AgendaExtSitesDesc")."</span><br>\n";
|
||||
print "<br>\n";
|
||||
|
||||
|
||||
$selectedvalue=$conf->global->AGENDA_DISABLE_EXT;
|
||||
if ($selectedvalue==1) $selectedvalue=0; else $selectedvalue=1;
|
||||
|
||||
print "<table class=\"noborder\" width=\"100%\">";
|
||||
|
||||
print "<tr class=\"liste_titre\">";
|
||||
@ -203,31 +249,44 @@ print "<td>".$langs->trans("Name")."</td>";
|
||||
print "<td>".$langs->trans("ExtSiteUrlAgenda")." (".$langs->trans("Example").': http://yoursite/agenda/agenda.ics)</td>';
|
||||
print "<td>".$form->textwithpicto($langs->trans("FixTZ"), $langs->trans("FillFixTZOnlyIfRequired"), 1).'</td>';
|
||||
print '<td class="right">'.$langs->trans("Color").'</td>';
|
||||
print '<td class="right">'.$langs->trans("ActiveByDefault").'</td>';
|
||||
print "</tr>";
|
||||
|
||||
$i = 1;
|
||||
while ($i <= $MAXAGENDA) {
|
||||
$key = $i;
|
||||
$name = 'AGENDA_EXT_NAME'.$key;
|
||||
$src = 'AGENDA_EXT_SRC'.$key;
|
||||
$offsettz = 'AGENDA_EXT_OFFSETTZ'.$key;
|
||||
$color = 'AGENDA_EXT_COLOR'.$key;
|
||||
$enabled = 'AGENDA_EXT_ENABLED'.$key;
|
||||
|
||||
$name = 'AGENDA_EXT_NAME' . $key;
|
||||
$src = 'AGENDA_EXT_SRC' . $key;
|
||||
$offsettz = 'AGENDA_EXT_OFFSETTZ' . $key;
|
||||
$color = 'AGENDA_EXT_COLOR' . $key;
|
||||
$enabled = 'AGENDA_EXT_ENABLED' . $key;
|
||||
$default = 'AGENDA_EXT_ACTIVEBYDEFAULT' . $key;
|
||||
|
||||
print '<tr class="oddeven">';
|
||||
// Nb
|
||||
print '<td width="180" class="nowrap">'.$langs->trans("AgendaExtNb", $key)."</td>";
|
||||
print '<td width="180" class="nowrap">' . $langs->trans("AgendaExtNb", $key) . "</td>";
|
||||
// Name
|
||||
print '<td><input type="text" class="flat hideifnotset" name="AGENDA_EXT_NAME'.$key.'" value="'.(GETPOST('AGENDA_EXT_NAME'.$key) ?GETPOST('AGENDA_EXT_NAME'.$key, 'alpha') : getDolGlobalString($name)).'" size="28"></td>';
|
||||
print '<td><input type="text" class="flat hideifnotset" name="AGENDA_EXT_NAME' . $key . '" value="' . (GETPOST('AGENDA_EXT_NAME' . $key) ? GETPOST('AGENDA_EXT_NAME' . $key, 'alpha') : getDolGlobalString($name)) . '" size="28"></td>';
|
||||
// URL
|
||||
print '<td><input type="url" class="flat hideifnotset" name="AGENDA_EXT_SRC'.$key.'" value="'.(GETPOST('AGENDA_EXT_SRC'.$key) ?GETPOST('AGENDA_EXT_SRC'.$key, 'alpha') : getDolGlobalString($src)).'" size="60"></td>';
|
||||
print '<td><input type="url" class="flat hideifnotset" name="AGENDA_EXT_SRC' . $key . '" value="' . (GETPOST('AGENDA_EXT_SRC' . $key) ? GETPOST('AGENDA_EXT_SRC' . $key, 'alpha') : getDolGlobalString($src)) . '" size="60"></td>';
|
||||
// Offset TZ
|
||||
print '<td><input type="text" class="flat hideifnotset" name="AGENDA_EXT_OFFSETTZ'.$key.'" value="'.(GETPOST('AGENDA_EXT_OFFSETTZ'.$key) ? GETPOST('AGENDA_EXT_OFFSETTZ'.$key) : getDolGlobalString($offsettz)).'" size="2"></td>';
|
||||
print '<td><input type="text" class="flat hideifnotset" name="AGENDA_EXT_OFFSETTZ' . $key . '" value="' . (GETPOST('AGENDA_EXT_OFFSETTZ' . $key) ? GETPOST('AGENDA_EXT_OFFSETTZ' . $key) : getDolGlobalString($offsettz)) . '" size="2"></td>';
|
||||
// Color (Possible colors are limited by Google)
|
||||
print '<td class="nowrap right">';
|
||||
//print $formadmin->selectColor($conf->global->$color, "google_agenda_color".$key, $colorlist);
|
||||
print $formother->selectColor((GETPOST("AGENDA_EXT_COLOR".$key) ?GETPOST("AGENDA_EXT_COLOR".$key) : getDolGlobalString($color)), "AGENDA_EXT_COLOR".$key, 'extsitesconfig', 1, '', 'hideifnotset');
|
||||
print $formother->selectColor((GETPOST("AGENDA_EXT_COLOR" . $key) ? GETPOST("AGENDA_EXT_COLOR" . $key) : getDolGlobalString($color)), "AGENDA_EXT_COLOR" . $key, 'extsitesconfig', 1, '', 'hideifnotset');
|
||||
print '</td>';
|
||||
// Calendar active by default
|
||||
print '<td class="nowrap right">';
|
||||
if ($conf->use_javascript_ajax) {
|
||||
print ajax_constantonoff('AGENDA_EXT_ACTIVEBYDEFAULT' . $key);
|
||||
} else {
|
||||
if (empty($conf->global->{$default})) {
|
||||
print '<a href="' . $_SERVER['PHP_SELF'] . '?action=set_AGENDA_EXT_ACTIVEBYDEFAULT' . $key . '">' . img_picto($langs->trans("Enabled"), 'on') . '</a>';
|
||||
} else {
|
||||
print '<a href="' . $_SERVER['PHP_SELF'] . '?action=del_AGENDA_EXT_ACTIVEBYDEFAULT' . $key . '">' . img_picto($langs->trans("Disabled"), 'off') . '</a>';
|
||||
}
|
||||
}
|
||||
print '</td>';
|
||||
print "</tr>";
|
||||
$i++;
|
||||
|
||||
@ -52,27 +52,57 @@ if ($cancel) {
|
||||
}
|
||||
|
||||
if ($action == 'update') {
|
||||
if (GETPOSTISSET('MAIN_PDF_FORMAT')) 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);
|
||||
}
|
||||
|
||||
if (GETPOSTISSET('MAIN_PDF_MARGIN_LEFT')) dolibarr_set_const($db, "MAIN_PDF_MARGIN_LEFT", GETPOST("MAIN_PDF_MARGIN_LEFT"), '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);
|
||||
if (GETPOSTISSET('MAIN_PDF_MARGIN_BOTTOM')) dolibarr_set_const($db, "MAIN_PDF_MARGIN_BOTTOM", GETPOST("MAIN_PDF_MARGIN_BOTTOM"), '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);
|
||||
}
|
||||
if (GETPOSTISSET('MAIN_PDF_MARGIN_RIGHT')) {
|
||||
dolibarr_set_const($db, "MAIN_PDF_MARGIN_RIGHT", GETPOST("MAIN_PDF_MARGIN_TOP"), '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);
|
||||
}
|
||||
|
||||
if (GETPOSTISSET('MAIN_PROFID1_IN_ADDRESS')) dolibarr_set_const($db, "MAIN_PROFID1_IN_ADDRESS", GETPOST("MAIN_PROFID1_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);
|
||||
if (GETPOSTISSET('MAIN_PROFID3_IN_ADDRESS')) dolibarr_set_const($db, "MAIN_PROFID3_IN_ADDRESS", GETPOST("MAIN_PROFID3_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);
|
||||
if (GETPOSTISSET('MAIN_PROFID5_IN_ADDRESS')) dolibarr_set_const($db, "MAIN_PROFID5_IN_ADDRESS", GETPOST("MAIN_PROFID5_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);
|
||||
if (GETPOSTISSET('MAIN_PROFID1_IN_ADDRESS')) {
|
||||
dolibarr_set_const($db, "MAIN_PROFID1_IN_ADDRESS", GETPOST("MAIN_PROFID1_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);
|
||||
}
|
||||
if (GETPOSTISSET('MAIN_PROFID3_IN_ADDRESS')) {
|
||||
dolibarr_set_const($db, "MAIN_PROFID3_IN_ADDRESS", GETPOST("MAIN_PROFID3_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);
|
||||
}
|
||||
if (GETPOSTISSET('MAIN_PROFID5_IN_ADDRESS')) {
|
||||
dolibarr_set_const($db, "MAIN_PROFID5_IN_ADDRESS", GETPOST("MAIN_PROFID5_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);
|
||||
}
|
||||
|
||||
if (GETPOSTISSET('MAIN_PDF_NO_SENDER_FRAME')) dolibarr_set_const($db, "MAIN_PDF_NO_SENDER_FRAME", GETPOST("MAIN_PDF_NO_SENDER_FRAME"), 'chaine', 0, '', $conf->entity);
|
||||
if (GETPOSTISSET('MAIN_PDF_NO_RECIPENT_FRAME')) dolibarr_set_const($db, "MAIN_PDF_NO_RECIPENT_FRAME", GETPOST("MAIN_PDF_NO_RECIPENT_FRAME"), 'chaine', 0, '', $conf->entity);
|
||||
if (GETPOSTISSET('MAIN_PDF_NO_SENDER_FRAME')) {
|
||||
dolibarr_set_const($db, "MAIN_PDF_NO_SENDER_FRAME", GETPOST("MAIN_PDF_NO_SENDER_FRAME"), 'chaine', 0, '', $conf->entity);
|
||||
}
|
||||
if (GETPOSTISSET('MAIN_PDF_NO_RECIPENT_FRAME')) {
|
||||
dolibarr_set_const($db, "MAIN_PDF_NO_RECIPENT_FRAME", GETPOST("MAIN_PDF_NO_RECIPENT_FRAME"), 'chaine', 0, '', $conf->entity);
|
||||
}
|
||||
|
||||
if (GETPOSTISSET('MAIN_PDF_HIDE_SENDER_NAME')) dolibarr_set_const($db, "MAIN_PDF_HIDE_SENDER_NAME", GETPOST("MAIN_PDF_HIDE_SENDER_NAME"), 'chaine', 0, '', $conf->entity);
|
||||
if (GETPOSTISSET('MAIN_PDF_HIDE_SENDER_NAME')) {
|
||||
dolibarr_set_const($db, "MAIN_PDF_HIDE_SENDER_NAME", GETPOST("MAIN_PDF_HIDE_SENDER_NAME"), '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);
|
||||
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);
|
||||
}
|
||||
|
||||
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 (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 (GETPOST('PDF_SHOW_PROJECT_REF_OR_LABEL') == 'no') {
|
||||
@ -87,24 +117,50 @@ if ($action == 'update') {
|
||||
}
|
||||
}
|
||||
|
||||
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);
|
||||
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);
|
||||
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);
|
||||
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);
|
||||
}
|
||||
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);
|
||||
}
|
||||
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);
|
||||
}
|
||||
|
||||
if (GETPOSTISSET('MAIN_DOCUMENTS_LOGO_HEIGHT')) dolibarr_set_const($db, "MAIN_DOCUMENTS_LOGO_HEIGHT", GETPOST("MAIN_DOCUMENTS_LOGO_HEIGHT", 'int'), '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);
|
||||
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);
|
||||
if (GETPOSTISSET('MAIN_PDF_NO_CUSTOMER_CODE')) dolibarr_set_const($db, "MAIN_PDF_NO_CUSTOMER_CODE", GETPOST("MAIN_PDF_NO_CUSTOMER_CODE"), '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);
|
||||
}
|
||||
if (GETPOSTISSET('MAIN_INVERT_SENDER_RECIPIENT')) {
|
||||
dolibarr_set_const($db, "MAIN_INVERT_SENDER_RECIPIENT", GETPOST("MAIN_INVERT_SENDER_RECIPIENT"), '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);
|
||||
}
|
||||
if (GETPOSTISSET('MAIN_PDF_NO_CUSTOMER_CODE')) {
|
||||
dolibarr_set_const($db, "MAIN_PDF_NO_CUSTOMER_CODE", GETPOST("MAIN_PDF_NO_CUSTOMER_CODE"), '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);
|
||||
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);
|
||||
}
|
||||
|
||||
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);
|
||||
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);
|
||||
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);
|
||||
}
|
||||
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);
|
||||
}
|
||||
|
||||
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);
|
||||
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);
|
||||
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);
|
||||
}
|
||||
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);
|
||||
}
|
||||
|
||||
if (GETPOSTISSET('PDF_SHOW_LINK_TO_ONLINE_PAYMENT')) dolibarr_set_const($db, "PDF_SHOW_LINK_TO_ONLINE_PAYMENT", GETPOST('PDF_SHOW_LINK_TO_ONLINE_PAYMENT', 'alpha'), 'chaine', 0, '', $conf->entity);
|
||||
if (GETPOSTISSET('PDF_SHOW_LINK_TO_ONLINE_PAYMENT')) {
|
||||
dolibarr_set_const($db, "PDF_SHOW_LINK_TO_ONLINE_PAYMENT", GETPOST('PDF_SHOW_LINK_TO_ONLINE_PAYMENT', 'alpha'), 'chaine', 0, '', $conf->entity);
|
||||
}
|
||||
|
||||
setEventMessages($langs->trans("SetupSaved"), null, 'mesgs');
|
||||
|
||||
|
||||
@ -265,6 +265,7 @@ if (empty($conf->global->AGENDA_DISABLE_EXT)) {
|
||||
$name = 'AGENDA_EXT_NAME'.$i;
|
||||
$offsettz = 'AGENDA_EXT_OFFSETTZ'.$i;
|
||||
$color = 'AGENDA_EXT_COLOR'.$i;
|
||||
$default = 'AGENDA_EXT_ACTIVEBYDEFAULT'.$i;
|
||||
$buggedfile = 'AGENDA_EXT_BUGGEDFILE'.$i;
|
||||
if (!empty($conf->global->$source) && !empty($conf->global->$name)) {
|
||||
// Note: $conf->global->buggedfile can be empty or 'uselocalandtznodaylight' or 'uselocalandtzdaylight'
|
||||
@ -273,6 +274,7 @@ if (empty($conf->global->AGENDA_DISABLE_EXT)) {
|
||||
'name'=>$conf->global->$name,
|
||||
'offsettz' => (!empty($conf->global->$offsettz) ? $conf->global->$offsettz : 0),
|
||||
'color'=>$conf->global->$color,
|
||||
'default'=>$conf->global->$default,
|
||||
'buggedfile'=>(isset($conf->global->buggedfile) ? $conf->global->buggedfile : 0)
|
||||
);
|
||||
}
|
||||
@ -288,6 +290,7 @@ if (empty($user->conf->AGENDA_DISABLE_EXT)) {
|
||||
$offsettz = 'AGENDA_EXT_OFFSETTZ_'.$user->id.'_'.$i;
|
||||
$color = 'AGENDA_EXT_COLOR_'.$user->id.'_'.$i;
|
||||
$enabled = 'AGENDA_EXT_ENABLED_'.$user->id.'_'.$i;
|
||||
$default = 'AGENDA_EXT_ACTIVEBYDEFAULT_'.$user->id.'_'.$i;
|
||||
$buggedfile = 'AGENDA_EXT_BUGGEDFILE_'.$user->id.'_'.$i;
|
||||
if (!empty($user->conf->$source) && !empty($user->conf->$name)) {
|
||||
// Note: $conf->global->buggedfile can be empty or 'uselocalandtznodaylight' or 'uselocalandtzdaylight'
|
||||
@ -296,6 +299,7 @@ if (empty($user->conf->AGENDA_DISABLE_EXT)) {
|
||||
'name'=>$user->conf->$name,
|
||||
'offsettz' => (!empty($user->conf->$offsettz) ? $user->conf->$offsettz : 0),
|
||||
'color'=>$user->conf->$color,
|
||||
'default'=>$user->conf->$default,
|
||||
'buggedfile'=>(isset($user->conf->buggedfile) ? $user->conf->buggedfile : 0)
|
||||
);
|
||||
}
|
||||
@ -576,6 +580,15 @@ if (!empty($conf->use_javascript_ajax)) { // If javascript on
|
||||
if (is_array($showextcals) && count($showextcals) > 0) {
|
||||
$s .= '<script type="text/javascript">'."\n";
|
||||
$s .= 'jQuery(document).ready(function () {
|
||||
jQuery("div input[name^=\"check_ext\"]").each(function(index, elem) {
|
||||
var name = jQuery(elem).attr("name");
|
||||
if (jQuery(elem).is(":checked")) {
|
||||
jQuery(".family_ext" + name.replace("check_ext", "")).show();
|
||||
} else {
|
||||
jQuery(".family_ext" + name.replace("check_ext", "")).hide();
|
||||
}
|
||||
});
|
||||
|
||||
jQuery("div input[name^=\"check_ext\"]").click(function() {
|
||||
var name = $(this).attr("name");
|
||||
jQuery(".family_ext" + name.replace("check_ext", "")).toggle();
|
||||
@ -585,7 +598,14 @@ if (!empty($conf->use_javascript_ajax)) { // If javascript on
|
||||
|
||||
foreach ($showextcals as $val) {
|
||||
$htmlname = md5($val['name']);
|
||||
$s .= '<div class="nowrap inline-block"><input type="checkbox" id="check_ext'.$htmlname.'" name="check_ext'.$htmlname.'" checked> <label for="check_ext'.$htmlname.'">'.$val['name'].'</label> </div>';
|
||||
|
||||
if (!empty($val['default'])) {
|
||||
$default = "checked";
|
||||
} else {
|
||||
$default = '';
|
||||
}
|
||||
|
||||
$s .= '<div class="nowrap inline-block"><input type="checkbox" id="check_ext'.$htmlname.'" name="check_ext'.$htmlname.'" '.$default.'> <label for="check_ext'.$htmlname.'">'.$val['name'].'</label> </div>';
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@ -1737,7 +1737,7 @@ class Facture extends CommonInvoice
|
||||
} else {
|
||||
$this->error = 'Invoice with id='.$rowid.' or ref='.$ref.' or ref_ext='.$ref_ext.' not found';
|
||||
|
||||
dol_syslog(__METHOD__ . $this->error, LOG_WARNING);
|
||||
dol_syslog(__METHOD__.$this->error, LOG_WARNING);
|
||||
return 0;
|
||||
}
|
||||
} else {
|
||||
|
||||
@ -1143,7 +1143,7 @@ class pdf_sponge extends ModelePDFFactures
|
||||
$lib_condition_paiement = str_replace('\n', "\n", $lib_condition_paiement);
|
||||
$pdf->MultiCell(67, 4, $lib_condition_paiement, 0, 'L');
|
||||
|
||||
$posy = $pdf->GetY() + 3; // We need spaces for 2 lines payment conditions
|
||||
$posy = $pdf->GetY() + 3; // We need spaces for 2 lines payment conditions
|
||||
}
|
||||
|
||||
if ($object->type != 2) {
|
||||
@ -2151,7 +2151,7 @@ class pdf_sponge extends ModelePDFFactures
|
||||
|
||||
$carac_client_name = pdfBuildThirdpartyName($thirdparty, $outputlangs);
|
||||
|
||||
$mode = 'target';
|
||||
$mode = 'target';
|
||||
$carac_client = pdf_build_address($outputlangs, $this->emetteur, $object->thirdparty, ($usecontact ? $object->contact : ''), $usecontact, $mode, $object);
|
||||
|
||||
// Show recipient
|
||||
|
||||
@ -169,4 +169,5 @@ TimeType=Duration type
|
||||
ReminderType=Callback type
|
||||
AddReminder=Create an automatic reminder notification for this event
|
||||
ErrorReminderActionCommCreation=Error creating the reminder notification for this event
|
||||
BrowserPush=Browser Popup Notification
|
||||
BrowserPush=Browser Popup Notification
|
||||
ActiveByDefault=Enabled by default
|
||||
|
||||
@ -170,3 +170,4 @@ ReminderType=Type de rappel
|
||||
AddReminder=Créer une notification de rappel automatique pour cet événement
|
||||
ErrorReminderActionCommCreation=Erreur lors de la création de la notification de rappel pour cet événement
|
||||
BrowserPush=Notification par Popup navigateur
|
||||
ActiveByDefault=Activation par défaut
|
||||
|
||||
@ -257,7 +257,7 @@ if ($object->id > 0 && (empty($action) || ($action != 'edit' && $action != 'crea
|
||||
print '<table class="border centpercent tableforfield">'."\n";
|
||||
|
||||
// Common attributes
|
||||
unset($object->fields['fk_soc']); // Hide field already shown in banner
|
||||
unset($object->fields['fk_soc']); // Hide field already shown in banner
|
||||
include DOL_DOCUMENT_ROOT.'/core/tpl/commonfields_view.tpl.php';
|
||||
$forcefieldid = 'socid';
|
||||
$forceobjectid = $object->fk_soc;
|
||||
|
||||
Loading…
Reference in New Issue
Block a user