';
print $form->selectDate($search_date_start ? $search_date_start : -1, 'search_date_start', 0, 0, 1, '', 1, 0, 0, '', '', '', '', 1, '', $langs->trans('From'));
@@ -1291,7 +1309,7 @@ if ($resql) {
if (!empty($arrayfields['f.type']['checked'])) {
print_liste_field_titre($arrayfields['f.type']['label'], $_SERVER["PHP_SELF"], 'f.type', '', $param, '', $sortfield, $sortorder);
}
- if (!empty($arrayfields['f.date']['checked'])) {
+ if (!empty($arrayfields['f.datef']['checked'])) {
print_liste_field_titre($arrayfields['f.date']['label'], $_SERVER['PHP_SELF'], 'f.datef', '', $param, 'align="center"', $sortfield, $sortorder);
}
if (!empty($arrayfields['f.date_valid']['checked'])) {
@@ -1456,7 +1474,7 @@ if ($resql) {
$facturestatic->paye = $obj->paye;
$facturestatic->fk_soc = $obj->fk_soc;
- $facturestatic->date = $db->jdate($obj->df);
+ $facturestatic->date = $db->jdate($obj->datef);
$facturestatic->date_valid = $db->jdate($obj->date_valid);
$facturestatic->date_lim_reglement = $db->jdate($obj->datelimite);
@@ -1576,9 +1594,9 @@ if ($resql) {
}
// Date
- if (!empty($arrayfields['f.date']['checked'])) {
+ if (!empty($arrayfields['f.datef']['checked'])) {
print '
';
- print dol_print_date($db->jdate($obj->df), 'day');
+ print dol_print_date($db->jdate($obj->datef), 'day');
print ' ';
if (!$i) {
$totalarray['nbfield']++;
@@ -1755,7 +1773,7 @@ if ($resql) {
// Amount HT
if (!empty($arrayfields['f.total_ht']['checked'])) {
- print '
'.price($obj->total_ht)." \n";
+ print '
'.price($obj->total_ht)." \n";
if (!$i) {
$totalarray['nbfield']++;
}
@@ -1766,7 +1784,7 @@ if ($resql) {
}
// Amount VAT
if (!empty($arrayfields['f.total_vat']['checked'])) {
- print '
'.price($obj->total_vat)." \n";
+ print '
'.price($obj->total_vat)." \n";
if (!$i) {
$totalarray['nbfield']++;
}
@@ -1777,7 +1795,7 @@ if ($resql) {
}
// Amount LocalTax1
if (!empty($arrayfields['f.total_localtax1']['checked'])) {
- print '
'.price($obj->total_localtax1)." \n";
+ print '
'.price($obj->total_localtax1)." \n";
if (!$i) {
$totalarray['nbfield']++;
}
@@ -1788,7 +1806,7 @@ if ($resql) {
}
// Amount LocalTax2
if (!empty($arrayfields['f.total_localtax2']['checked'])) {
- print '
'.price($obj->total_localtax2)." \n";
+ print '
'.price($obj->total_localtax2)." \n";
if (!$i) {
$totalarray['nbfield']++;
}
@@ -1799,7 +1817,7 @@ if ($resql) {
}
// Amount TTC
if (!empty($arrayfields['f.total_ttc']['checked'])) {
- print '
'.price($obj->total_ttc)." \n";
+ print '
'.price($obj->total_ttc)." \n";
if (!$i) {
$totalarray['nbfield']++;
}
@@ -1826,11 +1844,11 @@ if ($resql) {
}
if (!empty($arrayfields['f.retained_warranty']['checked'])) {
- print '
'.(!empty($obj->retained_warranty) ?price($obj->retained_warranty).'%' : ' ').' ';
+ print '
'.(!empty($obj->retained_warranty) ?price($obj->retained_warranty).'%' : ' ').' ';
}
if (!empty($arrayfields['dynamount_payed']['checked'])) {
- print '
'.(!empty($totalpay) ?price($totalpay, 0, $langs) : ' ').' '; // TODO Use a denormalized field
+ print '
'.(!empty($totalpay) ?price($totalpay, 0, $langs) : ' ').' '; // TODO Use a denormalized field
if (!$i) {
$totalarray['nbfield']++;
}
@@ -1842,7 +1860,7 @@ if ($resql) {
// Pending amount
if (!empty($arrayfields['rtp']['checked'])) {
- print '
';
+ print ' ';
print (!empty($remaintopay) ? price($remaintopay, 0, $langs) : ' ');
print ' '; // TODO Use a denormalized field
if (!$i) {
@@ -1874,27 +1892,27 @@ if ($resql) {
}
// Amount HT
if (!empty($arrayfields['f.multicurrency_total_ht']['checked'])) {
- print '
'.price($obj->multicurrency_total_ht)." \n";
+ print '
'.price($obj->multicurrency_total_ht)." \n";
if (!$i) {
$totalarray['nbfield']++;
}
}
// Amount VAT
if (!empty($arrayfields['f.multicurrency_total_vat']['checked'])) {
- print '
'.price($obj->multicurrency_total_vat)." \n";
+ print '
'.price($obj->multicurrency_total_vat)." \n";
if (!$i) {
$totalarray['nbfield']++;
}
}
// Amount TTC
if (!empty($arrayfields['f.multicurrency_total_ttc']['checked'])) {
- print '
'.price($obj->multicurrency_total_ttc)." \n";
+ print '
'.price($obj->multicurrency_total_ttc)." \n";
if (!$i) {
$totalarray['nbfield']++;
}
}
if (!empty($arrayfields['multicurrency_dynamount_payed']['checked'])) {
- print '
'.(!empty($multicurrency_totalpay) ?price($multicurrency_totalpay, 0, $langs) : ' ').' '; // TODO Use a denormalized field
+ print '
'.(!empty($multicurrency_totalpay) ?price($multicurrency_totalpay, 0, $langs) : ' ').' '; // TODO Use a denormalized field
if (!$i) {
$totalarray['nbfield']++;
}
diff --git a/htdocs/contact/list.php b/htdocs/contact/list.php
index 3890155f116..4535c0514e9 100644
--- a/htdocs/contact/list.php
+++ b/htdocs/contact/list.php
@@ -704,25 +704,29 @@ $moreforfilter = '';
if (!empty($conf->categorie->enabled) && $user->rights->categorie->lire) {
require_once DOL_DOCUMENT_ROOT.'/categories/class/categorie.class.php';
$moreforfilter .= '
';
- $moreforfilter .= $langs->trans('Categories').': ';
- $moreforfilter .= $formother->select_categories(Categorie::TYPE_CONTACT, $search_categ, 'search_categ', 1);
+ $tmptitle = $langs->trans('ContactCategoriesShort');
+ $moreforfilter .= img_picto($tmptitle, 'category', 'class="pictofixedwidth"');
+ $moreforfilter .= $formother->select_categories(Categorie::TYPE_CONTACT, $search_categ, 'search_categ', 1, $tmptitle);
$moreforfilter .= '
';
if (empty($type) || $type == 'c' || $type == 'p') {
$moreforfilter .= '
';
+ $tmptitle = '';
if ($type == 'c') {
- $moreforfilter .= $langs->trans('CustomersCategoriesShort').': ';
+ $tmptitle .= $langs->trans('CustomersCategoriesShort');
} elseif ($type == 'p') {
- $moreforfilter .= $langs->trans('ProspectsCategoriesShort').': ';
+ $tmptitle .= $langs->trans('ProspectsCategoriesShort');
} else {
- $moreforfilter .= $langs->trans('CustomersProspectsCategoriesShort').': ';
+ $tmptitle .= $langs->trans('CustomersProspectsCategoriesShort');
}
- $moreforfilter .= $formother->select_categories(Categorie::TYPE_CUSTOMER, $search_categ_thirdparty, 'search_categ_thirdparty', 1);
+ $moreforfilter .= img_picto($tmptitle, 'category', 'class="pictofixedwidth"');
+ $moreforfilter .= $formother->select_categories(Categorie::TYPE_CUSTOMER, $search_categ_thirdparty, 'search_categ_thirdparty', 1, $tmptitle);
$moreforfilter .= '
';
}
if (empty($type) || $type == 'f') {
$moreforfilter .= '
';
- $moreforfilter .= $langs->trans('SuppliersCategoriesShort').': ';
- $moreforfilter .= $formother->select_categories(Categorie::TYPE_SUPPLIER, $search_categ_supplier, 'search_categ_supplier', 1);
+ $tmptitle = $langs->trans('SuppliersCategoriesShort');
+ $moreforfilter .= img_picto($tmptitle, 'category', 'class="pictofixedwidth"');
+ $moreforfilter .= $formother->select_categories(Categorie::TYPE_SUPPLIER, $search_categ_supplier, 'search_categ_supplier', 1, $tmptitle);
$moreforfilter .= '
';
}
}
@@ -1092,35 +1096,35 @@ while ($i < min($num, $limit)) {
}
// Phone
if (!empty($arrayfields['p.phone']['checked'])) {
- print '
'.dol_print_phone($obj->phone_pro, $obj->country_code, $obj->rowid, $obj->socid, 'AC_TEL', ' ', 'phone').' ';
+ print '
'.dol_print_phone($obj->phone_pro, $obj->country_code, $obj->rowid, $obj->socid, 'AC_TEL', ' ', 'phone').' ';
if (!$i) {
$totalarray['nbfield']++;
}
}
// Phone perso
if (!empty($arrayfields['p.phone_perso']['checked'])) {
- print '
'.dol_print_phone($obj->phone_perso, $obj->country_code, $obj->rowid, $obj->socid, 'AC_TEL', ' ', 'phone').' ';
+ print '
'.dol_print_phone($obj->phone_perso, $obj->country_code, $obj->rowid, $obj->socid, 'AC_TEL', ' ', 'phone').' ';
if (!$i) {
$totalarray['nbfield']++;
}
}
// Phone mobile
if (!empty($arrayfields['p.phone_mobile']['checked'])) {
- print '
'.dol_print_phone($obj->phone_mobile, $obj->country_code, $obj->rowid, $obj->socid, 'AC_TEL', ' ', 'mobile').' ';
+ print '
'.dol_print_phone($obj->phone_mobile, $obj->country_code, $obj->rowid, $obj->socid, 'AC_TEL', ' ', 'mobile').' ';
if (!$i) {
$totalarray['nbfield']++;
}
}
// Fax
if (!empty($arrayfields['p.fax']['checked'])) {
- print '
'.dol_print_phone($obj->fax, $obj->country_code, $obj->rowid, $obj->socid, 'AC_TEL', ' ', 'fax').' ';
+ print '
'.dol_print_phone($obj->fax, $obj->country_code, $obj->rowid, $obj->socid, 'AC_TEL', ' ', 'fax').' ';
if (!$i) {
$totalarray['nbfield']++;
}
}
// EMail
if (!empty($arrayfields['p.email']['checked'])) {
- print '
'.dol_print_email($obj->email, $obj->rowid, $obj->socid, 'AC_EMAIL', 18, 0, 1).' ';
+ print '
'.dol_print_email($obj->email, $obj->rowid, $obj->socid, 'AC_EMAIL', 18, 0, 1).' ';
if (!$i) {
$totalarray['nbfield']++;
}
@@ -1144,7 +1148,7 @@ while ($i < min($num, $limit)) {
}
// Company
if (!empty($arrayfields['p.fk_soc']['checked']) || !empty($arrayfields['s.nom']['checked'])) {
- print '
';
+ print ' ';
if ($obj->socid) {
$objsoc = new Societe($db);
$objsoc->fetch($obj->socid);
diff --git a/htdocs/core/ajax/selectsearchbox.php b/htdocs/core/ajax/selectsearchbox.php
index 2794243b7f3..d10324ef620 100644
--- a/htdocs/core/ajax/selectsearchbox.php
+++ b/htdocs/core/ajax/selectsearchbox.php
@@ -81,7 +81,7 @@ if (((!empty($conf->product->enabled) && $user->rights->produit->lire) || (!empt
$arrayresult['searchintoproduct'] = array('position'=>30, 'shortcut'=>'P', 'img'=>'object_product', 'label'=>$langs->trans("SearchIntoProductsOrServices", $search_boxvalue), 'text'=>img_picto('', 'object_product').' '.$langs->trans("SearchIntoProductsOrServices", $search_boxvalue), 'url'=>DOL_URL_ROOT.'/product/list.php'.($search_boxvalue ? '?sall='.urlencode($search_boxvalue) : ''));
// search on lot/serial numbers
if ( ! empty($conf->productbatch->enabled) ) {
- $arrayresult['searchintobatch'] = array('position'=>32, 'shortcut'=>'B', 'img'=>'object_plot', 'label'=>$langs->trans("SearchIntoBatch", $search_boxvalue), 'text'=>img_picto('', 'object_lot').' '.$langs->trans("SearchIntoBatch", $search_boxvalue), 'url'=>DOL_URL_ROOT.'/product/stock/productlot_list.php'.($search_boxvalue ? '?sall='.urlencode($search_boxvalue) : ''));
+ $arrayresult['searchintobatch'] = array('position'=>32, 'shortcut'=>'B', 'img'=>'object_lot', 'label'=>$langs->trans("SearchIntoBatch", $search_boxvalue), 'text'=>img_picto('', 'object_lot').' '.$langs->trans("SearchIntoBatch", $search_boxvalue), 'url'=>DOL_URL_ROOT.'/product/stock/productlot_list.php'.($search_boxvalue ? '?sall='.urlencode($search_boxvalue) : ''));
}
}
diff --git a/htdocs/core/boxes/box_members_last_subscriptions.php b/htdocs/core/boxes/box_members_last_subscriptions.php
index 6da20bf28d0..e08bc1073b6 100644
--- a/htdocs/core/boxes/box_members_last_subscriptions.php
+++ b/htdocs/core/boxes/box_members_last_subscriptions.php
@@ -153,7 +153,7 @@ class box_members_last_subscriptions extends ModeleBoxes
$this->info_box_contents[$line][] = array(
'td' => 'class="right" width="18"',
- 'text' => price($obj->subscription),
+ 'text' => ''.price($obj->subscription).' ',
);
$this->info_box_contents[$line][] = array(
diff --git a/htdocs/core/boxes/box_members_subscriptions_by_year.php b/htdocs/core/boxes/box_members_subscriptions_by_year.php
index ef796b75044..b6c146312bc 100644
--- a/htdocs/core/boxes/box_members_subscriptions_by_year.php
+++ b/htdocs/core/boxes/box_members_subscriptions_by_year.php
@@ -180,11 +180,11 @@ class box_members_subscriptions_by_year extends ModeleBoxes
);
$this->info_box_contents[$line][] = array(
'td' => 'class="right"',
- 'text' => price($value),
+ 'text' => ''.price($value).' ',
);
$this->info_box_contents[$line][] = array(
'td' => 'class="right"',
- 'text' => price(price2num($value / $Number[$key], 'MT')),
+ 'text' => ''.price(price2num($value / $Number[$key], 'MT')).' ',
);
$line++;
}
@@ -205,11 +205,11 @@ class box_members_subscriptions_by_year extends ModeleBoxes
);
$this->info_box_contents[$line][] = array(
'td' => 'class="liste_total right"',
- 'text' => price($tot),
+ 'text' => ''.price($tot).' ',
);
$this->info_box_contents[$line][] = array(
'td' => 'class="liste_total right"',
- 'text' => price(price2num($numb > 0 ? ($tot / $numb) : 0, 'MT')),
+ 'text' => ''.price(price2num($numb > 0 ? ($tot / $numb) : 0, 'MT')).' ',
);
}
} else {
diff --git a/htdocs/core/class/html.form.class.php b/htdocs/core/class/html.form.class.php
index 36e7eca84b6..f12aed42aca 100644
--- a/htdocs/core/class/html.form.class.php
+++ b/htdocs/core/class/html.form.class.php
@@ -1831,7 +1831,7 @@ class Form
*
* @param string $selected User id or user object of user preselected. If 0 or < -2, we use id of current user. If -1, keep unselected (if empty is allowed)
* @param string $htmlname Field name in form
- * @param int $show_empty 0=list with no empty value, 1=add also an empty value into list
+ * @param int|string $show_empty 0=list with no empty value, 1=add also an empty value into list
* @param array $exclude Array list of users id to exclude
* @param int $disabled If select list must be disabled
* @param array|string $include Array list of users id to include. User '' for all users or 'hierarchy' to have only supervised users or 'hierarchyme' to have supervised + me
@@ -1949,7 +1949,14 @@ class Form
// do not use maxwidthonsmartphone by default. Set it by caller so auto size to 100% will work when not defined
$out .= '';
if ($show_empty && !$multiple) {
- $out .= ' '."\n";
+ $textforempty = ' ';
+ if (!empty($conf->use_javascript_ajax)) {
+ $textforempty = ' '; // If we use ajaxcombo, we need here to avoid to have an empty element that is too small.
+ }
+ if (!is_numeric($show_empty)) {
+ $textforempty = $show_empty;
+ }
+ $out .= ''.$textforempty.' '."\n";
}
if ($show_every) {
$out .= '-- '.$langs->trans("Everybody").' -- '."\n";
@@ -7334,7 +7341,7 @@ class Form
/**
- * Show a multiselect dropbox from an array.
+ * Show a multiselect dropbox from an array. If a saved selection of fields exists for user (into $user->conf->MAIN_SELECTEDFIELDS_contextofpage), we use this one instead of default.
*
* @param string $htmlname Name of HTML field
* @param array $array Array with array of fields we could show. This array may be modified according to setup of user.
@@ -7350,8 +7357,9 @@ class Form
return '';
}
- $tmpvar = "MAIN_SELECTEDFIELDS_".$varpage; // To get list of saved seleteced properties
- if (!empty($user->conf->$tmpvar)) {
+ $tmpvar = "MAIN_SELECTEDFIELDS_".$varpage; // To get list of saved selected fields to show
+
+ if (!empty($user->conf->$tmpvar)) { // A list of fields was already customized for user
$tmparray = explode(',', $user->conf->$tmpvar);
foreach ($array as $key => $val) {
//var_dump($key);
@@ -7362,6 +7370,12 @@ class Form
$array[$key]['checked'] = 0;
}
}
+ } else { // There is no list of fields already customized for user
+ foreach ($array as $key => $val) {
+ if ($array[$key]['checked'] < 0) {
+ $array[$key]['checked'] = 0;
+ }
+ }
}
$lis = '';
@@ -7380,7 +7394,8 @@ class Form
$langs->load($val['langfile']);
}
- $lis .= ''.dol_escape_htmltag($langs->trans($val['label'])).' ';
+ // Note: $val['checked'] <> 0 means we must show the field into the combo list
+ $lis .= ''.dol_escape_htmltag($langs->trans($val['label'])).' ';
$listcheckedstring .= (empty($val['checked']) ? '' : $key.',');
}
}
@@ -7721,16 +7736,17 @@ class Form
print '';
print '';
- print ' ';
+ print ' ';
print ' ';
- print ''.$objp->ref.' ';
+ print ''.$objp->ref.' ';
print ''.$objp->ref_client.' ';
print '';
if ($possiblelink['label'] == 'LinkToContract') {
$form = new Form($this->db);
print $form->textwithpicto('', $langs->trans("InformationOnLinkToContract")).' ';
}
- print price($objp->total_ht).' ';
+ print ''.price($objp->total_ht).' ';
+ print '';
print ''.$objp->name.' ';
print ' ';
$i++;
@@ -7760,7 +7776,7 @@ class Form
';
if (!empty($conf->use_javascript_ajax)) {
- $linktoelem .= ''.$langs->trans("LinkTo").'... ';
+ $linktoelem .= ' '.$langs->trans("LinkTo").'... ';
}
$linktoelem .= '
diff --git a/htdocs/core/class/html.formaccounting.class.php b/htdocs/core/class/html.formaccounting.class.php
index 53852955094..e6ada4d67c7 100644
--- a/htdocs/core/class/html.formaccounting.class.php
+++ b/htdocs/core/class/html.formaccounting.class.php
@@ -364,7 +364,7 @@ class FormAccounting extends Form
$sql = "SELECT DISTINCT aa.account_number, aa.label, aa.labelshort, aa.rowid, aa.fk_pcg_version";
$sql .= " FROM ".MAIN_DB_PREFIX."accounting_account as aa";
$sql .= " INNER JOIN ".MAIN_DB_PREFIX."accounting_system as asy ON aa.fk_pcg_version = asy.pcg_version";
- $sql .= " AND asy.rowid = ".$conf->global->CHARTOFACCOUNTS;
+ $sql .= " AND asy.rowid = ".((int) $conf->global->CHARTOFACCOUNTS);
$sql .= " AND aa.active = 1";
$sql .= " AND aa.entity=".$conf->entity;
$sql .= " ORDER BY aa.account_number";
@@ -380,7 +380,7 @@ class FormAccounting extends Form
$num_rows = $this->db->num_rows($resql);
- if ($num_rows == 0) {
+ if ($num_rows == 0 && (empty($conf->global->CHARTOFACCOUNTS) || $conf->global->CHARTOFACCOUNTS < 0)) {
$langs->load("errors");
$showempty = $langs->trans("ErrorYouMustFirstSetupYourChartOfAccount");
} else {
diff --git a/htdocs/core/lib/admin.lib.php b/htdocs/core/lib/admin.lib.php
index 7157b1a7c62..3088db079e3 100644
--- a/htdocs/core/lib/admin.lib.php
+++ b/htdocs/core/lib/admin.lib.php
@@ -303,14 +303,17 @@ function run_sql($sqlfile, $silent = 1, $entity = '', $usesavepoint = 1, $handle
if ($offsetforchartofaccount > 0) {
// Replace lines
- // 'INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label, active) VALUES (__ENTITY__, 1401, 'PCG99-ABREGE', 'CAPIT', '1234', 1400, '...', 1);'
+ // 'INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label, active) VALUES (__ENTITY__, 1401, 'PCG99-ABREGE', 'CAPIT', '1234', 1400,...'
// with
- // 'INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label, active) VALUES (__ENTITY__, 1401 + 200100000, 'PCG99-ABREGE','CAPIT', '1234', 1400 + 200100000, '...', 1);'
- // Note: string with 1234 instead of '1234' is also supported
+ // 'INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label, active) VALUES (__ENTITY__, 1401 + 200100000, 'PCG99-ABREGE','CAPIT', '1234', 1400 + 200100000,...'
+ // Note: string with 'PCG99-ABREGE','CAPIT', 1234 instead of 'PCG99-ABREGE','CAPIT', '1234' is also supported
$newsql = preg_replace('/VALUES\s*\(__ENTITY__, \s*(\d+)\s*,(\s*\'[^\',]*\'\s*,\s*\'[^\',]*\'\s*,\s*\'?[^\',]*\'?\s*),\s*\'?([^\',]*)\'?/ims', 'VALUES (__ENTITY__, \1 + '.$offsetforchartofaccount.', \2, \3 + '.$offsetforchartofaccount, $newsql);
$newsql = preg_replace('/([,\s])0 \+ '.$offsetforchartofaccount.'/ims', '\1 0', $newsql);
//var_dump($newsql);
$arraysql[$i] = $newsql;
+
+ // FIXME Because we force the rowid during insert, we must also update the sequence with postgresql by running
+ // SELECT dol_util_rebuild_sequences();
}
}
@@ -632,16 +635,28 @@ function dolibarr_set_const($db, $name, $value, $type = 'chaine', $visible = 0,
/**
* Prepare array with list of tabs
*
- * @return array Array of tabs to show
+ * @param int $nbofactivatedmodules Number f oactivated modules
+ * @param int $nboftotalmodules Nb of total modules
+ * @return array Array of tabs to show
*/
-function modules_prepare_head()
+function modules_prepare_head($nbofactivatedmodules, $nboftotalmodules)
{
- global $langs, $conf, $user;
+ global $langs, $conf, $user, $form;
+
+ $desc = $langs->trans("ModulesDesc", '{picto}');
+ $desc = str_replace('{picto}', img_picto('', 'switch_off'), $desc);
+
$h = 0;
$head = array();
$mode = empty($conf->global->MAIN_MODULE_SETUP_ON_LIST_BY_DEFAULT) ? 'commonkanban' : 'common';
$head[$h][0] = DOL_URL_ROOT."/admin/modules.php?mode=".$mode;
- $head[$h][1] = $langs->trans("AvailableModules");
+ if ($nbofactivatedmodules <= (empty($conf->global->MAIN_MIN_NB_ENABLED_MODULE_FOR_WARNING) ? 1 : $conf->global->MAIN_MIN_NB_ENABLED_MODULE_FOR_WARNING)) { // If only minimal initial modules enabled)
+ $head[$h][1] = $form->textwithpicto($langs->trans("AvailableModules"), $desc);
+ $head[$h][1] .= img_warning($langs->trans("YouMustEnableOneModule"));
+ } else {
+ //$head[$h][1] = $langs->trans("AvailableModules").$form->textwithpicto('
'.$nbofactivatedmodules.' / '.$nboftotalmodules.' ', $desc, 1, 'help', '', 1, 3);
+ $head[$h][1] = $langs->trans("AvailableModules").'
'.$nbofactivatedmodules.' / '.$nboftotalmodules.' ';
+ }
$head[$h][2] = 'modules';
$h++;
diff --git a/htdocs/core/lib/functions.lib.php b/htdocs/core/lib/functions.lib.php
index 6769c9a58d7..403aa59e66a 100644
--- a/htdocs/core/lib/functions.lib.php
+++ b/htdocs/core/lib/functions.lib.php
@@ -634,8 +634,8 @@ function GETPOST($paramname, $check = 'alphanohtml', $method = 0, $filter = null
$out = checkVal($out, $check, $filter, $options);
}
- // Sanitizing for special parameters. There is no reason to allow the backtopage parameter to contains an external URL.
- if ($paramname == 'backtopage' || $paramname == 'backtolist') {
+ // Sanitizing for special parameters. There is no reason to allow the backtopage, backtolist or backtourl parameter to contains an external URL.
+ if ($paramname == 'backtopage' || $paramname == 'backtolist' || $paramname == 'backtourl') {
$out = str_replace('\\', '/', $out);
$out = str_replace(array(':', ';', '@'), '', $out);
@@ -3528,17 +3528,17 @@ function img_picto($titlealt, $picto, $moreatt = '', $pictoisfullpath = false, $
'accountancy', 'account', 'accountline', 'action', 'add', 'address', 'angle-double-down', 'angle-double-up', 'asset',
'bank_account', 'barcode', 'bank', 'bill', 'billa', 'billr', 'billd', 'bookmark', 'bom', 'building',
'cash-register', 'category', 'chart', 'check', 'clock', 'close_title', 'cog', 'collab', 'company', 'contact', 'country', 'contract', 'cron', 'cubes',
- 'delete', 'dolly', 'dollyrevert', 'donation', 'download', 'edit', 'ellipsis-h', 'email', 'eraser', 'external-link-alt', 'external-link-square-alt',
+ 'delete', 'dolly', 'dollyrevert', 'donation', 'download', 'edit', 'ellipsis-h', 'email', 'eraser', 'establishment', 'external-link-alt', 'external-link-square-alt',
'filter', 'file-code', 'file-export', 'file-import', 'file-upload', 'folder', 'folder-open', 'globe', 'globe-americas', 'grip', 'grip_title', 'group',
'help', 'holiday',
'info', 'intervention', 'inventory', 'intracommreport',
'label', 'language', 'link', 'list', 'listlight', 'loan', 'lot', 'long-arrow-alt-right',
'margin', 'map-marker-alt', 'member', 'meeting', 'money-bill-alt', 'movement', 'mrp', 'note', 'next',
'object_accounting', 'object_account', 'object_accountline', 'object_action', 'object_asset', 'object_barcode', 'object_bill', 'object_billr', 'object_billa', 'object_billd', 'object_bom',
- 'object_category', 'conferenceorbooth', 'object_conversation', 'object_bookmark', 'object_bug', 'object_clock', 'object_dolly', 'object_dollyrevert',
+ 'object_category', 'conferenceorbooth', 'object_conversation', 'object_bookmark', 'object_bug', 'object_building', 'object_clock', 'object_collab', 'object_dolly', 'object_dollyrevert',
'object_folder', 'object_folder-open','object_generic',
'object_list-alt', 'object_calendar', 'object_calendarweek', 'object_calendarmonth', 'object_calendarday', 'object_calendarperuser',
- 'object_cash-register', 'object_company', 'object_contact', 'object_contract', 'object_cron', 'object_donation', 'object_dynamicprice',
+ 'object_cash-register', 'object_company', 'object_contact', 'object_contract', 'object_cron', 'object_donation', 'object_dynamicprice', 'object_establishment',
'object_globe', 'object_holiday', 'object_hrm', 'object_invoice', 'object_intervention', 'object_inventory', 'object_intracommreport', 'object_label',
'object_margin', 'object_members', 'object_money-bill-alt', 'object_multicurrency', 'object_order', 'object_payment',
'object_lot', 'object_mrp', 'object_other',
@@ -3568,7 +3568,7 @@ function img_picto($titlealt, $picto, $moreatt = '', $pictoisfullpath = false, $
$facolor = '';
$fasize = '';
$fa = 'fas';
- if (in_array($pictowithouttext, array('clock', 'generic', 'minus-square', 'object_generic', 'pdf', 'plus-square', 'timespent', 'note', 'off', 'on', 'object_bookmark', 'bookmark', 'vcard'))) {
+ if (in_array($pictowithouttext, array('clock', 'establishment', 'generic', 'minus-square', 'object_generic', 'pdf', 'plus-square', 'timespent', 'note', 'off', 'on', 'object_bookmark', 'bookmark', 'vcard'))) {
$fa = 'far';
}
if (in_array($pictowithouttext, array('black-tie', 'github', 'skype', 'twitter', 'facebook', 'linkedin', 'instagram', 'snapchat', 'stripe', 'stripe-s', 'youtube', 'google-plus-g', 'whatsapp'))) {
@@ -3584,7 +3584,7 @@ function img_picto($titlealt, $picto, $moreatt = '', $pictoisfullpath = false, $
'setup'=>'cog', 'companies'=>'building', 'products'=>'cube', 'commercial'=>'suitcase', 'invoicing'=>'coins',
'accounting'=>'chart-line', 'category'=>'tag', 'dollyrevert'=>'dolly',
'hrm'=>'user-tie', 'margin'=>'calculator', 'members'=>'user-friends', 'ticket'=>'ticket-alt', 'globe'=>'external-link-alt', 'lot'=>'barcode',
- 'email'=>'at',
+ 'email'=>'at', 'establishment'=>'building',
'edit'=>'pencil-alt', 'grip_title'=>'arrows-alt', 'grip'=>'arrows-alt', 'help'=>'question-circle',
'generic'=>'file', 'holiday'=>'umbrella-beach',
'info'=>'info-circle', 'inventory'=>'boxes', 'intracommreport'=>'globe-europe', 'label'=>'layer-group', 'loan'=>'money-bill-alt',
@@ -8821,8 +8821,8 @@ function showDirectDownloadLink($object)
$url = $object->getLastMainDocLink($object->element);
if ($url) {
- $out .= img_picto($langs->trans("PublicDownloadLinkdesc"), 'globe').' '.$langs->trans("DirectDownloadLink").'
';
- $out .= '
';
+ $out .= img_picto($langs->trans("PublicDownloadLinkdesc"), 'globe').'
'.$langs->trans("DirectDownloadLink").' ';
+ $out .= '
';
$out .= ajax_autoselect("directdownloadlink", 0);
}
return $out;
diff --git a/htdocs/core/lib/payments.lib.php b/htdocs/core/lib/payments.lib.php
index 835986f5f83..84a72edcc1e 100644
--- a/htdocs/core/lib/payments.lib.php
+++ b/htdocs/core/lib/payments.lib.php
@@ -171,9 +171,9 @@ function showOnlinePaymentUrl($type, $ref)
$servicename = $langs->transnoentitiesnoconv('Online');
- $out = img_picto('', 'globe').' '.$langs->trans("ToOfferALinkForOnlinePayment", $servicename).'
';
+ $out = img_picto('', 'globe').'
'.$langs->trans("ToOfferALinkForOnlinePayment", $servicename).' ';
$url = getOnlinePaymentUrl(0, $type, $ref);
- $out .= '
';
+ $out .= '
';
$out .= ajax_autoselect("onlinepaymenturl", 0);
return $out;
}
diff --git a/htdocs/core/lib/project.lib.php b/htdocs/core/lib/project.lib.php
index 8fef0916ff8..79e5e4f8dcc 100644
--- a/htdocs/core/lib/project.lib.php
+++ b/htdocs/core/lib/project.lib.php
@@ -2554,7 +2554,7 @@ function print_projecttasks_array($db, $form, $socid, $projectsListId, $mytasks
$ponderated_opp_amount += price2num($opp_weighted_amount);
}
if ($objp->opp_amount) {
- print '
'.price($objp->opp_amount, 0, '', 1, -1, 0, $conf->currency).' ';
+ print '
'.price($objp->opp_amount, 0, '', 1, -1, 0, $conf->currency).' ';
}
print '
';
}
diff --git a/htdocs/core/lib/signature.lib.php b/htdocs/core/lib/signature.lib.php
index 8b49b01ae35..82f446f04c7 100644
--- a/htdocs/core/lib/signature.lib.php
+++ b/htdocs/core/lib/signature.lib.php
@@ -33,9 +33,15 @@ function showOnlineSignatureUrl($type, $ref)
$servicename = 'Online';
- $out = img_picto('', 'globe').' '.$langs->trans("ToOfferALinkForOnlineSignature", $servicename).'
';
+ $out = img_picto('', 'globe').'
'.$langs->trans("ToOfferALinkForOnlineSignature", $servicename).' ';
$url = getOnlineSignatureUrl(0, $type, $ref);
- $out .= '
';
+ $out .= '
';
+ if ($url == $langs->trans("FeatureOnlineSignDisabled")) {
+ $out .= $url;
+ } else {
+ $out .= ' ';
+ }
+ $out .= '
';
$out .= ajax_autoselect("onlinesignatureurl", 0);
return $out;
}
diff --git a/htdocs/expedition/list.php b/htdocs/expedition/list.php
index a4a09e06808..365964857a2 100644
--- a/htdocs/expedition/list.php
+++ b/htdocs/expedition/list.php
@@ -511,31 +511,37 @@ $moreforfilter = '';
if ($user->rights->societe->client->voir || $socid) {
$langs->load("commercial");
$moreforfilter .= '
';
- $moreforfilter .= $langs->trans('ThirdPartiesOfSaleRepresentative').': ';
- $moreforfilter .= $formother->select_salesrepresentatives($search_sale, 'search_sale', $user, 0, 1, 'maxwidth200');
+ $tmptitle = $langs->trans('ThirdPartiesOfSaleRepresentative');
+ $moreforfilter .= img_picto($tmptitle, 'user');
+ $moreforfilter .= $formother->select_salesrepresentatives($search_sale, 'search_sale', $user, 0, $tmptitle, 'maxwidth200');
$moreforfilter .= '
';
}
// If the user can view other users
if ($user->rights->user->user->lire) {
$moreforfilter .= '
';
- $moreforfilter .= $langs->trans('LinkedToSpecificUsers').': ';
- $moreforfilter .= $form->select_dolusers($search_user, 'search_user', 1, '', 0, '', '', 0, 0, 0, '', 0, '', 'maxwidth200');
+ $tmptitle = $langs->trans('LinkedToSpecificUsers');
+ $moreforfilter .= img_picto($tmptitle, 'user');
+ $moreforfilter .= $form->select_dolusers($search_user, 'search_user', $tmptitle, '', 0, '', '', 0, 0, 0, '', 0, '', 'maxwidth200');
$moreforfilter .= '
';
}
// If the user can view prospects other than his'
if (!empty($conf->categorie->enabled) && $user->rights->categorie->lire && ($user->rights->produit->lire || $user->rights->service->lire)) {
include_once DOL_DOCUMENT_ROOT.'/categories/class/categorie.class.php';
$moreforfilter .= '
';
- $moreforfilter .= $langs->trans('IncludingProductWithTag').': ';
- $cate_arbo = $form->select_all_categories(Categorie::TYPE_PRODUCT, null, 'parent', null, null, 1);
- $moreforfilter .= $form->selectarray('search_product_category', $cate_arbo, $search_product_category, 1, 0, 0, '', 0, 0, 0, 0, 'maxwidth300', 1);
+ $tmptitle = $langs->trans('IncludingProductWithTag');
+ $moreforfilter .= img_picto($tmptitle, 'category');
+ //$cate_arbo = $form->select_all_categories(Categorie::TYPE_PRODUCT, null, 'parent', null, null, 1);
+ //$moreforfilter .= $form->selectarray('search_product_category', $cate_arbo, $search_product_category, 1, 0, 0, '', 0, 0, 0, 0, 'maxwidth300', 1);
+ $moreforfilter .= $formother->select_categories(Categorie::TYPE_PRODUCT, $search_product_category, 'parent', 1, $tmptitle);
+
$moreforfilter .= '
';
}
if (!empty($conf->categorie->enabled) && $user->rights->categorie->lire) {
require_once DOL_DOCUMENT_ROOT.'/categories/class/categorie.class.php';
$moreforfilter .= '
';
- $moreforfilter .= $langs->trans('CustomersProspectsCategoriesShort').': ';
- $moreforfilter .= $formother->select_categories('customer', $search_categ_cus, 'search_categ_cus', 1);
+ $tmptitle = $langs->trans('CustomersProspectsCategoriesShort');
+ $moreforfilter .= img_picto($tmptitle, 'category');
+ $moreforfilter .= $formother->select_categories('customer', $search_categ_cus, 'search_categ_cus', 1, $tmptitle);
$moreforfilter .= '
';
}
$parameters = array();
diff --git a/htdocs/externalsite/admin/index.php b/htdocs/externalsite/admin/index.php
index 1710a570c45..a9a41c5e555 100644
--- a/htdocs/externalsite/admin/index.php
+++ b/htdocs/externalsite/admin/index.php
@@ -58,7 +58,7 @@ if ($action == 'update') {
$exturl = GETPOST('EXTERNALSITE_URL', 'none');
$exturl = dol_string_onlythesehtmltags($exturl, 1, 1, 0, 1);
- $exturl = dol_string_onlythesehtmlattributes($exturl);
+ $exturl = trim(dol_string_onlythesehtmlattributes($exturl));
$i += dolibarr_set_const($db, 'EXTERNALSITE_LABEL', trim($label), 'chaine', 0, '', $conf->entity);
$i += dolibarr_set_const($db, 'EXTERNALSITE_URL', trim($exturl), 'chaine', 0, '', $conf->entity);
@@ -108,7 +108,12 @@ print "