forked from Wavyzz/dolibarr
Fix: Corrections diverses sur gestrion du contact. Plus de perte des infos saisies si champ nom non renseign.
Trad: Traduction civilit
This commit is contained in:
@@ -77,21 +77,21 @@ if ($contact->socid > 0)
|
||||
$objsoc = new Societe($db);
|
||||
$objsoc->fetch($contact->socid);
|
||||
|
||||
print '<tr><td>'.$langs->trans("Company").'</td><td colspan="3">'.$objsoc->nom_url.'</td></tr>';
|
||||
print '<tr><td width="15%">'.$langs->trans("Company").'</td><td colspan="3">'.$objsoc->nom_url.'</td></tr>';
|
||||
}
|
||||
else
|
||||
{
|
||||
print '<tr><td>'.$langs->trans("Company").'</td><td colspan="3">';
|
||||
print '<tr><td width="15%">'.$langs->trans("Company").'</td><td colspan="3">';
|
||||
print $langs->trans("ContactNotLinkedToCompany");
|
||||
print '</td></tr>';
|
||||
}
|
||||
|
||||
print '<tr><td>'.$langs->trans("UserTitle").'</td><td colspan="3">';
|
||||
print $contact->civilite_id;
|
||||
print $form->civilite_name($contact->civilite_id);
|
||||
print '</td></tr>';
|
||||
|
||||
print '<tr><td width="15%">'.$langs->trans("Lastname").'</td><td width="35%">'.$contact->name.'</td>';
|
||||
print '<td width="15%">'.$langs->trans("Firstname").'</td><td width="35%">'.$contact->firstname.'</td></tr>';
|
||||
print '<tr><td width="15%">'.$langs->trans("Lastname").'</td><td>'.$contact->name.'</td>';
|
||||
print '<td width="20%">'.$langs->trans("Firstname").'</td><td width="25%">'.$contact->firstname.'</td></tr>';
|
||||
|
||||
print '</table>';
|
||||
|
||||
|
||||
@@ -80,14 +80,8 @@ if ($_POST["action"] == 'add')
|
||||
array_push($error,$langs->trans("ErrorFieldRequired",$langs->trans("Lastname")));
|
||||
$_GET["action"]="create";
|
||||
}
|
||||
/*
|
||||
if (! $_POST["firstname"])
|
||||
{
|
||||
array_push($error,$langs->trans("ErrorFieldRequired",$langs->trans("Firstname")));
|
||||
$_GET["action"]="create";
|
||||
}
|
||||
*/
|
||||
if ($_POST["name"] && $_POST["firstname"])
|
||||
|
||||
if ($_POST["name"])
|
||||
{
|
||||
$id = $contact->create($user);
|
||||
if ($id > 0)
|
||||
|
||||
@@ -109,21 +109,21 @@ if ($_GET["action"] == 'edit')
|
||||
$objsoc = new Societe($db);
|
||||
$objsoc->fetch($contact->socid);
|
||||
|
||||
print '<tr><td>'.$langs->trans("Company").'</td><td colspan="3">'.$objsoc->nom_url.'</td>';
|
||||
print '<tr><td width="15%">'.$langs->trans("Company").'</td><td colspan="3">'.$objsoc->nom_url.'</td>';
|
||||
}
|
||||
else
|
||||
{
|
||||
print '<tr><td>'.$langs->trans("Company").'</td><td colspan="3">';
|
||||
print '<tr><td width="15%">'.$langs->trans("Company").'</td><td colspan="3">';
|
||||
print $langs->trans("ContactNotLinkedToCompany");
|
||||
print '</td></tr>';
|
||||
}
|
||||
|
||||
print '<tr><td>'.$langs->trans("UserTitle").'</td><td colspan="3">';
|
||||
print $contact->civilite_id;
|
||||
print $form->civilite_name($contact->civilite_id);
|
||||
print '</td></tr>';
|
||||
|
||||
print '<tr><td width="15%">'.$langs->trans("Lastname").'</td><td width="35%">'.$contact->nom.'</td>';
|
||||
print '<td width="15%">'.$langs->trans("Firstname").'</td><td width="35%">'.$contact->prenom.'</td>';
|
||||
print '<tr><td width="15%">'.$langs->trans("Lastname").'</td><td>'.$contact->nom.'</td>';
|
||||
print '<td width="20%">'.$langs->trans("Firstname").'</td><td width="25%">'.$contact->prenom.'</td>';
|
||||
|
||||
|
||||
print '<tr><td>'.$langs->trans("Birthday").'</td><td>';
|
||||
@@ -164,22 +164,22 @@ else
|
||||
$objsoc = new Societe($db);
|
||||
$objsoc->fetch($contact->socid);
|
||||
|
||||
print '<tr><td>'.$langs->trans("Company").'</td><td colspan="3">'.$objsoc->nom_url.'</td></tr>';
|
||||
print '<tr><td width="15%">'.$langs->trans("Company").'</td><td colspan="3">'.$objsoc->nom_url.'</td></tr>';
|
||||
}
|
||||
|
||||
else
|
||||
{
|
||||
print '<tr><td>'.$langs->trans("Company").'</td><td colspan="3">';
|
||||
print '<tr><td width="15%">'.$langs->trans("Company").'</td><td colspan="3">';
|
||||
print $langs->trans("ContactNotLinkedToCompany");
|
||||
print '</td></tr>';
|
||||
}
|
||||
|
||||
print '<tr><td>'.$langs->trans("UserTitle").'</td><td colspan="3">';
|
||||
print $contact->civilite_id;
|
||||
print $form->civilite_name($contact->civilite_id);
|
||||
print '</td></tr>';
|
||||
|
||||
print '<tr><td width="15%">'.$langs->trans("Lastname").'</td><td width="35%">'.$contact->name.'</td>';
|
||||
print '<td width="15%">'.$langs->trans("Firstname").'</td><td width="35%">'.$contact->firstname.'</td></tr>';
|
||||
print '<tr><td width="15%">'.$langs->trans("Lastname").'</td><td>'.$contact->name.'</td>';
|
||||
print '<td width="20%">'.$langs->trans("Firstname").'</td><td width="25%">'.$contact->firstname.'</td></tr>';
|
||||
|
||||
if ($contact->birthday && $contact->birthday > 0) {
|
||||
print '<tr><td>'.$langs->trans("Birthdate").'</td><td colspan="3">'.dolibarr_print_date($contact->birthday);
|
||||
|
||||
@@ -18,7 +18,6 @@
|
||||
*
|
||||
* $Id$
|
||||
* $Source$
|
||||
*
|
||||
*/
|
||||
|
||||
/**
|
||||
@@ -47,7 +46,6 @@ $v->setPhoneNumber($contact->phone_perso, "PREF;HOME;VOICE");
|
||||
|
||||
if ($contact->birthday) $v->setBirthday($contact->birthday);
|
||||
|
||||
// TODO finir le support des adresses dans les contacts
|
||||
$v->setAddress("", "", $contact->address, $contact->ville, "", $contact->cp, $contact->pays);
|
||||
|
||||
$v->setEmail($contact->email);
|
||||
@@ -59,15 +57,18 @@ $v->setEmail($contact->email);
|
||||
$db->close();
|
||||
|
||||
|
||||
// Renvoi VCard au navigateur
|
||||
// Renvoi la VCard au navigateur
|
||||
|
||||
$output = $v->getVCard();
|
||||
|
||||
$filename = sanitize_string(ereg_replace('^%20','',$v->getFileName()));
|
||||
Header("Content-Disposition: attachment; filename=$filename");
|
||||
$filename =trim(urldecode($v->getFileName())); // "Nom prenom.vcf"
|
||||
$filenameurlencoded = sanitize_string(urlencode($filename));
|
||||
//$filename = sanitize_string($filename);
|
||||
|
||||
Header("Content-Disposition: attachment; filename=\"$filename\"");
|
||||
Header("Content-Length: ".strlen($output));
|
||||
Header("Connection: close");
|
||||
Header("Content-Type: text/x-vCard; name=$filename");
|
||||
Header("Content-Type: text/x-vCard; name=\"$filename\"");
|
||||
|
||||
print $output;
|
||||
|
||||
|
||||
@@ -831,7 +831,6 @@ class Form
|
||||
* \brief Retourne la liste d<>roulante des civilite actives
|
||||
* \param selected civilite pr<70>-s<>lectionn<6E>e
|
||||
*/
|
||||
|
||||
function select_civilite($selected='')
|
||||
{
|
||||
global $conf,$langs;
|
||||
@@ -860,27 +859,39 @@ class Form
|
||||
print '<option value="'.$obj->code.'">';
|
||||
}
|
||||
// Si traduction existe, on l'utilise, sinon on prend le libell<6C> par d<>faut
|
||||
print ($langs->trans($obj->code)!=$obj->code?$langs->trans($obj->code):($obj->civilite!='-'?$obj->civilite:''));
|
||||
print ($langs->trans("Civility".$obj->code)!="Civility".$obj->code ? $langs->trans("Civility".$obj->code) : ($obj->civilite!='-'?$obj->civilite:''));
|
||||
print '</option>';
|
||||
$i++;
|
||||
}
|
||||
}
|
||||
print '</select>';
|
||||
}
|
||||
else {
|
||||
else
|
||||
{
|
||||
dolibarr_print_error($this->db);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* \brief Retourne le nom traduit de la civilit<69>
|
||||
* \param code Code de la civilit<69>
|
||||
* \return string Nom traduit de la civilit<69>
|
||||
*/
|
||||
function civilite_name($code)
|
||||
{
|
||||
global $langs;
|
||||
$langs->load("dict");
|
||||
return $langs->trans("Civility".$code)!="Civility".$code ? $langs->trans("Civility".$code) : $code;
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* \brief Retourne la liste d<>roulante des formes juridiques tous pays confondus ou pour un pays donn<6E>.
|
||||
* \remarks Dans le cas d'une liste tous pays confondu, on affiche une rupture sur le pays
|
||||
* \param selected Code forme juridique a pr<70>s<EFBFBD>lectionn<EFBFBD>
|
||||
* \param selected Code forme juridique a pr<70>s<EFBFBD>lectionn
|
||||
* \param pays_code 0=liste tous pays confondus, sinon code du pays <20> afficher
|
||||
*/
|
||||
|
||||
function select_forme_juridique($selected='',$pays_code=0)
|
||||
{
|
||||
global $conf,$langs;
|
||||
@@ -936,7 +947,8 @@ class Form
|
||||
}
|
||||
print '</select>';
|
||||
}
|
||||
else {
|
||||
else
|
||||
{
|
||||
dolibarr_print_error($this->db);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -30,6 +30,7 @@ Fax=Fax
|
||||
Zip=Zip Code
|
||||
Town=Town
|
||||
Web=Web
|
||||
##### Professionnal ID #####
|
||||
ProfId1=Professional ID 1
|
||||
ProfId2=Professional ID 2
|
||||
ProfId3=Professional ID 3
|
||||
|
||||
@@ -23,3 +23,8 @@ CountryCI=C
|
||||
CountrySN=Senegal
|
||||
CountryAR=Argentina
|
||||
CountryCM=Cameroun
|
||||
##### Civilities #####
|
||||
CivilityMME=Madam
|
||||
CivilityMR=Mister
|
||||
CivilityMLE=Miss
|
||||
CivilityMTRE=Ma<4D>tre
|
||||
|
||||
@@ -70,5 +70,5 @@ MailingNeedCommand=For securities reason, sending an emailing can only be perfor
|
||||
TargetsReset=Clear list
|
||||
ToClearAllRecipientsClickHere=To clear recipients' list for this emailing, click here
|
||||
ToAddRecipientsChooseHere=To add recipients, choose in those lists
|
||||
NbOfEMailingsReceived=Nb of mass emailings received
|
||||
NbOfEMailingsReceived=Mass emailings received
|
||||
IdRecord=ID record
|
||||
@@ -30,6 +30,7 @@ Fax=Fax
|
||||
Zip=Code postal
|
||||
Town=Ville
|
||||
Web=Web
|
||||
##### Professionnal ID #####
|
||||
ProfId1=ID professionnel 1
|
||||
ProfId2=ID professionnel 2
|
||||
ProfId3=ID professionnel 3
|
||||
|
||||
@@ -23,3 +23,8 @@ CountryCI=C
|
||||
CountrySN=S<>n<EFBFBD>gal
|
||||
CountryAR=Argentine
|
||||
CountryCM=Cameroun
|
||||
##### Civilities #####
|
||||
CivilityMME=Madame
|
||||
CivilityMR=Monsieur
|
||||
CivilityMLE=Mademoiselle
|
||||
CivilityMTRE=Ma<4D>tre
|
||||
|
||||
@@ -70,5 +70,5 @@ MailingNeedCommand=Pour des raisons de s
|
||||
TargetsReset=Vider liste
|
||||
ToClearAllRecipientsClickHere=Pour effacer la liste des destinataires de ce mailing, cliquer ici
|
||||
ToAddRecipientsChooseHere=Pour ajouter des destinataires, choisir dans les listes ci-dessous
|
||||
NbOfEMailingsReceived=Mailings de masse re<72>us
|
||||
NbOfEMailingsReceived=Mailings de masse re<72>us
|
||||
IdRecord=ID enregistrement
|
||||
Reference in New Issue
Block a user