';
if ($row[0] == 'tobind') {
- print $langs->trans("Unknown");
+ print ''.$langs->trans("Unknown").' ';
} else {
print length_accountg($row[0]);
}
print ' ';
- print '';
+ print ' ';
if ($row[0] == 'tobind') {
print $langs->trans("UseMenuToSetBindindManualy", DOL_URL_ROOT.'/accountancy/customer/list.php?search_year='.$y, $langs->transnoentitiesnoconv("ToBind"));
} else {
@@ -344,13 +344,13 @@ print '';
print ' ';
-print_barre_liste($langs->trans("OverviewOfAmountOfLinesBound"), '', '', '', '', '', '', -1, '', '', 0, '', '', 0, 1, 1);
+print_barre_liste(img_picto('', 'link', 'class="paddingright fa-color-unset"').$langs->trans("OverviewOfAmountOfLinesBound"), '', '', '', '', '', '', -1, '', '', 0, '', '', 0, 1, 1);
//print load_fiche_titre($langs->trans("OverviewOfAmountOfLinesBound"), '', '');
print '';
print '
';
-print ''.$langs->trans("Account").' ';
-print ''.$langs->trans("Label").' ';
+print ''.$langs->trans("Account").' ';
+print ''.$langs->trans("Label").' ';
for ($i = 1; $i <= 12; $i++) {
$j = $i + ($conf->global->SOCIETE_FISCAL_MONTH_START ? $conf->global->SOCIETE_FISCAL_MONTH_START : 1) - 1;
if ($j > 12) {
@@ -404,7 +404,7 @@ if ($resql) {
}
print '';
- print '';
+ print ' ';
if ($row[0] == 'tobind') {
print $langs->trans("UseMenuToSetBindindManualy", DOL_URL_ROOT.'/accountancy/customer/list.php?search_year='.$y, $langs->transnoentitiesnoconv("ToBind"));
} else {
@@ -436,7 +436,7 @@ if ($conf->global->MAIN_FEATURES_LEVEL > 0) { // This part of code looks strange
print '';
print '
';
- print ''.$langs->trans("TotalVente").' ';
+ print ''.$langs->trans("TotalVente").' ';
for ($i = 1; $i <= 12; $i++) {
$j = $i + ($conf->global->SOCIETE_FISCAL_MONTH_START ? $conf->global->SOCIETE_FISCAL_MONTH_START : 1) - 1;
if ($j > 12) {
@@ -497,7 +497,7 @@ if ($conf->global->MAIN_FEATURES_LEVEL > 0) { // This part of code looks strange
print " \n";
print '';
print '
';
- print ''.$langs->trans("TotalMarge").' ';
+ print ''.$langs->trans("TotalMarge").' ';
for ($i = 1; $i <= 12; $i++) {
$j = $i + ($conf->global->SOCIETE_FISCAL_MONTH_START ? $conf->global->SOCIETE_FISCAL_MONTH_START : 1) - 1;
if ($j > 12) {
diff --git a/htdocs/accountancy/expensereport/index.php b/htdocs/accountancy/expensereport/index.php
index 1544976bb07..a7c926f9dab 100644
--- a/htdocs/accountancy/expensereport/index.php
+++ b/htdocs/accountancy/expensereport/index.php
@@ -149,13 +149,13 @@ $y = $year_current;
$buttonbind = ''.$langs->trans("ValidateHistory").' ';
-print_barre_liste($langs->trans("OverviewOfAmountOfLinesNotBound"), '', '', '', '', '', '', -1, '', '', 0, $buttonbind, '', 0, 1, 1);
+print_barre_liste(img_picto('', 'unlink', 'class="paddingright fa-color-unset"').$langs->trans("OverviewOfAmountOfLinesNotBound"), '', '', '', '', '', '', -1, '', '', 0, $buttonbind, '', 0, 1, 1);
//print load_fiche_titre($langs->trans("OverviewOfAmountOfLinesNotBound"), $buttonbind, '');
print '';
print '
';
-print ''.$langs->trans("Account").' ';
-print ''.$langs->trans("Label").' ';
+print ''.$langs->trans("Account").' ';
+print ''.$langs->trans("Label").' ';
for ($i = 1; $i <= 12; $i++) {
$j = $i + ($conf->global->SOCIETE_FISCAL_MONTH_START ? $conf->global->SOCIETE_FISCAL_MONTH_START : 1) - 1;
if ($j > 12) {
@@ -197,12 +197,12 @@ if ($resql) {
while ($row = $db->fetch_row($resql)) {
print '';
if ($row[0] == 'tobind') {
- print $langs->trans("Unknown");
+ print ''.$langs->trans("Unknown").' ';
} else {
print length_accountg($row[0]);
}
print ' ';
- print '';
+ print ' ';
if ($row[0] == 'tobind') {
print $langs->trans("UseMenuToSetBindindManualy", DOL_URL_ROOT.'/accountancy/expensereport/list.php?search_year='.$y, $langs->transnoentitiesnoconv("ToBind"));
} else {
@@ -227,14 +227,14 @@ print '';
print ' ';
-print_barre_liste($langs->trans("OverviewOfAmountOfLinesBound"), '', '', '', '', '', '', -1, '', '', 0, '', '', 0, 1, 1);
+print_barre_liste(img_picto('', 'link', 'class="paddingright fa-color-unset"').$langs->trans("OverviewOfAmountOfLinesBound"), '', '', '', '', '', '', -1, '', '', 0, '', '', 0, 1, 1);
//print load_fiche_titre($langs->trans("OverviewOfAmountOfLinesBound"), '', '');
print '';
print '
';
-print ''.$langs->trans("Account").' ';
-print ''.$langs->trans("Label").' ';
+print ''.$langs->trans("Account").' ';
+print ''.$langs->trans("Label").' ';
for ($i = 1; $i <= 12; $i++) {
$j = $i + ($conf->global->SOCIETE_FISCAL_MONTH_START ? $conf->global->SOCIETE_FISCAL_MONTH_START : 1) - 1;
if ($j > 12) {
@@ -276,13 +276,13 @@ if ($resql) {
while ($row = $db->fetch_row($resql)) {
print '';
if ($row[0] == 'tobind') {
- print $langs->trans("Unknown");
+ print ''.$langs->trans("Unknown").' ';
} else {
print length_accountg($row[0]);
}
print ' ';
- print '';
+ print ' ';
if ($row[0] == 'tobind') {
print $langs->trans("UseMenuToSetBindindManualy", DOL_URL_ROOT.'/accountancy/expensereport/list.php?search_year='.$y, $langs->transnoentitiesnoconv("ToBind"));
} else {
@@ -314,7 +314,7 @@ if ($conf->global->MAIN_FEATURES_LEVEL > 0) { // This part of code looks strange
print '';
print '
';
- print ''.$langs->trans("Total").' ';
+ print ''.$langs->trans("Total").' ';
for ($i = 1; $i <= 12; $i++) {
$j = $i + ($conf->global->SOCIETE_FISCAL_MONTH_START ? $conf->global->SOCIETE_FISCAL_MONTH_START : 1) - 1;
if ($j > 12) {
diff --git a/htdocs/accountancy/journal/expensereportsjournal.php b/htdocs/accountancy/journal/expensereportsjournal.php
index 9633157b5b7..96ab150dd24 100644
--- a/htdocs/accountancy/journal/expensereportsjournal.php
+++ b/htdocs/accountancy/journal/expensereportsjournal.php
@@ -610,7 +610,7 @@ if (empty($action) || $action == 'view') {
$userstatic->id = $tabuser[$key]['id'];
$userstatic->name = $tabuser[$key]['name'];
print "".$userstatic->getNomUrl(0, 'user', 16).' - '.$accountingaccount->label." ";
- print ''.($mt >= 0 ? price($mt) : '')." ";
+ print ''.($mt >= 0 ? price($mt) : '')." ";
print ''.($mt < 0 ? price(-$mt) : '')." ";
print " ";
}
diff --git a/htdocs/accountancy/supplier/index.php b/htdocs/accountancy/supplier/index.php
index 1836687d042..5e409f303ea 100644
--- a/htdocs/accountancy/supplier/index.php
+++ b/htdocs/accountancy/supplier/index.php
@@ -260,13 +260,13 @@ $y = $year_current;
$buttonbind = ''.$langs->trans("ValidateHistory").' ';
-print_barre_liste($langs->trans("OverviewOfAmountOfLinesNotBound"), '', '', '', '', '', '', -1, '', '', 0, $buttonbind, '', 0, 1, 1);
+print_barre_liste(img_picto('', 'unlink', 'class="paddingright fa-color-unset"').$langs->trans("OverviewOfAmountOfLinesNotBound"), '', '', '', '', '', '', -1, '', '', 0, $buttonbind, '', 0, 1, 1);
//print load_fiche_titre($langs->trans("OverviewOfAmountOfLinesNotBound"), $buttonbind, '');
print '';
print '
';
-print ''.$langs->trans("Account").' ';
-print ''.$langs->trans("Label").' ';
+print ''.$langs->trans("Account").' ';
+print ''.$langs->trans("Label").' ';
for ($i = 1; $i <= 12; $i++) {
$j = $i + ($conf->global->SOCIETE_FISCAL_MONTH_START ? $conf->global->SOCIETE_FISCAL_MONTH_START : 1) - 1;
if ($j > 12) {
@@ -309,12 +309,12 @@ if ($resql) {
while ($row = $db->fetch_row($resql)) {
print '';
if ($row[0] == 'tobind') {
- print $langs->trans("Unknown");
+ print ''.$langs->trans("Unknown").' ';
} else {
print length_accountg($row[0]);
}
print ' ';
- print '';
+ print ' ';
if ($row[0] == 'tobind') {
print $langs->trans("UseMenuToSetBindindManualy", DOL_URL_ROOT.'/accountancy/supplier/list.php?search_year='.$y, $langs->transnoentitiesnoconv("ToBind"));
} else {
@@ -339,13 +339,13 @@ print '';
print ' ';
-print_barre_liste($langs->trans("OverviewOfAmountOfLinesBound"), '', '', '', '', '', '', -1, '', '', 0, '', '', 0, 1, 1);
+print_barre_liste(img_picto('', 'link', 'class="paddingright fa-color-unset"').$langs->trans("OverviewOfAmountOfLinesBound"), '', '', '', '', '', '', -1, '', '', 0, '', '', 0, 1, 1);
//print load_fiche_titre($langs->trans("OverviewOfAmountOfLinesBound"), '', '');
print '';
print '
';
-print ''.$langs->trans("Account").' ';
-print ''.$langs->trans("Label").' ';
+print ''.$langs->trans("Account").' ';
+print ''.$langs->trans("Label").' ';
for ($i = 1; $i <= 12; $i++) {
$j = $i + ($conf->global->SOCIETE_FISCAL_MONTH_START ? $conf->global->SOCIETE_FISCAL_MONTH_START : 1) - 1;
if ($j > 12) {
@@ -393,7 +393,7 @@ if ($resql) {
print length_accountg($row[0]);
}
print '';
- print '';
+ print ' ';
if ($row[0] == 'tobind') {
print $langs->trans("UseMenuToSetBindindManualy", DOL_URL_ROOT.'/accountancy/supplier/list.php?search_year='.$y, $langs->transnoentitiesnoconv("ToBind"));
} else {
@@ -425,7 +425,7 @@ if ($conf->global->MAIN_FEATURES_LEVEL > 0) { // This part of code looks strange
print '';
print '
';
- print ''.$langs->trans("Total").' ';
+ print ''.$langs->trans("Total").' ';
for ($i = 1; $i <= 12; $i++) {
$j = $i + ($conf->global->SOCIETE_FISCAL_MONTH_START ? $conf->global->SOCIETE_FISCAL_MONTH_START : 1) - 1;
if ($j > 12) {
diff --git a/htdocs/accountancy/supplier/list.php b/htdocs/accountancy/supplier/list.php
index c6cfd3f7c92..ffdd5b6de57 100644
--- a/htdocs/accountancy/supplier/list.php
+++ b/htdocs/accountancy/supplier/list.php
@@ -620,10 +620,12 @@ if ($result) {
}
// Level 3: Search suggested account for this thirdparty (similar code exists in page index.php to make automatic binding)
- if (!empty($objp->company_code_buy)) {
- $objp->code_buy_t = $objp->company_code_buy;
- $objp->aarowid_suggest = $objp->aarowid_thirdparty;
- $suggestedaccountingaccountfor = '';
+ if (!empty($conf->global->ACCOUNTANCY_USE_PRODUCT_ACCOUNT_ON_THIRDPARTY)) {
+ if (!empty($objp->company_code_buy)) {
+ $objp->code_buy_t = $objp->company_code_buy;
+ $objp->aarowid_suggest = $objp->aarowid_thirdparty;
+ $suggestedaccountingaccountfor = '';
+ }
}
if (!empty($objp->code_buy_p)) {
@@ -724,11 +726,13 @@ if ($result) {
$s .= $langs->trans("NotDefined");
print $form->textwithpicto($s, $shelp, 1, 'help', '', 0, 2, '', 1);
}
- print ' ';
- $s = '3. '.(($objp->type_l == 1) ? $langs->trans("ServiceForThisThirdparty") : $langs->trans("ProductForThisThirdparty")).': ';
- $shelp = '';
- $s .= ($objp->code_buy_t > 0 ? length_accountg($objp->code_buy_t) : ''.$langs->trans("NotDefined").' ');
- print $form->textwithpicto($s, $shelp, 1, 'help', '', 0, 2, '', 1);
+ if (!empty($conf->global->ACCOUNTANCY_USE_PRODUCT_ACCOUNT_ON_THIRDPARTY)) {
+ print ' ';
+ $s = '3. '.(($objp->type_l == 1) ? $langs->trans("ServiceForThisThirdparty") : $langs->trans("ProductForThisThirdparty")).': ';
+ $shelp = '';
+ $s .= ($objp->code_buy_t > 0 ? length_accountg($objp->code_buy_t) : ''.$langs->trans("NotDefined").' ');
+ print $form->textwithpicto($s, $shelp, 1, 'help', '', 0, 2, '', 1);
+ }
print '';
// Suggested accounting account
diff --git a/htdocs/adherents/admin/member.php b/htdocs/adherents/admin/member.php
index 5a589756feb..018498c2457 100644
--- a/htdocs/adherents/admin/member.php
+++ b/htdocs/adherents/admin/member.php
@@ -25,7 +25,7 @@
*/
/**
- * \file htdocs/adherents/admin/adherent.php
+ * \file htdocs/adherents/admin/member.php
* \ingroup member
* \brief Page to setup the module Foundation
*/
diff --git a/htdocs/admin/dolistore/class/dolistore.class.php b/htdocs/admin/dolistore/class/dolistore.class.php
index bfcb751f9a9..5e7a229fee3 100644
--- a/htdocs/admin/dolistore/class/dolistore.class.php
+++ b/htdocs/admin/dolistore/class/dolistore.class.php
@@ -217,15 +217,15 @@ class Dolistore
for ($i = 0; $i < $nbofcateg; $i++) {
$cat = $this->categories[$i];
if ($cat->is_root_category == 1 && $parent == 0) {
- $html .= '';
+ $html .= ' ';
$html .= self::get_categories($cat->id);
$html .= " \n";
} elseif (trim($cat->id_parent) == $parent && $cat->active == 1 && trim($cat->id_parent) != 0) { // si cat est de ce niveau
$select = ($cat->id == $this->categorie) ? ' selected' : '';
- $html .= 'description->language[$this->lang - 1])).'" ';
- $html .= '>'.$cat->name->language[$this->lang - 1].' '.$cat->nb_products_recursive.' ';
+ $html .= '>'.dol_escape_htmltag($cat->name->language[$this->lang - 1]).' '.dol_escape_htmltag($cat->nb_products_recursive).' ';
$html .= self::get_categories($cat->id);
$html .= " \n";
}
@@ -267,9 +267,9 @@ class Dolistore
// add image or default ?
if ($product->id_default_image != '') {
- $image_url = DOL_URL_ROOT.'/admin/dolistore/ajax/image.php?id_product='.$product->id.'&id_image='.$product->id_default_image;
- $images = '';
- $images .= ' ';
+ $image_url = DOL_URL_ROOT.'/admin/dolistore/ajax/image.php?id_product='.((int) $product->id).'&id_image='.((int) $product->id_default_image);
+ $images = '';
+ $images .= ' ';
} else {
$images = ' ';
}
@@ -277,11 +277,11 @@ class Dolistore
// free or pay ?
if ($product->price > 0) {
$price = ''.price(price2num($product->price, 'MT'), 0, $langs, 1, -1, -1, 'EUR').' '.$langs->trans("HT").' ';
- $download_link = ' ';
+ $download_link = ' ';
} else {
$price = ''.$langs->trans('Free').' ';
- $download_link = ' ';
- $download_link .= ' ';
+ $download_link = ' ';
+ $download_link .= ' ';
}
//checking versions
@@ -319,14 +319,14 @@ class Dolistore
//.''.$langs->trans("SeeInMarkerPlace").'
//output template
- $html .= '
- '.$newapp.$images.'
- '.$product->name->language[$this->lang - 1]
- .''.$version.'
- '.dol_print_date(dol_stringtotime($product->date_upd), 'dayhour').' - '.$langs->trans('Ref').': '.$product->reference.' - '.$langs->trans('Id').': '.$product->id.' '.$product->description_short->language[$this->lang - 1].' ';
+ $html .= '
+ '.dol_escape_htmltag($newapp.$images).'
+ '.dol_escape_htmltag($product->name->language[$this->lang - 1])
+ .''.dol_escape_htmltag($version).'
+ '.dol_print_date(dol_stringtotime($product->date_upd), 'dayhour').' - '.$langs->trans('Ref').': '.dol_escape_htmltag($product->reference).' - '.dol_escape_htmltag($langs->trans('Id')).': '.((int) $product->id).' '.dol_escape_htmltag($product->description_short->language[$this->lang - 1]).' ';
// do not load if display none
//$html .= ''.$product->description->language[$this->lang - 1].' ';
- $html .= ''.$price.' ';
+ $html .= ''.dol_escape_htmltag($price).' ';
$html .= ''.$download_link.' ';
$html .= ' ';
}
@@ -343,7 +343,7 @@ class Dolistore
public function get_previous_link($text = '<<')
{
// phpcs:enable
- return ''.$text.' ';
+ return ''.dol_escape_htmltag($text).' ';
}
// phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps
@@ -356,7 +356,7 @@ class Dolistore
public function get_next_link($text = '>>')
{
// phpcs:enable
- return ''.$text.' ';
+ return ''.dol_escape_htmltag($text).' ';
}
// phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps
diff --git a/htdocs/admin/eventorganization.php b/htdocs/admin/eventorganization.php
index 2c0c42dbb14..83144ba50e8 100644
--- a/htdocs/admin/eventorganization.php
+++ b/htdocs/admin/eventorganization.php
@@ -16,7 +16,7 @@
*/
/**
- * \file htdocs/admin/setup.php
+ * \file htdocs/admin/eventorganization.php
* \ingroup eventorganization
* \brief EventOrganization setup page.
*/
diff --git a/htdocs/admin/ihm.php b/htdocs/admin/ihm.php
index 9d8f655a608..3dcfb66031d 100644
--- a/htdocs/admin/ihm.php
+++ b/htdocs/admin/ihm.php
@@ -4,6 +4,7 @@
* Copyright (C) 2005-2017 Regis Houssin
* Copyright (C) 2016 Juanjo Menent
* Copyright (C) 2018 Ferran Marcet
+ * Copyright (C) 2021 Alexandre Spangaro
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
@@ -43,7 +44,7 @@ if (!$user->admin) {
$action = GETPOST('action', 'aZ09');
$contextpage = GETPOST('contextpage', 'aZ') ?GETPOST('contextpage', 'aZ') : 'adminihm'; // To manage different context of search
-$mode = GETPOST('mode', 'aZ09') ? GETPOST('mode', 'aZ09') : 'language'; // 'language', 'template', 'login', 'other'
+$mode = GETPOST('mode', 'aZ09') ? GETPOST('mode', 'aZ09') : 'other'; // 'template', 'dashboard', 'login', 'other'
if (!defined("MAIN_MOTD")) {
define("MAIN_MOTD", "");
@@ -96,12 +97,6 @@ if ($action == 'removebackgroundlogin' && !empty($conf->global->MAIN_LOGIN_BACKG
if ($action == 'update') {
$error = 0;
- if ($mode == 'language') {
- dolibarr_set_const($db, "MAIN_LANG_DEFAULT", GETPOST("MAIN_LANG_DEFAULT", 'aZ09'), 'chaine', 0, '', $conf->entity);
- dolibarr_set_const($db, "MAIN_IHM_PARAMS_REV", (int) $conf->global->MAIN_IHM_PARAMS_REV + 1, 'chaine', 0, '', $conf->entity);
- //dolibarr_set_const($db, "MAIN_MULTILANGS", GETPOST("MAIN_MULTILANGS"), 'chaine', 0, '', $conf->entity);
- }
-
if ($mode == 'template') {
dolibarr_set_const($db, "MAIN_THEME", GETPOST("main_theme", 'aZ09'), 'chaine', 0, '', $conf->entity);
@@ -206,7 +201,14 @@ if ($action == 'update') {
}
}
+ if ($mode == 'dashboard') {
+ dolibarr_set_const($db, "MAIN_MOTD", dol_htmlcleanlastbr(GETPOST("main_motd", 'restricthtml')), 'chaine', 0, '', $conf->entity);
+ }
+
if ($mode == 'other') {
+ dolibarr_set_const($db, "MAIN_LANG_DEFAULT", GETPOST("MAIN_LANG_DEFAULT", 'aZ09'), 'chaine', 0, '', $conf->entity);
+ dolibarr_set_const($db, "MAIN_IHM_PARAMS_REV", (int) $conf->global->MAIN_IHM_PARAMS_REV + 1, 'chaine', 0, '', $conf->entity);
+
dolibarr_set_const($db, "MAIN_SIZE_LISTE_LIMIT", GETPOST("main_size_liste_limit", 'int'), 'chaine', 0, '', $conf->entity);
dolibarr_set_const($db, "MAIN_SIZE_SHORTLIST_LIMIT", GETPOST("main_size_shortliste_limit", 'int'), 'chaine', 0, '', $conf->entity);
@@ -221,8 +223,6 @@ if ($action == 'update') {
dolibarr_set_const($db, "MAIN_BUGTRACK_ENABLELINK", GETPOST("MAIN_BUGTRACK_ENABLELINK", 'alpha'), 'chaine', 0, '', $conf->entity);
dolibarr_set_const($db, "MAIN_FIRSTNAME_NAME_POSITION", GETPOST("MAIN_FIRSTNAME_NAME_POSITION", 'aZ09'), 'chaine', 0, '', $conf->entity);
-
- dolibarr_set_const($db, "MAIN_MOTD", dol_htmlcleanlastbr(GETPOST("main_motd", 'restricthtml')), 'chaine', 0, '', $conf->entity);
}
if ($mode == 'login') {
@@ -301,10 +301,139 @@ print dol_get_fiche_head($head, $mode, '', -1, '');
clearstatcache();
-if ($mode == 'language') {
+if ($mode == 'template') {
+ // Themes and themes options
+ showSkins(null, 1);
+}
+
+if ($mode == 'dashboard') {
+ print '';
+ print '
';
+
+ // Message of the day on home page
+ $substitutionarray = getCommonSubstitutionArray($langs, 0, array('object', 'objectamount'));
+ complete_substitutions_array($substitutionarray, $langs);
+
+ print '';
+ $texthelp = $langs->trans("FollowingConstantsWillBeSubstituted") . ' ';
+ foreach ($substitutionarray as $key => $val) {
+ $texthelp .= $key . ' ';
+ }
+ print $form->textwithpicto($langs->trans("MessageOfDay"), $texthelp, 1, 'help', '', 0, 2, 'tooltipmessageofday');
+
+ print ' ';
+
+ $doleditor = new DolEditor('main_motd', (isset($conf->global->MAIN_MOTD) ? $conf->global->MAIN_MOTD : ''), '', 142, 'dolibarr_notes', 'In', false, true, true, ROWS_4, '90%');
+ $doleditor->Create();
+
+ print ' ' . "\n";
+
+ /* no more need for this option. It is now a widget already controlled by end user
+ print '' . $langs->trans('BoxstatsDisableGlobal') . ' ';
+ print ajax_constantonoff("MAIN_DISABLE_GLOBAL_BOXSTATS", array(), $conf->entity, 0, 0, 1, 0);
+ print ' ';
+ print ' ';
+ */
+
+ print '
';
+ print '
';
+
+ print ' ';
+
+ print '';
+ print '
';
+
+ print '';
+ print $langs->trans("DashboardDisableBlocks");
+ print ' ';
+ print ' ';
+
+ print '' . $langs->trans('DashboardDisableGlobal') . ' ';
+ print ajax_constantonoff("MAIN_DISABLE_GLOBAL_WORKBOARD", array(), $conf->entity, 0, 0, 1, 0, 0, 0, '_red', 'dashboard');
+ print ' ';
+ print ' ';
+
+ if (empty($conf->global->MAIN_DISABLE_GLOBAL_WORKBOARD)) {
+ // Block meteo
+ print '' . $langs->trans('MAIN_DISABLE_METEO') . ' ';
+ print ajax_constantonoff("MAIN_DISABLE_METEO", array(), $conf->entity, 0, 0, 1, 0, 0, 0, '_red', 'dashboard');
+ print ' ';
+ print ' ';
+
+ // Block agenda
+ print '' . $langs->trans('DashboardDisableBlockAgenda') . ' ';
+ print ajax_constantonoff("MAIN_DISABLE_BLOCK_AGENDA", array(), $conf->entity, 0, 0, 1, 0, 0, 0, '_red', 'dashboard');
+ print ' ';
+ print ' ';
+
+ // Block agenda
+ print '' . $langs->trans('DashboardDisableBlockProject') . ' ';
+ print ajax_constantonoff("MAIN_DISABLE_BLOCK_PROJECT", array(), $conf->entity, 0, 0, 1, 0, 0, 0, '_red', 'dashboard');
+ print ' ';
+ print ' ';
+
+ // Block customer
+ print '' . $langs->trans('DashboardDisableBlockCustomer') . ' ';
+ print ajax_constantonoff("MAIN_DISABLE_BLOCK_CUSTOMER", array(), $conf->entity, 0, 0, 1, 0, 0, 0, '_red', 'dashboard');
+ print ' ';
+ print ' ';
+
+ // Block supplier
+ print '' . $langs->trans('DashboardDisableBlockSupplier') . ' ';
+ print ajax_constantonoff("MAIN_DISABLE_BLOCK_SUPPLIER", array(), $conf->entity, 0, 0, 1, 0, 0, 0, '_red', 'dashboard');
+ print ' ';
+ print ' ';
+
+ // Block contract
+ print '' . $langs->trans('DashboardDisableBlockContract') . ' ';
+ print ajax_constantonoff("MAIN_DISABLE_BLOCK_CONTRACT", array(), $conf->entity, 0, 0, 1, 0, 0, 0, '_red', 'dashboard');
+ print ' ';
+ print ' ';
+
+ // Block ticket
+ print '' . $langs->trans('DashboardDisableBlockTicket') . ' ';
+ print ajax_constantonoff("MAIN_DISABLE_BLOCK_TICKET", array(), $conf->entity, 0, 0, 1, 0, 0, 0, '_red', 'dashboard');
+ print ' ';
+ print ' ';
+
+ // Block bank
+ print '' . $langs->trans('DashboardDisableBlockBank') . ' ';
+ print ajax_constantonoff("MAIN_DISABLE_BLOCK_BANK", array(), $conf->entity, 0, 0, 1, 0, 0, 0, '_red', 'dashboard');
+ print ' ';
+ print ' ';
+
+ // Block adherent
+ print '' . $langs->trans('DashboardDisableBlockAdherent') . ' ';
+ print ajax_constantonoff("MAIN_DISABLE_BLOCK_ADHERENT", array(), $conf->entity, 0, 0, 1, 0, 0, 0, '_red', 'dashboard');
+ print ' ';
+ print ' ';
+
+ // Block expense report
+ print '' . $langs->trans('DashboardDisableBlockExpenseReport') . ' ';
+ print ajax_constantonoff("MAIN_DISABLE_BLOCK_EXPENSEREPORT", array(), $conf->entity, 0, 0, 1, 0, 0, 0, '_red', 'dashboard');
+ print ' ';
+ print ' ';
+
+ // Block holiday
+ print '' . $langs->trans('DashboardDisableBlockHoliday') . ' ';
+ print ajax_constantonoff("MAIN_DISABLE_BLOCK_HOLIDAY", array(), $conf->entity, 0, 0, 1, 0, 0, 0, '_red', 'dashboard');
+ print ' ';
+ print ' ';
+ }
+
+ print '
' . "\n";
+ print '
';
+}
+
+if ($mode == 'other') {
print '';
print '
';
+ print '';
+ print $langs->trans("Language");
+ print ' ';
+ print ' ';
+
// Default language
print ''.$langs->trans("DefaultLanguage").' ';
print img_picto('', 'language', 'class="pictofixedwidth"');
@@ -315,32 +444,28 @@ if ($mode == 'language') {
// Multilingual GUI
print ' ' . $langs->trans("EnableMultilangInterface") . ' ';
- print ajax_constantonoff("MAIN_MULTILANGS", array(), $conf->entity, 0, 0, 1, 0);
+ print ajax_constantonoff("MAIN_MULTILANGS", array(), $conf->entity, 0, 0, 1, 0, 0, 0, '', 'language');
print ' ';
print ' ';
print '
' . "\n";
print '
';
-}
-if ($mode == 'template') {
- // Themes and themes options
- showSkins(null, 1);
-}
+ print ' ';
+ print '';
+ print ' ';
+ print '
';
+
+ print ' ';
-if ($mode == 'other') {
// Other
print '';
print '
';
- // Disable javascript and ajax
- print '' . $langs->trans("DisableJavascript") . ' ';
- print ajax_constantonoff("MAIN_DISABLE_JAVASCRIPT", array(), $conf->entity, 0, 0, 1, 0);
- print ' ' . $langs->trans("DisableJavascriptNote") . ' ';
- print ' ';
- print '';
- print ' ';
- print ' ';
+ print '';
+ print $langs->trans("Miscelaneous");
+ print ' ';
+ print ' ';
// Max size of lists
print '' . $langs->trans("DefaultMaxSizeList") . ' ';
@@ -393,7 +518,7 @@ if ($mode == 'other') {
// Hide unauthorized menus
print '' . $langs->trans("HideUnauthorizedMenu") . ' ';
//print $form->selectyesno('MAIN_MENU_HIDE_UNAUTHORIZED', isset($conf->global->MAIN_MENU_HIDE_UNAUTHORIZED) ? $conf->global->MAIN_MENU_HIDE_UNAUTHORIZED : 0, 1);
- print ajax_constantonoff("MAIN_MENU_HIDE_UNAUTHORIZED", array(), $conf->entity, 0, 0, 1, 0);
+ print ajax_constantonoff("MAIN_MENU_HIDE_UNAUTHORIZED", array(), $conf->entity, 0, 0, 1, 0, 0, 0, '', 'other');
print ' ';
print ' ';
print ' ';
@@ -401,7 +526,7 @@ if ($mode == 'other') {
// Hide unauthorized button
print '' . $langs->trans("ButtonHideUnauthorized") . ' ';
//print $form->selectyesno('MAIN_BUTTON_HIDE_UNAUTHORIZED', isset($conf->global->MAIN_BUTTON_HIDE_UNAUTHORIZED) ? $conf->global->MAIN_BUTTON_HIDE_UNAUTHORIZED : 0, 1);
- print ajax_constantonoff("MAIN_BUTTON_HIDE_UNAUTHORIZED", array(), $conf->entity, 0, 0, 1, 0);
+ print ajax_constantonoff("MAIN_BUTTON_HIDE_UNAUTHORIZED", array(), $conf->entity, 0, 0, 1, 0, 0, 0, '', 'other');
print ' ';
print ' ';
print ' ';
@@ -417,7 +542,9 @@ if ($mode == 'other') {
*/
// Show bugtrack link
- print '' . $langs->trans("ShowBugTrackLink", $langs->transnoentitiesnoconv("FindBug")) . ' ';
+ print ' ';
+ print $form->textwithpicto($langs->trans("ShowBugTrackLink", $langs->transnoentitiesnoconv("FindBug")), $langs->trans("ShowBugTrackLinkDesc"));
+ print ' ';
print ' ';
print ' ';
print ' ';
@@ -426,29 +553,20 @@ if ($mode == 'other') {
// Hide wiki link on login page
$pictohelp = ' ';
print '' . str_replace('{picto}', $pictohelp, $langs->trans("DisableLinkToHelp", '{picto}')) . ' ';
- print ajax_constantonoff("MAIN_HELP_DISABLELINK", array(), $conf->entity, 0, 0, 1, 0);
+ print ajax_constantonoff("MAIN_HELP_DISABLELINK", array(), $conf->entity, 0, 0, 1, 0, 0, 0, '', 'other');
//print $form->selectyesno('MAIN_HELP_DISABLELINK', isset($conf->global->MAIN_HELP_DISABLELINK) ? $conf->global->MAIN_HELP_DISABLELINK : 0, 1);
print ' ';
print ' ';
print ' ';
- // Message of the day on home page
- $substitutionarray = getCommonSubstitutionArray($langs, 0, array('object', 'objectamount'));
- complete_substitutions_array($substitutionarray, $langs);
-
- print '';
- $texthelp = $langs->trans("FollowingConstantsWillBeSubstituted") . ' ';
- foreach ($substitutionarray as $key => $val) {
- $texthelp .= $key . ' ';
- }
- print $form->textwithpicto($langs->trans("MessageOfDay"), $texthelp, 1, 'help', '', 0, 2, 'tooltipmessageofday');
-
- print ' ';
-
- $doleditor = new DolEditor('main_motd', (isset($conf->global->MAIN_MOTD) ? $conf->global->MAIN_MOTD : ''), '', 142, 'dolibarr_notes', 'In', false, true, true, ROWS_4, '90%');
- $doleditor->Create();
-
- print ' ' . "\n";
+ // Disable javascript and ajax
+ print '' . $langs->trans("DisableJavascript") . ' ';
+ print ajax_constantonoff("MAIN_DISABLE_JAVASCRIPT", array(), $conf->entity, 0, 0, 1, 0, 0, 0, '', 'other');
+ print ' ' . $langs->trans("DisableJavascriptNote") . ' ';
+ print ' ';
+ print '';
+ print ' ';
+ print ' ';
print '
' . "\n";
print '
';
@@ -459,11 +577,16 @@ if ($mode == 'login') {
print '';
print '
';
+ print '';
+ print $langs->trans("Parameter");
+ print ' ';
+ print $langs->trans("Value");
+ print ' ';
+
// Hide helpcenter link on login page
print '' . $langs->trans("DisableLinkToHelpCenter") . ' ';
- print ajax_constantonoff("MAIN_HELPCENTER_DISABLELINK", array(), $conf->entity, 0, 0, 0, 0);
+ print ajax_constantonoff("MAIN_HELPCENTER_DISABLELINK", array(), $conf->entity, 0, 0, 0, 0, 0, 0, '', 'login');
print ' ';
- print ' ';
print ' ';
// Message on login page
@@ -475,13 +598,13 @@ if ($mode == 'login') {
$texthelp .= $key . ' ';
}
print $form->textwithpicto($langs->trans("MessageLogin"), $texthelp, 1, 'help', '', 0, 2, 'tooltipmessagelogin');
- print '';
+ print ' ';
$doleditor = new DolEditor('main_home', (isset($conf->global->MAIN_HOME) ? $conf->global->MAIN_HOME : ''), '', 142, 'dolibarr_notes', 'In', false, true, true, ROWS_4, '90%');
$doleditor->Create();
print ' ' . "\n";
// Background
- print '' . $langs->trans("BackgroundImageLogin") . ' (png,jpg) ';
+ print ' ' . $langs->trans("BackgroundImageLogin") . ' (png,jpg) ';
print '';
$disabled = '';
if (!empty($conf->global->ADD_UNSPLASH_LOGIN_BACKGROUND)) {
diff --git a/htdocs/admin/ldap.php b/htdocs/admin/ldap.php
index 80897320e90..1a274f8cec1 100644
--- a/htdocs/admin/ldap.php
+++ b/htdocs/admin/ldap.php
@@ -43,6 +43,7 @@ $action = GETPOST('action', 'aZ09');
// Initialize technical object to manage hooks of page. Note that conf->hooks_modules contains array of hook context
$hookmanager->initHooks(array('adminldap', 'globaladmin'));
+
/*
* Actions
*/
@@ -150,7 +151,7 @@ $arraylist['0'] = $langs->trans("No");
$arraylist['ldap2dolibarr'] = $langs->trans("LDAPToDolibarr");
$arraylist['dolibarr2ldap'] = $langs->trans("DolibarrToLDAP");
print $form->selectarray('activesynchro', $arraylist, $conf->global->LDAP_SYNCHRO_ACTIVE);
-print '
'.$langs->trans("LDAPDnSynchroActiveExample");
+print ' '.$langs->trans("LDAPDnSynchroActiveExample").' ';
if ($conf->global->LDAP_SYNCHRO_ACTIVE && !$conf->global->LDAP_USER_DN) {
print ''.$langs->trans("LDAPSetupNotComplete").' ';
}
@@ -163,7 +164,7 @@ if (!empty($conf->societe->enabled)) {
$arraylist['0'] = $langs->trans("No");
$arraylist['1'] = $langs->trans("DolibarrToLDAP");
print $form->selectarray('activecontact', $arraylist, $conf->global->LDAP_CONTACT_ACTIVE);
- print ''.$langs->trans("LDAPDnContactActiveExample").' ';
+ print ''.$langs->trans("LDAPDnContactActiveExample").' ';
}
// Synchro member active
@@ -174,7 +175,7 @@ if (!empty($conf->adherent->enabled)) {
$arraylist['1'] = $langs->trans("DolibarrToLDAP");
$arraylist['ldap2dolibarr'] = $langs->trans("LDAPToDolibarr").' ('.$langs->trans("SupportedForLDAPImportScriptOnly").')';
print $form->selectarray('activemembers', $arraylist, $conf->global->LDAP_MEMBER_ACTIVE);
- print ''.$langs->trans("LDAPDnMemberActiveExample").' ';
+ print ''.$langs->trans("LDAPDnMemberActiveExample").' ';
}
// Synchro member type active
@@ -185,7 +186,7 @@ if (!empty($conf->adherent->enabled)) {
$arraylist['1'] = $langs->trans("DolibarrToLDAP");
$arraylist['ldap2dolibarr'] = $langs->trans("LDAPToDolibarr").' ('.$langs->trans("SupportedForLDAPImportScriptOnly").')';
print $form->selectarray('activememberstypes', $arraylist, $conf->global->LDAP_MEMBER_TYPE_ACTIVE);
- print ''.$langs->trans("LDAPDnMemberTypeActiveExample").' ';
+ print ''.$langs->trans("LDAPDnMemberTypeActiveExample").' ';
}
// Fields from hook
@@ -214,33 +215,33 @@ $arraylist = array();
$arraylist['3'] = 'Version 3';
$arraylist['2'] = 'Version 2';
print $form->selectarray('LDAP_SERVER_PROTOCOLVERSION', $arraylist, $conf->global->LDAP_SERVER_PROTOCOLVERSION);
-print ''.$langs->trans("LDAPServerProtocolVersion").' ';
+print ''.$langs->trans("LDAPServerProtocolVersion").' ';
// Serveur primaire
print '';
print $langs->trans("LDAPPrimaryServer").' ';
-print ' ';
-print ' '.$langs->trans("LDAPServerExample").' ';
+print ' ';
+print ''.$langs->trans("LDAPServerExample").' ';
// Serveur secondaire
print '';
print $langs->trans("LDAPSecondaryServer").' ';
-print ' ';
-print ' '.$langs->trans("LDAPServerExample").' ';
+print ' ';
+print ''.$langs->trans("LDAPServerExample").' ';
// Port
print ''.$langs->trans("LDAPServerPort").' ';
if (!empty($conf->global->LDAP_SERVER_PORT)) {
- print ' ';
+ print ' ';
} else {
- print ' ';
+ print ' ';
}
-print ' '.$langs->trans("LDAPServerPortExample").' ';
+print ''.$langs->trans("LDAPServerPortExample").' ';
// DNserver
print ''.$langs->trans("LDAPServerDn").' ';
-print ' ';
-print ' '.$langs->trans("LDAPServerDnExample").' ';
+print ' ';
+print ''.$langs->trans("LDAPServerDnExample").' ';
// Utiliser TLS
print ''.$langs->trans("LDAPServerUseTLS").' ';
@@ -248,7 +249,7 @@ $arraylist = array();
$arraylist['0'] = $langs->trans("No");
$arraylist['1'] = $langs->trans("Yes");
print $form->selectarray('usetls', $arraylist, $conf->global->LDAP_SERVER_USE_TLS);
-print ' '.$langs->trans("LDAPServerUseTLSExample").' ';
+print ''.$langs->trans("LDAPServerUseTLSExample").' ';
print '';
print ''.$langs->trans("ForANonAnonymousAccess").' ';
@@ -257,18 +258,18 @@ print " \n";
// DNAdmin
print '';
print ''.$langs->trans("LDAPAdminDn").' ';
-print ' ';
-print ' '.$langs->trans("LDAPAdminDnExample").' ';
+print ' ';
+print ''.$langs->trans("LDAPAdminDnExample").' ';
// Pass
print '';
print ''.$langs->trans("LDAPPassword").' ';
if (!empty($conf->global->LDAP_ADMIN_PASS)) {
- print ' '; // je le met en visible pour test
+ print ' '; // je le met en visible pour test
} else {
- print ' ';
+ print ' ';
}
-print ' '.$langs->trans('Password').' (ex: secret) ';
+print ''.$langs->trans('Password').' (ex: secret) ';
print '
';
diff --git a/htdocs/admin/modules.php b/htdocs/admin/modules.php
index 658be446765..ccf12d5a104 100644
--- a/htdocs/admin/modules.php
+++ b/htdocs/admin/modules.php
@@ -1025,16 +1025,16 @@ if ($mode == 'marketplace') {
print '