';
-
+
// List of actions on element
include_once DOL_DOCUMENT_ROOT.'/core/class/html.formactions.class.php';
$formactions=new FormActions($db);
$somethingshown=$formactions->showactions($object,'propal',$socid);
-
+
print '
';
}
-
-
+
+
/*
* Action presend
*
@@ -2115,7 +2115,7 @@ else
include_once DOL_DOCUMENT_ROOT.'/core/lib/files.lib.php';
$fileparams = dol_most_recent_file($conf->propal->dir_output . '/' . $ref, preg_quote($object->ref,'/'));
$file=$fileparams['fullname'];
-
+
// Build document if it not exists
if (! $file || ! is_readable($file))
{
@@ -2129,7 +2129,7 @@ else
$outputlangs = new Translate("",$conf);
$outputlangs->setDefaultLang($newlang);
}
-
+
$result=propale_pdf_create($db, $object, GETPOST('model')?GETPOST('model'):$object->modelpdf, $outputlangs, $hidedetails, $hidedesc, $hideref);
if ($result <= 0)
{
@@ -2139,10 +2139,10 @@ else
$fileparams = dol_most_recent_file($conf->propal->dir_output . '/' . $ref, preg_quote($object->ref,'/'));
$file=$fileparams['fullname'];
}
-
+
print ' ';
print_titre($langs->trans('SendPropalByMail'));
-
+
// Create form object
include_once DOL_DOCUMENT_ROOT.'/core/class/html.formmail.class.php';
$formmail = new FormMail($db);
@@ -2151,18 +2151,17 @@ else
$formmail->fromname = $user->getFullName($langs);
$formmail->frommail = $user->email;
$formmail->withfrom=1;
- $formmail->withto=empty($_POST["sendto"])?1:$_POST["sendto"];
- $formmail->withtosocid=$soc->id;
- $formmail->withtocc=1;
- $formmail->withtoccsocid=0;
+ $liste=array();
+ foreach ($object->thirdparty->thirdparty_and_contact_email_array(1) as $key=>$value) $liste[$key]=$value;
+ $formmail->withto=GETPOST("sendto")?GETPOST("sendto"):$liste;
+ $formmail->withtocc=$liste;
$formmail->withtoccc=(! empty($conf->global->MAIN_EMAIL_USECCC)?$conf->global->MAIN_EMAIL_USECCC:false);
- $formmail->withtocccsocid=0;
$formmail->withtopic=$langs->trans('SendPropalRef','__PROPREF__');
$formmail->withfile=2;
$formmail->withbody=1;
$formmail->withdeliveryreceipt=1;
$formmail->withcancel=1;
-
+
// Tableau des substitutions
$formmail->substit['__PROPREF__']=$object->ref;
$formmail->substit['__SIGNATURE__']=$user->signature;
@@ -2172,16 +2171,16 @@ else
$formmail->param['models']='propal_send';
$formmail->param['id']=$object->id;
$formmail->param['returnurl']=$_SERVER["PHP_SELF"].'?id='.$object->id;
-
+
// Init list of files
if (GETPOST("mode")=='init')
{
$formmail->clear_attached_files();
$formmail->add_attached_files($file,basename($file),dol_mimetype($file));
}
-
+
$formmail->show_form();
-
+
print ' ';
}
}
diff --git a/htdocs/commande/fiche.php b/htdocs/commande/fiche.php
index ccaadefe2ee..03dde1a24ff 100644
--- a/htdocs/commande/fiche.php
+++ b/htdocs/commande/fiche.php
@@ -2418,12 +2418,11 @@ if ($action == 'send' && ! GETPOST('addfile') && ! GETPOST('removedfile') && ! G
$formmail->fromname = $user->getFullName($langs);
$formmail->frommail = $user->email;
$formmail->withfrom=1;
- $formmail->withto=GETPOST('sendto')?GETPOST('sendto'):1;
- $formmail->withtosocid=$soc->id;
- $formmail->withtocc=1;
- $formmail->withtoccsocid=0;
+ $liste=array();
+ foreach ($object->thirdparty->thirdparty_and_contact_email_array(1) as $key=>$value) $liste[$key]=$value;
+ $formmail->withto=GETPOST('sendto')?GETPOST('sendto'):$liste;
+ $formmail->withtocc=$liste;
$formmail->withtoccc=$conf->global->MAIN_EMAIL_USECCC;
- $formmail->withtocccsocid=0;
$formmail->withtopic=$langs->trans('SendOrderRef','__ORDERREF__');
$formmail->withfile=2;
$formmail->withbody=1;
diff --git a/htdocs/compta/facture.php b/htdocs/compta/facture.php
index 4295e1f6fa9..bccac8d8354 100644
--- a/htdocs/compta/facture.php
+++ b/htdocs/compta/facture.php
@@ -3403,12 +3403,11 @@ else if ($id > 0 || ! empty($ref))
$formmail->fromname = $user->getFullName($langs);
$formmail->frommail = $user->email;
$formmail->withfrom=1;
- $formmail->withto=empty($_POST["sendto"])?1:$_POST["sendto"];
- $formmail->withtosocid=$soc->id;
- $formmail->withtocc=1;
- $formmail->withtoccsocid=0;
+ $liste=array();
+ foreach ($object->thirdparty->thirdparty_and_contact_email_array(1) as $key=>$value) $liste[$key]=$value;
+ $formmail->withto=GETPOST('sendto')?GETPOST('sendto'):$liste;
+ $formmail->withtocc=$liste;
$formmail->withtoccc=$conf->global->MAIN_EMAIL_USECCC;
- $formmail->withtocccsocid=0;
$formmail->withtopic=$langs->transnoentities($topicmail,'__FACREF__');
$formmail->withfile=2;
$formmail->withbody=1;
diff --git a/htdocs/core/class/html.form.class.php b/htdocs/core/class/html.form.class.php
index f31cb0f741e..71673aca078 100644
--- a/htdocs/core/class/html.form.class.php
+++ b/htdocs/core/class/html.form.class.php
@@ -823,11 +823,13 @@ class Form
* @param string $showfunction Add function into label
* @param string $moreclass Add more class to class style
* @param string $showsoc Add company into label
+ * @param int $forcecombo Force to use combo box
+ * @param array $event Event options. Example: array(array('method'=>'getContacts', 'url'=>dol_buildpath('/core/ajax/contacts.php',1), 'htmlname'=>'contactid', 'params'=>array('add-customer-contact'=>'disabled')))
* @return int <0 if KO, Nb of contact in list if OK
*/
- function select_contacts($socid,$selected='',$htmlname='contactid',$showempty=0,$exclude='',$limitto='',$showfunction=0, $moreclass='', $showsoc=0)
+ function select_contacts($socid,$selected='',$htmlname='contactid',$showempty=0,$exclude='',$limitto='',$showfunction=0, $moreclass='', $showsoc=0, $forcecombo=0, $event=array())
{
- print $this->selectcontacts($socid,$selected,$htmlname,$showempty,$exclude,$limitto,$showfunction, $moreclass, $showsoc);
+ print $this->selectcontacts($socid,$selected,$htmlname,$showempty,$exclude,$limitto,$showfunction, $moreclass, $showsoc, $forcecombo, $event);
return $this->num;
}
@@ -844,9 +846,11 @@ class Form
* @param string $moreclass Add more class to class style
* @param bool $options_only Return options only (for ajax treatment)
* @param string $showsoc Add company into label
+ * @param int $forcecombo Force to use combo box
+ * @param array $event Event options. Example: array(array('method'=>'getContacts', 'url'=>dol_buildpath('/core/ajax/contacts.php',1), 'htmlname'=>'contactid', 'params'=>array('add-customer-contact'=>'disabled')))
* @return int <0 if KO, Nb of contact in list if OK
*/
- function selectcontacts($socid,$selected='',$htmlname='contactid',$showempty=0,$exclude='',$limitto='',$showfunction=0, $moreclass='', $options_only=false, $showsoc=0)
+ function selectcontacts($socid,$selected='',$htmlname='contactid',$showempty=0,$exclude='',$limitto='',$showfunction=0, $moreclass='', $options_only=false, $showsoc=0, $forcecombo=0, $event=array())
{
global $conf,$langs;
@@ -872,6 +876,11 @@ class Form
if ($resql)
{
$num=$this->db->num_rows($resql);
+
+ if ($conf->use_javascript_ajax && $conf->global->CONTACT_USE_SEARCH_TO_SELECT && ! $forcecombo)
+ {
+ $out.= ajax_combobox($htmlname, $event);
+ }
if ($htmlname != 'none' || $options_only) $out.= '
\n";
}
@@ -462,23 +451,11 @@ class FormMail
else
{
$out.= 'withtoccc) : (isset($_POST["sendtoccc"])?$_POST["sendtoccc"]:"") ).'" />';
- if (! empty($this->withto) && is_array($this->withto))
+ if (! empty($this->withtoccc) && is_array($this->withtoccc))
{
$out.= " ".$langs->trans("or")." ";
$out.= $form->selectarray("receiverccc", $this->withto, GETPOST("receiverccc"), 1);
}
- if (! empty($this->withtocccsocid) && $this->withtocccsocid > 0) // deprecated. TODO Remove this. Instead, fill withto with array before calling method.
- {
- $liste=array();
- $soc=new Societe($this->db);
- $soc->fetch($this->withtosocid);
- foreach ($soc->thirdparty_and_contact_email_array(1) as $key=>$value)
- {
- $liste[$key]=$value;
- }
- $out.= " ".$langs->trans("or")." ";
- $out.= $form->selectarray("receiverccc", $liste, GETPOST("receiverccc"), 1);
- }
}
//if (! empty($conf->global->MAIN_MAIL_AUTOCOPY_TO)) print ' '.info_admin("+ ".$conf->global->MAIN_MAIL_AUTOCOPY_TO,1);
$out.= "\n";
diff --git a/htdocs/expedition/fiche.php b/htdocs/expedition/fiche.php
index 90850fce683..21289f60864 100644
--- a/htdocs/expedition/fiche.php
+++ b/htdocs/expedition/fiche.php
@@ -1443,12 +1443,11 @@ else
$formmail->fromname = $user->getFullName($langs);
$formmail->frommail = $user->email;
$formmail->withfrom=1;
- $formmail->withto=GETPOST('sendto','int')?GETPOST('sendto','int'):1;
- $formmail->withtosocid=$soc->id;
- $formmail->withtocc=1;
- $formmail->withtoccsocid=0;
+ $liste=array();
+ foreach ($object->thirdparty->thirdparty_and_contact_email_array(1) as $key=>$value) $liste[$key]=$value;
+ $formmail->withto=GETPOST("sendto")?GETOST("sendto"):$liste;
+ $formmail->withtocc=$liste;
$formmail->withtoccc=$conf->global->MAIN_EMAIL_USECCC;
- $formmail->withtocccsocid=0;
$formmail->withtopic=$langs->trans('SendShippingRef','__SHIPPINGREF__');
$formmail->withfile=2;
$formmail->withbody=1;
diff --git a/htdocs/fichinter/fiche.php b/htdocs/fichinter/fiche.php
index 11e1eabd782..b2db591eefc 100644
--- a/htdocs/fichinter/fiche.php
+++ b/htdocs/fichinter/fiche.php
@@ -1487,12 +1487,11 @@ else if ($id > 0 || ! empty($ref))
$formmail->fromname = $user->getFullName($langs);
$formmail->frommail = $user->email;
$formmail->withfrom=1;
- $formmail->withto=(!GETPOST('sendto','alpha'))?1:GETPOST('sendto','alpha');
- $formmail->withtosocid=$societe->id;
- $formmail->withtocc=1;
- $formmail->withtoccsocid=0;
+ $liste=array();
+ foreach ($object->thirdparty->thirdparty_and_contact_email_array(1) as $key=>$value) $liste[$key]=$value;
+ $formmail->withto=GETPOST("sendto")?GETOST("sendto"):$liste;
+ $formmail->withtocc=$liste;
$formmail->withtoccc=$conf->global->MAIN_EMAIL_USECCC;
- $formmail->withtocccsocid=0;
$formmail->withtopic=$langs->trans('SendInterventionRef','__FICHINTERREF__');
$formmail->withfile=2;
$formmail->withbody=1;
diff --git a/htdocs/fourn/commande/fiche.php b/htdocs/fourn/commande/fiche.php
index ee802c3dc0f..24ecd0690b0 100644
--- a/htdocs/fourn/commande/fiche.php
+++ b/htdocs/fourn/commande/fiche.php
@@ -1819,12 +1819,11 @@ if (! empty($object->id))
$formmail->fromname = $user->getFullName($langs);
$formmail->frommail = $user->email;
$formmail->withfrom=1;
- $formmail->withto=empty($_POST["sendto"])?1:$_POST["sendto"];
- $formmail->withtosocid=$object->thirdparty->id;
- $formmail->withtocc=1;
- $formmail->withtoccsocid=0;
+ $liste=array();
+ foreach ($object->thirdparty->thirdparty_and_contact_email_array(1) as $key=>$value) $liste[$key]=$value;
+ $formmail->withto=GETPOST("sendto")?GETOST("sendto"):$liste;
+ $formmail->withtocc=$liste;
$formmail->withtoccc=(! empty($conf->global->MAIN_EMAIL_USECCC)?$conf->global->MAIN_EMAIL_USECCC:false);
- $formmail->withtocccsocid=0;
$formmail->withtopic=$langs->trans('SendOrderRef','__ORDERREF__');
$formmail->withfile=2;
$formmail->withbody=1;
diff --git a/htdocs/fourn/facture/fiche.php b/htdocs/fourn/facture/fiche.php
index be8b7f6664d..571742a977d 100644
--- a/htdocs/fourn/facture/fiche.php
+++ b/htdocs/fourn/facture/fiche.php
@@ -2075,12 +2075,11 @@ else
$formmail->fromname = $user->getFullName($langs);
$formmail->frommail = $user->email;
$formmail->withfrom=1;
- $formmail->withto=empty($_POST["sendto"])?1:$_POST["sendto"];
- $formmail->withtosocid=$societe->id;
- $formmail->withtocc=1;
- $formmail->withtoccsocid=0;
+ $liste=array();
+ foreach ($object->thirdparty->thirdparty_and_contact_email_array(1) as $key=>$value) $liste[$key]=$value;
+ $formmail->withto=GETPOST("sendto")?GETOST("sendto"):$liste;
+ $formmail->withtocc=$liste;
$formmail->withtoccc=$conf->global->MAIN_EMAIL_USECCC;
- $formmail->withtocccsocid=0;
$formmail->withtopic=$langs->trans('SendBillRef','__FACREF__');
$formmail->withfile=2;
$formmail->withbody=1;
diff --git a/htdocs/holiday/class/holiday.class.php b/htdocs/holiday/class/holiday.class.php
index 3974a93641a..9c20caed835 100644
--- a/htdocs/holiday/class/holiday.class.php
+++ b/htdocs/holiday/class/holiday.class.php
@@ -32,14 +32,14 @@ class Holiday extends CommonObject
{
public $element='holiday';
public $table_element='holiday';
-
+
var $db;
var $error;
var $errors=array();
var $rowid;
var $ref;
-
+
var $fk_user;
var $date_create='';
var $description;
@@ -72,16 +72,24 @@ class Holiday extends CommonObject
function __construct($db)
{
$this->db = $db;
-
- // Mets à jour les congés payés en début de mois
- $this->updateSoldeCP();
-
- // Vérifie le nombre d'utilisateur et mets à jour si besoin
- $this->verifNbUsers($this->countActiveUsers(),$this->getConfCP('nbUser'));
- return 1;
}
+ /**
+ * updateSold
+ *
+ * @return int Return 1
+ */
+ function updateSold()
+ {
+ // Mets à jour les congés payés en début de mois
+ $this->updateSoldeCP();
+
+ // Vérifie le nombre d'utilisateur et mets à jour si besoin
+ $this->verifNbUsers($this->countActiveUsers(),$this->getConfCP('nbUser'));
+ return 1;
+ }
+
/**
* Créer un congés payés dans la base de données
*
@@ -358,10 +366,10 @@ class Holiday extends CommonObject
$sql.= " uu.name as user_lastname,";
$sql.= " uu.firstname as user_firstname,";
-
+
$sql.= " ua.name as validator_lastname,";
$sql.= " ua.firstname as validator_firstname";
-
+
$sql.= " FROM ".MAIN_DB_PREFIX."holiday as cp, ".MAIN_DB_PREFIX."user as uu, ".MAIN_DB_PREFIX."user as ua";
$sql.= " WHERE cp.fk_user = uu.rowid AND cp.fk_validator = ua.rowid "; // Hack pour la recherche sur le tableau
@@ -415,10 +423,10 @@ class Holiday extends CommonObject
$tab_result[$i]['user_firstname'] = $obj->user_firstname;
$tab_result[$i]['user_lastname'] = $obj->user_lastname;
-
+
$tab_result[$i]['validator_firstname'] = $obj->validator_firstname;
$tab_result[$i]['validator_lastname'] = $obj->validator_lastname;
-
+
$i++;
}
// Retourne 1 et ajoute le tableau à la variable
@@ -601,13 +609,13 @@ class Holiday extends CommonObject
{
$this->fetchByUser($fk_user,'','');
- foreach($this->holiday as $infos_CP)
+ foreach($this->holiday as $infos_CP)
{
if ($infos_CP['statut'] == 4) continue; // ignore not validated holidays
if ($infos_CP['statut'] == 5) continue; // ignore not validated holidays
-
+
// TODO Also use halfday for the check
- if ($dateDebut >= $infos_CP['date_debut'] && $dateDebut <= $infos_CP['date_fin'] || $dateFin <= $infos_CP['date_fin'] && $dateFin >= $infos_CP['date_debut'])
+ if ($dateDebut >= $infos_CP['date_debut'] && $dateDebut <= $infos_CP['date_fin'] || $dateFin <= $infos_CP['date_fin'] && $dateFin >= $infos_CP['date_debut'])
{
return false;
}
@@ -627,23 +635,24 @@ class Holiday extends CommonObject
function getNomUrl($withpicto=0)
{
global $langs;
-
+
$result='';
-
+
$lien = '';
$lienfin='';
-
+
$picto='holiday';
-
+
$label=$langs->trans("Show").': '.$this->ref;
-
+
if ($withpicto) $result.=($lien.img_object($label,$picto).$lienfin);
if ($withpicto && $withpicto != 2) $result.=' ';
if ($withpicto != 2) $result.=$lien.$this->ref.$lienfin;
return $result;
+
}
-
+
/**
* Returns the label status
*
@@ -654,7 +663,7 @@ class Holiday extends CommonObject
{
return $this->LibStatut($this->statut, $mode, $this->date_debut);
}
-
+
/**
* Returns the label of a statut
*
@@ -678,7 +687,7 @@ class Holiday extends CommonObject
if ($mode == 2)
{
$pictoapproved='statut6';
- if (! empty($startdate) && $startdate > dol_now()) $pictoapproved='statut4';
+ if (! empty($startdate) && $startdate > dol_now()) $pictoapproved='statut4';
if ($statut == 1) return img_picto($langs->trans('DraftCP'),'statut0').' '.$langs->trans('DraftCP'); // Draft
if ($statut == 2) return img_picto($langs->trans('ToValidateCP'),'statut1').' '.$langs->trans('ToValidateCP'); // Waiting approval
if ($statut == 3) return img_picto($langs->trans('ValidateCP'),$pictoapproved).' '.$langs->trans('ValidateCP');
@@ -688,18 +697,18 @@ class Holiday extends CommonObject
if ($mode == 5)
{
$pictoapproved='statut6';
- if (! empty($startdate) && $startdate > dol_now()) $pictoapproved='statut4';
+ if (! empty($startdate) && $startdate > dol_now()) $pictoapproved='statut4';
if ($statut == 1) return $langs->trans('DraftCP').' '.img_picto($langs->trans('DraftCP'),'statut0'); // Draft
if ($statut == 2) return $langs->trans('ToValidateCP').' '.img_picto($langs->trans('ToValidateCP'),'statut1'); // Waiting approval
if ($statut == 3) return $langs->trans('ValidateCP').' '.img_picto($langs->trans('ValidateCP'),$pictoapproved);
if ($statut == 4) return $langs->trans('CancelCP').' '.img_picto($langs->trans('CancelCP'),'statut5');
if ($statut == 5) return $langs->trans('RefuseCP').' '.img_picto($langs->trans('RefuseCP'),'statut5');
}
-
+
return $statut;
}
-
+
/**
* Affiche un select HTML des statuts de congés payés
*
@@ -857,19 +866,21 @@ class Holiday extends CommonObject
{
// Si mise à jour pour tout le monde en début de mois
$now=dol_now();
-
+
// Mois actuel
$month = date('m',$now);
$lastUpdate = $this->getConfCP('lastUpdate');
- $monthLastUpdate = date('m', $lastUpdate);
+ $monthLastUpdate = $lastUpdate[4].$lastUpdate[5];
+ //print 'month: '.$month.' '.$lastUpdate.' '.$monthLastUpdate;
// Si la date du mois n'est pas la même que celle sauvegardée, on met à jour le timestamp
if ($month != $monthLastUpdate)
{
$sql = "UPDATE ".MAIN_DB_PREFIX."holiday_config SET";
- $sql.= " value = '".$this->db->idate($now)."'";
+ $sql.= " value = '".dol_print_date($now,'%Y%m%d%H%M%S')."'";
$sql.= " WHERE name = 'lastUpdate'";
+ dol_syslog(get_class($this).'::updateSoldeCP sql='.$sql);
$result = $this->db->query($sql);
// On ajoute x jours à chaque utilisateurs
diff --git a/htdocs/holiday/common.inc.php b/htdocs/holiday/common.inc.php
index 8953352973b..133177df614 100644
--- a/htdocs/holiday/common.inc.php
+++ b/htdocs/holiday/common.inc.php
@@ -50,7 +50,7 @@ $sql.= " WHERE name = 'userGroup'";
$result = $db->query($sql);
$obj = $db->fetch_object($result);
-if ($obj->value == null)
+if ($obj->value == null || $obj->value < 0)
{
llxHeader('',$langs->trans('CPTitreMenu'));
diff --git a/htdocs/holiday/index.php b/htdocs/holiday/index.php
index c9f77a3f63e..19944b16ae8 100644
--- a/htdocs/holiday/index.php
+++ b/htdocs/holiday/index.php
@@ -73,6 +73,9 @@ $search_statut = GETPOST('select_statut');
$holiday = new Holiday($db);
$holidaystatic=new Holiday($db);
+// Update sold
+$holiday->updateSold();
+
$max_year = 5;
$min_year = 10;
$filter='';
diff --git a/htdocs/langs/en_US/admin.lang b/htdocs/langs/en_US/admin.lang
index 0fafedaf2b0..42924eb253f 100644
--- a/htdocs/langs/en_US/admin.lang
+++ b/htdocs/langs/en_US/admin.lang
@@ -50,6 +50,7 @@ DisableJavascript=Disable JavaScript and Ajax functions
ConfirmAjax=Use Ajax confirmation popups
UseSearchToSelectCompany=Use autocompletion fields to choose third parties (instead of using a list box).
Also if you have a large number of third parties (> 100 000), you can increase speed by setting constant SOCIETE_DONOTSEARCH_ANYWHERE to 1 in Setup->Other. Search will then be limited to start of string.
ActivityStateToSelectCompany= Add a filter option to show/hide thirdparties which are currently in activity or has ceased it
+UseSearchToSelectContact=Use autocompletion fields to choose contact (instead of using a list box).
Also if you have a large number of third parties (> 100 000), you can increase speed by setting constant CONTACT_DONOTSEARCH_ANYWHERE to 1 in Setup->Other. Search will then be limited to start of string.
SearchFilter=Search filters options
NumberOfKeyToSearch=Nbr of characters to trigger search: %s
ViewFullDateActions=Show full dates events in the third sheet
diff --git a/htdocs/langs/en_US/agenda.lang b/htdocs/langs/en_US/agenda.lang
index 3d180e7b747..2355c112194 100644
--- a/htdocs/langs/en_US/agenda.lang
+++ b/htdocs/langs/en_US/agenda.lang
@@ -15,7 +15,7 @@ MyEvents=My events
OtherEvents=Other events
ListOfActions=List of events
Location=Location
-EventOnFullDay=Event on full day
+EventOnFullDay=Event on all day(s)
SearchAnAction= Search an event/task
MenuToDoActions= All incomplete events
MenuDoneActions= All terminated events
diff --git a/htdocs/langs/es_ES/dict.lang b/htdocs/langs/es_ES/dict.lang
index bf0b59e3ef1..c0cd7042334 100644
--- a/htdocs/langs/es_ES/dict.lang
+++ b/htdocs/langs/es_ES/dict.lang
@@ -85,7 +85,7 @@ CountryDM=Dominica
CountryDO=República Dominicana
CountryEC=Ecuador
CountryEG=Egipto
-CountrySV=Salvador
+CountrySV=El Salvador
CountryGQ=Guinea Ecuatorial
CountryER=Eritrea
CountryEE=Estonia
diff --git a/htdocs/langs/fr_FR/admin.lang b/htdocs/langs/fr_FR/admin.lang
index 75518421e5a..802bbb28191 100644
--- a/htdocs/langs/fr_FR/admin.lang
+++ b/htdocs/langs/fr_FR/admin.lang
@@ -49,6 +49,7 @@ DisableJavascript= Désactiver les fonctions Javascript et Ajax
ConfirmAjax= Utiliser les popups de confirmation Ajax
UseSearchToSelectCompany= Utiliser un champ avec autocomplétion pour choisir un tiers (plutôt qu'une liste déroulante).
Notez que si vous avez un nombre important de produits ou services (> 100 000), vous pouvez améliorer les performances en définissant la constante SOCIETE_DONOTSEARCH_ANYWHERE à 1 dans Configuration->Divers. La recherche sera alors limitée au début de la chaine.
ActivityStateToSelectCompany= Ajouter une option de filtrage lors des recherches pour afficher/masquer les tiers en exercice ou ayant cessés d'exercer
+UseSearchToSelectContact= Utiliser un champ avec autocomplétion pour choisir un contact (plutôt qu'une liste déroulante).
Notez que si vous avez un nombre important de produits ou services (> 100 000), vous pouvez améliorer les performances en définissant la constante CONTACT_DONOTSEARCH_ANYWHERE à 1 dans Configuration->Divers. La recherche sera alors limitée au début de la chaine.
SearchFilter=Options des filtres de recherche
NumberOfKeyToSearch=Nb carac. déclenchant recherche: %s
ViewFullDateActions= Visualiser les dates des actions en entier dans la fiche tiers
diff --git a/htdocs/langs/fr_FR/agenda.lang b/htdocs/langs/fr_FR/agenda.lang
index d91f836d9b9..33555be6951 100644
--- a/htdocs/langs/fr_FR/agenda.lang
+++ b/htdocs/langs/fr_FR/agenda.lang
@@ -14,7 +14,7 @@ EventsNb=Nombre d'événements
MyEvents=Mes événements
OtherEvents=Autres événements
ListOfActions=Liste des événements
-EventOnFullDay=Événement sur la journée
+EventOnFullDay=Événement sur la(les) journée(s)
Location=Lieu
SearchAnAction=Rechercher un événement/tâche
MenuToDoActions=Les événem. incomplets
diff --git a/htdocs/societe/admin/societe.php b/htdocs/societe/admin/societe.php
index 3bb95dd10ee..1b0efa2c4b2 100644
--- a/htdocs/societe/admin/societe.php
+++ b/htdocs/societe/admin/societe.php
@@ -82,6 +82,21 @@ if ($action == 'COMPANY_USE_SEARCH_TO_SELECT')
}
}
+if ($action == 'CONTACT_USE_SEARCH_TO_SELECT')
+{
+ $contactsearch = GETPOST('activate_CONTACT_USE_SEARCH_TO_SELECT','alpha');
+ $res = dolibarr_set_const($db, "CONTACT_USE_SEARCH_TO_SELECT", $contactsearch,'chaine',0,'',$conf->entity);
+ if (! $res > 0) $error++;
+ if (! $error)
+ {
+ $mesg = "".$langs->trans("SetupSaved")."";
+ }
+ else
+ {
+ $mesg = "".$langs->trans("Error")."";
+ }
+}
+
// Define constants for submodules that contains parameters (forms with param1, param2, ... and value1, value2, ...)
if ($action == 'setModuleOptions')
{
@@ -647,9 +662,37 @@ else
print '';
print '';
+
+$var=!$var;
+print '
';
+
dol_fiche_end();
$db->close();
diff --git a/htdocs/user/fiche.php b/htdocs/user/fiche.php
index 92ebb740523..cf0e0170c94 100644
--- a/htdocs/user/fiche.php
+++ b/htdocs/user/fiche.php
@@ -324,9 +324,7 @@ if ($action == 'update' && ! $_POST["cancel"])
$object->firstname = GETPOST("prenom");
$object->login = GETPOST("login");
$object->pass = GETPOST("password");
- if($user->admin == 1) { // A user can only be set admin by an admin
- $object->admin = GETPOST("admin");
- }
+ $object->admin = empty($user->admin)?0:GETPOST("admin"); // A user can only be set admin by an admin
$object->office_phone=GETPOST("office_phone");
$object->office_fax = GETPOST("office_fax");
$object->user_mobile= GETPOST("user_mobile");