';
print '';
-// Search contact/address
-if (! empty($conf->adherent->enabled) && $user->rights->adherent->lire)
-{
- $listofsearchfields['search_member']=array('text'=>'Member');
-}
-if (count($listofsearchfields))
+if (! empty($conf->global->MAIN_SEARCH_FORM_ON_HOME_AREAS)) // This is useless due to the global search combo
{
- print ' ';
- print ' ';
+ // Search contact/address
+ if (! empty($conf->adherent->enabled) && $user->rights->adherent->lire)
+ {
+ $listofsearchfields['search_member']=array('text'=>'Member');
+ }
+
+ if (count($listofsearchfields))
+ {
+ print ' ';
+ print ' ';
+ }
}
-
/*
* Statistics
*/
diff --git a/htdocs/adherents/stats/byproperties.php b/htdocs/adherents/stats/byproperties.php
index 6b7c1c003a9..c717d20be84 100644
--- a/htdocs/adherents/stats/byproperties.php
+++ b/htdocs/adherents/stats/byproperties.php
@@ -120,7 +120,7 @@ print ' ';
print '';
print '| '.$langs->trans("Nature").' | ';
print ''.$langs->trans("NbOfMembers").' | ';
-print ''.$langs->trans("LastMemberDate").' | ';
+print ''.$langs->trans("LatestSubscriptionDate").' | ';
print ' ';
if (! $foundphy) $data[]=array('label'=>'phy','nb'=>'0','lastdate'=>'');
diff --git a/htdocs/admin/dict.php b/htdocs/admin/dict.php
index b5d15e07833..827f6e0b747 100644
--- a/htdocs/admin/dict.php
+++ b/htdocs/admin/dict.php
@@ -86,7 +86,7 @@ $hookmanager->initHooks(array('admin'));
// Put here declaration of dictionaries properties
// Sort order to show dictionary (0 is space). All other dictionaries (added by modules) will be at end of this.
-$taborder=array(9,0,4,3,2,0,1,8,19,16,27,0,5,11,0,33,34,0,6,0,29,0,7,17,24,28,0,10,23,12,13,0,14,0,22,20,18,21,0,15,30,0,26,0,32,0);
+$taborder=array(9,0,4,3,2,0,1,8,19,16,27,0,5,11,0,33,34,0,6,0,29,0,7,17,24,28,0,10,23,12,13,0,14,0,22,20,18,21,0,15,30,0,26,0);
// Name of SQL tables of dictionaries
$tabname=array();
@@ -121,7 +121,7 @@ $tabname[28]= MAIN_DB_PREFIX."c_holiday_types";
$tabname[29]= MAIN_DB_PREFIX."c_lead_status";
$tabname[30]= MAIN_DB_PREFIX."c_format_cards";
//$tabname[31]= MAIN_DB_PREFIX."accounting_system";
-$tabname[32]= MAIN_DB_PREFIX."c_accounting_category";
+//$tabname[32]= MAIN_DB_PREFIX."c_accounting_category";
$tabname[33]= MAIN_DB_PREFIX."c_hrm_department";
$tabname[34]= MAIN_DB_PREFIX."c_hrm_function";
@@ -158,7 +158,7 @@ $tablib[28]= "DictionaryHolidayTypes";
$tablib[29]= "DictionaryOpportunityStatus";
$tablib[30]= "DictionaryFormatCards";
//$tablib[31]= "DictionaryAccountancysystem";
-$tablib[32]= "DictionaryAccountancyCategory";
+//$tablib[32]= "DictionaryAccountancyCategory";
$tablib[33]= "DictionaryDepartment";
$tablib[34]= "DictionaryFunction";
@@ -195,7 +195,7 @@ $tabsql[28]= "SELECT h.rowid as rowid, h.code, h.label, h.affect, h.delay, h.new
$tabsql[29]= "SELECT rowid as rowid, code, label, percent, position, active FROM ".MAIN_DB_PREFIX."c_lead_status";
$tabsql[30]= "SELECT rowid, code, name, paper_size, orientation, metric, leftmargin, topmargin, nx, ny, spacex, spacey, width, height, font_size, custom_x, custom_y, active FROM ".MAIN_DB_PREFIX."c_format_cards";
//$tabsql[31]= "SELECT s.rowid as rowid, pcg_version, s.label, s.active FROM ".MAIN_DB_PREFIX."accounting_system as s";
-$tabsql[32]= "SELECT a.rowid as rowid, a.code as code, a.label, a.range_account, a.sens, a.category_type, a.formula, a.position as position, a.fk_country as country_id, c.code as country_code, c.label as country, a.active FROM ".MAIN_DB_PREFIX."c_accounting_category as a, ".MAIN_DB_PREFIX."c_country as c WHERE a.fk_country=c.rowid and c.active=1";
+//$tabsql[32]= "SELECT a.rowid as rowid, a.code as code, a.label, a.range_account, a.sens, a.category_type, a.formula, a.position as position, a.fk_country as country_id, c.code as country_code, c.label as country, a.active FROM ".MAIN_DB_PREFIX."c_accounting_category as a, ".MAIN_DB_PREFIX."c_country as c WHERE a.fk_country=c.rowid and c.active=1";
$tabsql[33]= "SELECT rowid, pos, code, label, active FROM ".MAIN_DB_PREFIX."c_hrm_department";
$tabsql[34]= "SELECT rowid, pos, code, label, c_level, active FROM ".MAIN_DB_PREFIX."c_hrm_function";
@@ -232,7 +232,7 @@ $tabsqlsort[28]="country ASC, code ASC";
$tabsqlsort[29]="position ASC";
$tabsqlsort[30]="code ASC";
//$tabsqlsort[31]="pcg_version ASC";
-$tabsqlsort[32]="position ASC";
+//$tabsqlsort[32]="position ASC";
$tabsqlsort[33]="code ASC";
$tabsqlsort[34]="code ASC";
@@ -269,7 +269,7 @@ $tabfield[28]= "code,label,affect,delay,newbymonth,country_id,country";
$tabfield[29]= "code,label,percent,position";
$tabfield[30]= "code,name,paper_size,orientation,metric,leftmargin,topmargin,nx,ny,spacex,spacey,width,height,font_size,custom_x,custom_y";
//$tabfield[31]= "pcg_version,label";
-$tabfield[32]= "code,label,range_account,sens,category_type,formula,position,country_id,country";
+//$tabfield[32]= "code,label,range_account,sens,category_type,formula,position,country_id,country";
$tabfield[33]= "code,label";
$tabfield[34]= "code,label";
@@ -306,7 +306,7 @@ $tabfieldvalue[28]= "code,label,affect,delay,newbymonth,country";
$tabfieldvalue[29]= "code,label,percent,position";
$tabfieldvalue[30]= "code,name,paper_size,orientation,metric,leftmargin,topmargin,nx,ny,spacex,spacey,width,height,font_size,custom_x,custom_y";
//$tabfieldvalue[31]= "pcg_version,label";
-$tabfieldvalue[32]= "code,label,range_account,sens,category_type,formula,position,country";
+//$tabfieldvalue[32]= "code,label,range_account,sens,category_type,formula,position,country";
$tabfieldvalue[33]= "code,label";
$tabfieldvalue[34]= "code,label";
@@ -343,7 +343,7 @@ $tabfieldinsert[28]= "code,label,affect,delay,newbymonth,fk_country";
$tabfieldinsert[29]= "code,label,percent,position";
$tabfieldinsert[30]= "code,name,paper_size,orientation,metric,leftmargin,topmargin,nx,ny,spacex,spacey,width,height,font_size,custom_x,custom_y";
//$tabfieldinsert[31]= "pcg_version,label";
-$tabfieldinsert[32]= "code,label,range_account,sens,category_type,formula,position,fk_country";
+//$tabfieldinsert[32]= "code,label,range_account,sens,category_type,formula,position,fk_country";
$tabfieldinsert[33]= "code,label";
$tabfieldinsert[34]= "code,label";
@@ -382,7 +382,7 @@ $tabrowid[28]= "";
$tabrowid[29]= "";
$tabrowid[30]= "";
//$tabrowid[31]= "";
-$tabrowid[32]= "";
+//$tabrowid[32]= "";
$tabrowid[33]= "rowid";
$tabrowid[34]= "rowid";
@@ -419,7 +419,7 @@ $tabcond[28]= ! empty($conf->holiday->enabled);
$tabcond[29]= ! empty($conf->projet->enabled);
$tabcond[30]= ! empty($conf->label->enabled);
//$tabcond[31]= ! empty($conf->accounting->enabled);
-$tabcond[32]= ! empty($conf->accounting->enabled);
+//$tabcond[32]= ! empty($conf->accounting->enabled);
$tabcond[33]= ! empty($conf->hrm->enabled);
$tabcond[34]= ! empty($conf->hrm->enabled);
@@ -456,7 +456,7 @@ $tabhelp[28] = array('affect'=>$langs->trans("FollowedByACounter"),'delay'=>$lan
$tabhelp[29] = array('code'=>$langs->trans("EnterAnyCode"), 'percent'=>$langs->trans("OpportunityPercent"), 'position'=>$langs->trans("PositionIntoComboList"));
$tabhelp[30] = array('code'=>$langs->trans("EnterAnyCode"), 'name'=>$langs->trans("LabelName"), 'paper_size'=>$langs->trans("LabelPaperSize"));
//$tabhelp[31] = array('pcg_version'=>$langs->trans("EnterAnyCode"));
-$tabhelp[32] = array('code'=>$langs->trans("EnterAnyCode"));
+//$tabhelp[32] = array('code'=>$langs->trans("EnterAnyCode"));
$tabhelp[33] = array('code'=>$langs->trans("EnterAnyCode"));
$tabhelp[34] = array('code'=>$langs->trans("EnterAnyCode"));
@@ -493,7 +493,7 @@ $tabfieldcheck[28] = array();
$tabfieldcheck[29] = array();
$tabfieldcheck[30] = array();
//$tabfieldcheck[31] = array();
-$tabfieldcheck[32] = array();
+//$tabfieldcheck[32] = array();
$tabfieldcheck[33] = array();
$tabfieldcheck[34] = array();
diff --git a/htdocs/admin/system/about.php b/htdocs/admin/system/about.php
index e9e2e0f1749..61780d51386 100644
--- a/htdocs/admin/system/about.php
+++ b/htdocs/admin/system/about.php
@@ -26,16 +26,13 @@
require '../../main.inc.php';
require_once DOL_DOCUMENT_ROOT.'/core/lib/admin.lib.php';
-require_once DOL_DOCUMENT_ROOT . '/core/lib/files.lib.php';
-require_once DOL_DOCUMENT_ROOT.'/core/lib/geturl.lib.php';
+require_once DOL_DOCUMENT_ROOT.'/core/lib/files.lib.php';
$langs->load("admin");
$langs->load("help");
$langs->load("members");
$langs->load("other");
-$youuselaststable = 0;
-
$action=GETPOST('action','alpha');
if (! $user->admin) accessforbidden();
@@ -48,12 +45,7 @@ $version='0.0';
* Actions
*/
-if ($action == 'getlastversion')
-{
- $result = getURLContent('http://sourceforge.net/projects/dolibarr/rss');
- //var_dump($result['content']);
- $sfurl = simplexml_load_string($result['content']);
-}
+// None
/*
@@ -63,7 +55,7 @@ if ($action == 'getlastversion')
llxHeader();
-print load_fiche_titre("Dolibarr",'','title_setup');
+print load_fiche_titre($langs->trans("ExternalResources"),'','title_setup');
print ''.img_picto_common('', 'dolibarr_box.png','height="120"').' ';
@@ -71,45 +63,6 @@ print ''.img_picto_common('', 'dolibarr_box.png
print ' ';
-print $langs->trans("CurrentVersion").' : '.DOL_VERSION.'';
-
-if (function_exists('curl_init'))
-{
- $conf->global->MAIN_USE_RESPONSE_TIMEOUT = 10;
-
- if ($action == 'getlastversion')
- {
- if ($sfurl)
- {
- while (! empty($sfurl->channel[0]->item[$i]->title) && $i < 10000)
- {
- $title=$sfurl->channel[0]->item[$i]->title;
- if (preg_match('/([0-9]+\.([0-9\.]+))/', $title, $reg))
- {
- $newversion=$reg[1];
- $newversionarray=explode('.',$newversion);
- $versionarray=explode('.',$version);
- //var_dump($newversionarray);var_dump($versionarray);
- if (versioncompare($newversionarray, $versionarray) > 0) $version=$newversion;
- }
- $i++;
- }
-
- // Show version
- print $langs->trans("LastStableVersion").' : '. (($version != '0.0')?$version:$langs->trans("Unknown")) .'';
- }
- else
- {
- print $langs->trans("LastStableVersion").' : ' .$langs->trans("UpdateServerOffline").'';
- }
- }
- else
- {
- print $langs->trans("LastStableVersion").' : ' .$langs->trans("Check").'';
- }
-}
-print ' ';
-
print $langs->trans("DolibarrLicense").' : ';
print ' - ';
print 'GNU-GPL v3+
';
@@ -201,6 +154,11 @@ $url='https://wiki.dolibarr.org/index.php/Subscribe';
if (preg_match('/^fr_/i',$langs->getDefaultLang())) $url='https://wiki.dolibarr.org/index.php/Adh%C3%A9rer';
if (preg_match('/^es_/i',$langs->getDefaultLang())) $url='https://wiki.dolibarr.org/index.php/Subscribirse';
print '- '.$langs->trans("SubscribeToFoundation").'
';
+print '
';
+
+print $langs->trans("SocialNetworks").':';
+
+print ' ';
print ' ';
-if ($youuselaststable)
+$showpromotemessage=1;
+if ($showpromotemessage)
{
- print ' ';
- print ' ';
-
$tmp=versiondolibarrarray();
- if ((empty($tmp[2]) && (strpos($tmp[1], '0') === 0)) || (strpos($tmp[2], '0') === 0))
+ if (is_numeric($tmp[2])) // Not alpha, beta or rc
{
- print $langs->trans("TitleExampleForMajorRelease").': ';
- print ' ';
- }
- else
- {
- print $langs->trans("TitleExampleForMaintenanceRelease").': ';
- print ' ';
+ print ' ';
+ print ' ';
+
+ if ((empty($tmp[2]) && (strpos($tmp[1], '0') === 0)) || (strpos($tmp[2], '0') === 0))
+ {
+ print $langs->trans("TitleExampleForMajorRelease").': ';
+ print ' ';
+ }
+ else
+ {
+ print $langs->trans("TitleExampleForMaintenanceRelease").': ';
+ print ' ';
+ }
}
}
diff --git a/htdocs/admin/system/dolibarr.php b/htdocs/admin/system/dolibarr.php
index d7bd421770c..6a5384da69a 100644
--- a/htdocs/admin/system/dolibarr.php
+++ b/htdocs/admin/system/dolibarr.php
@@ -25,15 +25,36 @@
require '../../main.inc.php';
require_once DOL_DOCUMENT_ROOT.'/core/lib/memory.lib.php';
require_once DOL_DOCUMENT_ROOT.'/core/lib/date.lib.php';
+require_once DOL_DOCUMENT_ROOT.'/core/lib/geturl.lib.php';
+require_once DOL_DOCUMENT_ROOT.'/core/lib/admin.lib.php';
+require_once DOL_DOCUMENT_ROOT.'/core/lib/files.lib.php';
$langs->load("admin");
$langs->load("install");
$langs->load("other");
+$action=GETPOST('action','alpha');
+
if (! $user->admin)
accessforbidden();
+$sfurl = '';
+$version='0.0';
+
+
+/*
+ * Actions
+ */
+
+if ($action == 'getlastversion')
+{
+ $result = getURLContent('http://sourceforge.net/projects/dolibarr/rss');
+ //var_dump($result['content']);
+ $sfurl = simplexml_load_string($result['content']);
+}
+
+
/*
* View
*/
@@ -52,23 +73,60 @@ print ' ';
print ' ';
print '| '.$langs->trans("Version").' | '.$langs->trans("Value").' | '."\n";
$var=!$var;
-print '| '.$langs->trans("VersionLastInstall").' | '.$conf->global->MAIN_VERSION_LAST_INSTALL.' | '."\n";
-$var=!$var;
-print '| '.$langs->trans("VersionLastUpgrade").' | '.$conf->global->MAIN_VERSION_LAST_UPGRADE.' | '."\n";
-$var=!$var;
-print '| '.$langs->trans("VersionProgram").' | '.DOL_VERSION;
+print ' | | '.$langs->trans("CurrentVersion").' ('.$langs->trans("Programs").') | '.DOL_VERSION;
// If current version differs from last upgrade
if (empty($conf->global->MAIN_VERSION_LAST_UPGRADE))
{
- // Compare version with last install database version (upgrades never occured)
- if (DOL_VERSION != $conf->global->MAIN_VERSION_LAST_INSTALL) print ' '.img_warning($langs->trans("RunningUpdateProcessMayBeRequired",DOL_VERSION,$conf->global->MAIN_VERSION_LAST_INSTALL));
+ // Compare version with last install database version (upgrades never occured)
+ if (DOL_VERSION != $conf->global->MAIN_VERSION_LAST_INSTALL) print ' '.img_warning($langs->trans("RunningUpdateProcessMayBeRequired",DOL_VERSION,$conf->global->MAIN_VERSION_LAST_INSTALL));
}
else
{
- // Compare version with last upgrade database version
- if (DOL_VERSION != $conf->global->MAIN_VERSION_LAST_UPGRADE) print ' '.img_warning($langs->trans("RunningUpdateProcessMayBeRequired",DOL_VERSION,$conf->global->MAIN_VERSION_LAST_UPGRADE));
+ // Compare version with last upgrade database version
+ if (DOL_VERSION != $conf->global->MAIN_VERSION_LAST_UPGRADE) print ' '.img_warning($langs->trans("RunningUpdateProcessMayBeRequired",DOL_VERSION,$conf->global->MAIN_VERSION_LAST_UPGRADE));
}
+
+if (function_exists('curl_init'))
+{
+ $conf->global->MAIN_USE_RESPONSE_TIMEOUT = 10;
+ print ' - ';
+ if ($action == 'getlastversion')
+ {
+ if ($sfurl)
+ {
+ while (! empty($sfurl->channel[0]->item[$i]->title) && $i < 10000)
+ {
+ $title=$sfurl->channel[0]->item[$i]->title;
+ if (preg_match('/([0-9]+\.([0-9\.]+))/', $title, $reg))
+ {
+ $newversion=$reg[1];
+ $newversionarray=explode('.',$newversion);
+ $versionarray=explode('.',$version);
+ //var_dump($newversionarray);var_dump($versionarray);
+ if (versioncompare($newversionarray, $versionarray) > 0) $version=$newversion;
+ }
+ $i++;
+ }
+
+ // Show version
+ print $langs->trans("LastStableVersion").' : '. (($version != '0.0')?$version:$langs->trans("Unknown")) .' ';
+ }
+ else
+ {
+ print $langs->trans("LastStableVersion").' : ' .$langs->trans("UpdateServerOffline").' ';
+ }
+ }
+ else
+ {
+ print $langs->trans("LastStableVersion").' : ' .$langs->trans("Check").' ';
+ }
+}
+
print ' | '."\n";
+$var=!$var;
+print '| '.$langs->trans("VersionLastUpgrade").' ('.$langs->trans("Database").') | '.$conf->global->MAIN_VERSION_LAST_UPGRADE.' | '."\n";
+$var=!$var;
+print '| '.$langs->trans("VersionLastInstall").' | '.$conf->global->MAIN_VERSION_LAST_INSTALL.' | '."\n";
print ' ';
print ' ';
print ' ';
diff --git a/htdocs/admin/tools/index.php b/htdocs/admin/tools/index.php
index 8da041d05da..6f773c5b35e 100644
--- a/htdocs/admin/tools/index.php
+++ b/htdocs/admin/tools/index.php
@@ -37,8 +37,8 @@ if (! $user->admin)
$form = new Form($db);
-$title=$langs->trans("SystemToolsArea");
-if (GETPOST('leftmenu') == 'admintools') $title=$langs->trans("ModulesSystemTools");
+$title=$langs->trans("AdminTools");
+//if (GETPOST('leftmenu') == 'admintools') $title=$langs->trans("ModulesSystemTools");
llxHeader('', $title);
diff --git a/htdocs/comm/index.php b/htdocs/comm/index.php
index 4e99b7072fc..c967f303648 100644
--- a/htdocs/comm/index.php
+++ b/htdocs/comm/index.php
@@ -77,57 +77,59 @@ print load_fiche_titre($langs->trans("CommercialArea"),'','title_commercial.png'
print ' ';
-// Search proposal
-if (! empty($conf->propal->enabled) && $user->rights->propal->lire)
+if (! empty($conf->global->MAIN_SEARCH_FORM_ON_HOME_AREAS)) // This is useless due to the global search combo
{
- $listofsearchfields['search_proposal']=array('text'=>'Proposal');
+ // Search proposal
+ if (! empty($conf->propal->enabled) && $user->rights->propal->lire)
+ {
+ $listofsearchfields['search_proposal']=array('text'=>'Proposal');
+ }
+ // Search customer order
+ if (! empty($conf->commande->enabled) && $user->rights->commande->lire)
+ {
+ $listofsearchfields['search_customer_order']=array('text'=>'CustomerOrder');
+ }
+ // Search supplier proposal
+ if (! empty($conf->supplier_proposal->enabled) && $user->rights->supplier_proposal->lire)
+ {
+ $listofsearchfields['search_supplier_proposal']=array('text'=>'SupplierProposalShort');
+ }
+ // Search supplier order
+ if (! empty($conf->fournisseur->enabled) && $user->rights->fournisseur->commande->lire)
+ {
+ $listofsearchfields['search_supplier_order']=array('text'=>'SupplierOrder');
+ }
+ // Search intervention
+ if (! empty($conf->ficheinter->enabled) && $user->rights->ficheinter->lire)
+ {
+ $listofsearchfields['search_intervention']=array('text'=>'Intervention');
+ }
+ // Search contract
+ if (! empty($conf->contrat->enabled) && $user->rights->contrat->lire)
+ {
+ $listofsearchfields['search_contract']=array('text'=>'Contract');
+ }
+
+ if (count($listofsearchfields))
+ {
+ print ' ';
+ print ' ';
+ }
}
-// Search customer order
-if (! empty($conf->commande->enabled) && $user->rights->commande->lire)
-{
- $listofsearchfields['search_customer_order']=array('text'=>'CustomerOrder');
-}
-// Search supplier proposal
-if (! empty($conf->supplier_proposal->enabled) && $user->rights->supplier_proposal->lire)
-{
- $listofsearchfields['search_supplier_proposal']=array('text'=>'SupplierProposalShort');
-}
-// Search supplier order
-if (! empty($conf->fournisseur->enabled) && $user->rights->fournisseur->commande->lire)
-{
- $listofsearchfields['search_supplier_order']=array('text'=>'SupplierOrder');
-}
-// Search intervention
-if (! empty($conf->ficheinter->enabled) && $user->rights->ficheinter->lire)
-{
- $listofsearchfields['search_intervention']=array('text'=>'Intervention');
-}
-// Search contract
-if (! empty($conf->contrat->enabled) && $user->rights->contrat->lire)
-{
- $listofsearchfields['search_contract']=array('text'=>'Contract');
-}
-
-if (count($listofsearchfields))
-{
- print ' ';
- print ' ';
-}
-
/*
diff --git a/htdocs/comm/mailing/card.php b/htdocs/comm/mailing/card.php
index b7f2a002105..ea4b21d78be 100644
--- a/htdocs/comm/mailing/card.php
+++ b/htdocs/comm/mailing/card.php
@@ -697,14 +697,19 @@ if ($action == 'create')
$htmltext.=$key.' = '.$langs->trans($val).' ';
}
$htmltext.='';
-
+
+
+ $availablelink=$form->textwithpicto($langs->trans("AvailableVariables"), $htmltext, 1, 'help', '', 0, 2, 'availvar');
+ //print ' '.img_picto($langs->trans("ClickToShowDescription"), $imginfo).'';
+
+
// Print mail form
- print load_fiche_titre($langs->trans("NewMailing"), $form->textwithpicto($langs->trans("AvailableVariables"), $htmltext), 'title_generic');
+ print load_fiche_titre($langs->trans("NewMailing"), $availablelink, 'title_generic');
dol_fiche_head();
print ' ';
- print '| '.$langs->trans("MailTitle").' | | ';
+ print '| '.$langs->trans("MailTitle").' | | ';
print '| '.$langs->trans("MailFrom").' | | ';
print '| '.$langs->trans("MailErrorsTo").' | | ';
@@ -720,7 +725,7 @@ if ($action == 'create')
print ' ';
print '';
- print '| '.$langs->trans("MailTopic").' | | ';
+ print '| '.$langs->trans("MailTopic").' | | ';
print '| '.$langs->trans("BackgroundColorByDefault").' | ';
print $htmlother->selectColor($_POST['bgcolor'],'bgcolor','new_mailing',0);
print ' | ';
diff --git a/htdocs/comm/mailing/index.php b/htdocs/comm/mailing/index.php
index ba8c2481411..0ea109960e7 100644
--- a/htdocs/comm/mailing/index.php
+++ b/htdocs/comm/mailing/index.php
@@ -49,19 +49,22 @@ print load_fiche_titre($langs->trans("MailingArea"));
print '';
-// Recherche emails
-$var=false;
-print ' \n";
+//if (! empty($conf->global->MAIN_SEARCH_FORM_ON_HOME_AREAS)) // This is useless due to the global search combo
+//{
+ // Recherche emails
+ $var=false;
+ print ' \n";
+//}
// Affiche stats de tous les modules de destinataires mailings
diff --git a/htdocs/comm/propal/index.php b/htdocs/comm/propal/index.php
index 4b03cb48429..82d57f721da 100644
--- a/htdocs/comm/propal/index.php
+++ b/htdocs/comm/propal/index.php
@@ -59,17 +59,17 @@ print load_fiche_titre($langs->trans("ProspectionArea"));
print ' ';
-/*
- * Search form
- */
-$var=false;
-print ' \n";
+if (! empty($conf->global->MAIN_SEARCH_FORM_ON_HOME_AREAS)) // This is useless due to the global search combo
+{
+ $var=false;
+ print ' \n";
+}
/*
diff --git a/htdocs/commande/index.php b/htdocs/commande/index.php
index 5731535697e..24e07b5ab07 100644
--- a/htdocs/commande/index.php
+++ b/htdocs/commande/index.php
@@ -62,16 +62,18 @@ print load_fiche_titre($langs->trans("OrdersArea"));
//print ' ';
print '';
-
-// Search customer orders
-$var=false;
-print ' \n";
+if (! empty($conf->global->MAIN_SEARCH_FORM_ON_HOME_AREAS)) // This is useless due to the global search combo
+{
+ // Search customer orders
+ $var=false;
+ print ' \n";
+}
/*
diff --git a/htdocs/compta/index.php b/htdocs/compta/index.php
index add2a4cfcb1..44d9aa4d3c1 100644
--- a/htdocs/compta/index.php
+++ b/htdocs/compta/index.php
@@ -61,6 +61,8 @@ if ($user->societe_id > 0)
$socid = $user->societe_id;
}
+$max=3;
+
/*
* Actions
@@ -88,44 +90,45 @@ print load_fiche_titre($langs->trans("AccountancyTreasuryArea"),'','title_accoun
print ' ';
-$max=3;
-
-
-// Search customer invoices
-if (! empty($conf->facture->enabled) && $user->rights->facture->lire)
+if (! empty($conf->global->MAIN_SEARCH_FORM_ON_HOME_AREAS)) // This is useless due to the global search combo
{
- $listofsearchfields['search_invoice']=array('text'=>'CustomerInvoice');
-}
-// Search supplier invoices
-if (! empty($conf->fournisseur->enabled) && $user->rights->fournisseur->lire)
-{
- $listofsearchfields['search_supplier_invoice']=array('text'=>'SupplierInvoice');
-}
-if (! empty($conf->don->enabled) && $user->rights->don->lire)
-{
- $langs->load("donations");
- $listofsearchfields['search_donation']=array('text'=>'Donation');
+ // Search customer invoices
+ if (! empty($conf->facture->enabled) && $user->rights->facture->lire)
+ {
+ $listofsearchfields['search_invoice']=array('text'=>'CustomerInvoice');
+ }
+ // Search supplier invoices
+ if (! empty($conf->fournisseur->enabled) && $user->rights->fournisseur->lire)
+ {
+ $listofsearchfields['search_supplier_invoice']=array('text'=>'SupplierInvoice');
+ }
+ if (! empty($conf->don->enabled) && $user->rights->don->lire)
+ {
+ $langs->load("donations");
+ $listofsearchfields['search_donation']=array('text'=>'Donation');
+ }
+
+ if (count($listofsearchfields))
+ {
+ print ' ';
+ print ' ';
+ }
}
-if (count($listofsearchfields))
-{
- print ' ';
- print ' ';
-}
/**
* Draft customers invoices
diff --git a/htdocs/compta/paiement.php b/htdocs/compta/paiement.php
index 4c2ed3b1aaa..e81d0e38345 100644
--- a/htdocs/compta/paiement.php
+++ b/htdocs/compta/paiement.php
@@ -369,7 +369,7 @@ if ($action == 'create' || $action == 'confirm_paiement' || $action == 'add_paie
}
if ($(\'#fieldchqemetteur\').val() == \'\')
{
- var emetteur = ('.$facture->type.' == 2) ? \''.dol_escape_htmltag($conf->global->MAIN_INFO_SOCIETE_NOM).'\' : jQuery(\'#thirdpartylabel\').val();
+ var emetteur = ('.$facture->type.' == 2) ? \''.dol_escape_js(dol_escape_htmltag($conf->global->MAIN_INFO_SOCIETE_NOM)).'\' : jQuery(\'#thirdpartylabel\').val();
$(\'#fieldchqemetteur\').val(emetteur);
}
}
diff --git a/htdocs/contrat/index.php b/htdocs/contrat/index.php
index 2a2d2d35891..b1d99c60d20 100644
--- a/htdocs/contrat/index.php
+++ b/htdocs/contrat/index.php
@@ -72,21 +72,25 @@ print load_fiche_titre($langs->trans("ContractsArea"),'','title_commercial.png')
print ' ';
-// Search contract
-if (! empty($conf->contrat->enabled))
+if (! empty($conf->global->MAIN_SEARCH_FORM_ON_HOME_AREAS)) // This is useless due to the global search combo
{
- $var=false;
- print ' \n";
- print " ";
+ // Search contract
+ if (! empty($conf->contrat->enabled))
+ {
+ $var=false;
+ print ' \n";
+ print " ";
+ }
}
+
/*
* Statistics
*/
@@ -251,7 +255,7 @@ if (! empty($conf->contrat->enabled) && $user->rights->contrat->lire)
$i = 0;
//$tot_ttc = 0;
- while ($i < $num && $i < 20)
+ while ($i < $num)
{
$obj = $db->fetch_object($resql);
print ' | ';
diff --git a/htdocs/core/boxes/box_lastlogin.php b/htdocs/core/boxes/box_lastlogin.php
new file mode 100644
index 00000000000..7211877a593
--- /dev/null
+++ b/htdocs/core/boxes/box_lastlogin.php
@@ -0,0 +1,113 @@
+
+ * Copyright (C) 2005-2017 Laurent Destailleur
+ * Copyright (C) 2014-2015 Frederic France
+ *
+ * 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
+ * the Free Software Foundation; either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program. If not, see .
+ */
+
+/**
+ * \file htdocs/core/boxes/box_lastlogin.php
+ * \ingroup core
+ * \brief Module to show box of bills, orders & propal of the current year
+ */
+
+include_once DOL_DOCUMENT_ROOT.'/core/boxes/modules_boxes.php';
+
+/**
+ * Class to manage the box of last login
+ */
+class box_lastlogin extends ModeleBoxes
+{
+ var $boxcode="lastlogin";
+ var $boximg="object_user";
+ var $boxlabel='BoxLoginInformation';
+ var $depends = array("user");
+
+ var $db;
+ var $param;
+ var $enabled = 1;
+
+ var $info_box_head = array();
+ var $info_box_contents = array();
+
+
+ /**
+ * Constructor
+ *
+ * @param DoliDB $db Database handler
+ * @param string $param More parameters
+ */
+ function __construct($db,$param)
+ {
+ global $conf;
+
+ $this->db=$db;
+ }
+
+ /**
+ * Charge les donnees en memoire pour affichage ulterieur
+ *
+ * @param int $max Maximum number of records to load
+ * @return void
+ */
+ function loadBox($max=5)
+ {
+ global $conf, $user, $langs, $db;
+
+ $textHead = $langs->trans("BoxLoginInformation");
+ $this->info_box_head = array(
+ 'text' => $textHead,
+ 'limit'=> dol_strlen($textHead),
+ );
+
+ $line=0;
+ $this->info_box_contents[$line][0] = array(
+ 'td' => '',
+ 'text' => $langs->trans("User"),
+ );
+ $this->info_box_contents[$line][1] = array(
+ 'td' => '',
+ 'text' => $user->getNomUrl(1),
+ 'asis' => 1
+ );
+
+ $line=1;
+ $this->info_box_contents[$line][0] = array(
+ 'td' => '',
+ 'text' => $langs->trans("PreviousConnexion"),
+ );
+ if ($user->datepreviouslogin) $tmp= dol_print_date($user->datepreviouslogin,"dayhour",'tzuser');
+ else $tmp= $langs->trans("Unknown");
+ $this->info_box_contents[$line][1] = array(
+ 'td' => '',
+ 'text' => $tmp,
+ );
+
+ }
+
+
+ /**
+ * Method to show box
+ *
+ * @param array $head Array with properties of box title
+ * @param array $contents Array with properties of box lines
+ * @param int $nooutput No print, only return string
+ * @return void
+ */
+ function showBox($head = null, $contents = null, $nooutput=0)
+ {
+ parent::showBox($this->info_box_head, $this->info_box_contents, $nooutput);
+ }
+}
diff --git a/htdocs/core/class/html.form.class.php b/htdocs/core/class/html.form.class.php
index 5637d52ace7..764c1feb875 100644
--- a/htdocs/core/class/html.form.class.php
+++ b/htdocs/core/class/html.form.class.php
@@ -404,11 +404,12 @@ class Form
* @param int $notabs 0=Include table and tr tags, 1=Do not include table and tr tags, 2=use div, 3=use span
* @param string $incbefore Include code before the text
* @param int $noencodehtmltext Do not encode into html entity the htmltext
+ * @param int $tooltiptrigger ''=Tooltip on hover, 'abc'=Tooltip on click (abc is a unique key)
* @return string Code html du tooltip (texte+picto)
* @see Use function textwithpicto if you can.
* TODO Move this as static as soon as everybody use textwithpicto or @Form::textwithtooltip
*/
- function textwithtooltip($text, $htmltext, $tooltipon = 1, $direction = 0, $img = '', $extracss = '', $notabs = 2, $incbefore = '', $noencodehtmltext = 0)
+ function textwithtooltip($text, $htmltext, $tooltipon = 1, $direction = 0, $img = '', $extracss = '', $notabs = 2, $incbefore = '', $noencodehtmltext = 0, $tooltiptrigger='')
{
global $conf;
@@ -427,12 +428,30 @@ class Form
if ($direction < 0) { $extracss=($extracss?$extracss.' ':'').'inline-block'; $extrastyle='padding: 0px; padding-left: 3px !important;'; }
if ($direction > 0) { $extracss=($extracss?$extracss.' ':'').'inline-block'; $extrastyle='padding: 0px; padding-right: 3px !important;'; }
+ $classfortooltip='classfortooltip';
+
+ $s='';$textfordialog='';
+
$htmltext=str_replace('"',""",$htmltext);
- if ($tooltipon == 2 || $tooltipon == 3) $paramfortooltipimg=' class="classfortooltip inline-block'.($extracss?' '.$extracss:'').'" style="padding: 0px;'.($extrastyle?' '.$extrastyle:'').'" title="'.($noencodehtmltext?$htmltext:dol_escape_htmltag($htmltext,1)).'"'; // Attribut to put on img tag to store tooltip
+ if ($tooltiptrigger != '')
+ {
+ $classfortooltip='classfortooltiponclick';
+ $textfordialog.=' '.$htmltext.' ';
+ }
+ if ($tooltipon == 2 || $tooltipon == 3)
+ {
+ $paramfortooltipimg=' class="'.$classfortooltip.' inline-block'.($extracss?' '.$extracss:'').'" style="padding: 0px;'.($extrastyle?' '.$extrastyle:'').'"';
+ if ($tooltiptrigger == '') $paramfortooltipimg.=' title="'.($noencodehtmltext?$htmltext:dol_escape_htmltag($htmltext,1)).'"'; // Attribut to put on img tag to store tooltip
+ else $paramfortooltipimg.=' dolid="'.$tooltiptrigger.'"';
+ }
else $paramfortooltipimg =($extracss?' class="'.$extracss.'"':'').($extrastyle?' style="'.$extrastyle.'"':''); // Attribut to put on td text tag
- if ($tooltipon == 1 || $tooltipon == 3) $paramfortooltiptd=' class="classfortooltip inline-block'.($extracss?' '.$extracss:'').'" style="padding: 0px;'.($extrastyle?' '.$extrastyle:'').'" title="'.($noencodehtmltext?$htmltext:dol_escape_htmltag($htmltext,1)).'"'; // Attribut to put on td tag to store tooltip
+ if ($tooltipon == 1 || $tooltipon == 3)
+ {
+ $paramfortooltiptd=' class="'.$classfortooltip.' inline-block'.($extracss?' '.$extracss:'').'" style="padding: 0px;'.($extrastyle?' '.$extrastyle:'').'" ';
+ if ($tooltiptrigger == '') $paramfortooltiptd.=' title="'.($noencodehtmltext?$htmltext:dol_escape_htmltag($htmltext,1)).'"'; // Attribut to put on td tag to store tooltip
+ else $paramfortooltiptd.=' dolid="'.$tooltiptrigger.'"';
+ }
else $paramfortooltiptd =($extracss?' class="'.$extracss.'"':'').($extrastyle?' style="'.$extrastyle.'"':''); // Attribut to put on td text tag
- $s="";
if (empty($notabs)) $s.='';
elseif ($notabs == 2) $s.='';
// Define value if value is before
@@ -441,7 +460,7 @@ class Form
if ($tag == 'td') {
$s .= ' valign="top" width="14"';
}
- $s.= '>'.$img.''.$tag.'>';
+ $s.= '>'.$textfordialog.$img.''.$tag.'>';
}
// Use another method to help avoid having a space in value in order to use this value with jquery
// Define label
@@ -450,7 +469,7 @@ class Form
if ($direction > 0) {
$s.='<'.$tag.$paramfortooltipimg;
if ($tag == 'td') $s .= ' valign="middle" width="14"';
- $s.= '>'.$img.''.$tag.'>';
+ $s.= '>'.$textfordialog.$img.''.$tag.'>';
}
if (empty($notabs)) $s.=' ';
elseif ($notabs == 2) $s.='';
@@ -468,9 +487,10 @@ class Form
* @param string $extracss Add a CSS style to td, div or span tag
* @param int $noencodehtmltext Do not encode into html entity the htmltext
* @param int $notabs 0=Include table and tr tags, 1=Do not include table and tr tags, 2=use div, 3=use span
+ * @param int $tooltiptrigger ''=Tooltip on hover, 'abc'=Tooltip on click (abc is a unique key)
* @return string HTML code of text, picto, tooltip
*/
- function textwithpicto($text, $htmltext, $direction = 1, $type = 'help', $extracss = '', $noencodehtmltext = 0, $notabs = 2)
+ function textwithpicto($text, $htmltext, $direction = 1, $type = 'help', $extracss = '', $noencodehtmltext = 0, $notabs = 2, $tooltiptrigger='')
{
global $conf;
@@ -498,13 +518,13 @@ class Form
}
if ($type == 'info') $img = img_help(0, $alt);
- elseif ($type == 'help') $img = img_help(1, $alt);
+ elseif ($type == 'help') $img = img_help(($tooltiptrigger != '' ? 2 : 1), $alt);
elseif ($type == 'superadmin') $img = img_picto($alt, 'redstar');
elseif ($type == 'admin') $img = img_picto($alt, 'star');
elseif ($type == 'warning') $img = img_warning($alt);
else $img = img_picto($alt, $type);
- return $this->textwithtooltip($text, $htmltext, 2, $direction, $img, $extracss, $notabs, '', $noencodehtmltext);
+ return $this->textwithtooltip($text, $htmltext, 2, $direction, $img, $extracss, $notabs, '', $noencodehtmltext, $tooltiptrigger);
}
/**
@@ -3246,11 +3266,11 @@ class Form
{
if ($selected == $res->rowid)
{
- $return.='';
+ $return.='';
}
else
{
- $return.='';
+ $return.='';
}
}
$return.='';
@@ -6005,7 +6025,7 @@ class Form
if ($object->photo) $ret.=" \n";
$ret.='';
}
diff --git a/htdocs/core/class/html.formaccounting.class.php b/htdocs/core/class/html.formaccounting.class.php
index 9abf943d948..8c7f6903bb3 100644
--- a/htdocs/core/class/html.formaccounting.class.php
+++ b/htdocs/core/class/html.formaccounting.class.php
@@ -50,13 +50,14 @@ class FormAccounting
* @param int $useempty Set to 1 if we want an empty value
* @param int $maxlen Max length of text in combo box
* @param int $help Add or not the admin help picto
+ * @param int $allcountries All countries
* @return void
*/
- function select_accounting_category($selected='',$htmlname='account_category', $useempty=0, $maxlen=64, $help=1)
+ function select_accounting_category($selected='',$htmlname='account_category', $useempty=0, $maxlen=0, $help=1, $allcountries=0)
{
global $db,$langs,$user,$mysoc;
- if (empty($mysoc->country_id) && empty($mysoc->country_code))
+ if (empty($mysoc->country_id) && empty($mysoc->country_code) && empty($allcountries))
{
dol_print_error('','Call to select_accounting_account with mysoc country not yet defined');
exit;
@@ -68,7 +69,7 @@ class FormAccounting
$sql.= " FROM ".MAIN_DB_PREFIX."c_accounting_category as c";
$sql.= " WHERE c.active = 1";
$sql.= " AND c.category_type = 0";
- $sql.= " AND c.fk_country = ".$mysoc->country_id;
+ if (empty($allcountries)) $sql.= " AND c.fk_country = ".$mysoc->country_id;
$sql.= " ORDER BY c.label ASC";
}
else
@@ -78,7 +79,7 @@ class FormAccounting
$sql.= " WHERE c.active = 1";
$sql.= " AND c.category_type = 0";
$sql.= " AND c.fk_country = co.rowid";
- $sql.= " AND co.code = '".$mysoc->country_code."'";
+ if (empty($allcountries)) $sql.= " AND co.code = '".$mysoc->country_code."'";
$sql.= " ORDER BY c.label ASC";
}
@@ -89,7 +90,7 @@ class FormAccounting
$num = $db->num_rows($resql);
if ($num)
{
- print ' | | |