Trad: Quelques traductions
Qual: Uniformisation de la gestion des onglets sur le mme standard.
This commit is contained in:
parent
1c91ff7a1f
commit
b1cc6b234e
@ -136,34 +136,49 @@ if ($_POST["action"] == 'update')
|
||||
llxHeader();
|
||||
$form = new Form($db);
|
||||
|
||||
|
||||
/*
|
||||
* Onglets
|
||||
*/
|
||||
if ($_GET["id"] > 0)
|
||||
{
|
||||
# Si edition contact deja existant
|
||||
|
||||
$contact = new Contact($db);
|
||||
$contact->fetch($_GET["id"], $user);
|
||||
|
||||
|
||||
$h=0;
|
||||
$head[$h][0] = DOL_URL_ROOT.'fiche.php?id='.$_GET["id"];
|
||||
$head[$h][1] = "Général";
|
||||
$hselected=$h;
|
||||
$h++;
|
||||
|
||||
$head[$h][0] = DOL_URL_ROOT.'perso.php?id='.$_GET["id"];
|
||||
$head[$h][1] = 'Informations personnelles';
|
||||
$h++;
|
||||
|
||||
$head[$h][0] = DOL_URL_ROOT.'vcard.php?id='.$_GET["id"];
|
||||
$head[$h][1] = $langs->trans("VCard");
|
||||
$h++;
|
||||
|
||||
$head[$h][0] = DOL_URL_ROOT.'info.php?id='.$_GET["id"];
|
||||
$head[$h][1] = $langs->trans("Info");
|
||||
$h++;
|
||||
|
||||
dolibarr_fiche_head($head, $hselected, $contact->firstname.' '.$contact->name);
|
||||
}
|
||||
|
||||
|
||||
/*
|
||||
* Confirmation de la suppression du contact
|
||||
*
|
||||
*/
|
||||
if ($_GET["action"] == 'delete')
|
||||
{
|
||||
$form->form_confirm($_SERVER["PHP_SELF"]."?id=".$_GET["id"],"Supprimer le contact","Êtes-vous sûr de vouloir supprimer ce contact ?","confirm_delete");
|
||||
}
|
||||
|
||||
|
||||
|
||||
/*
|
||||
* Onglets
|
||||
*/
|
||||
print '<div class="tabs">';
|
||||
if ($_GET["id"] > 0)
|
||||
{
|
||||
# Si edition contact deja existant
|
||||
print '<a href="fiche.php?id='.$_GET["id"].'" id="active" class="tab">Général</a>';
|
||||
print '<a href="perso.php?id='.$_GET["id"].'" class="tab">Informations personnelles</a>';
|
||||
print '<a class="tab" href="vcard.php?id='.$_GET["id"].'">VCard</a>';
|
||||
print '<a class="tab" href="info.php?id='.$_GET["id"].'">Info</a>';
|
||||
$form->form_confirm($_SERVER["PHP_SELF"]."?id=".$_GET["id"],"Supprimer le contact","Êtes-vous sûr de vouloir supprimer ce contact ?","confirm_delete");
|
||||
print '<br>';
|
||||
}
|
||||
else {
|
||||
print '<a href="'.$_SERVER["PHP_SELF"].'?socid='.$_GET["socid"].'&action=create" id="active" class="tab">Général</a>';
|
||||
}
|
||||
print '</div>';
|
||||
|
||||
|
||||
// Affiche les erreurs
|
||||
if (sizeof($error))
|
||||
@ -174,8 +189,6 @@ if (sizeof($error))
|
||||
}
|
||||
|
||||
|
||||
print '<div class="tabBar">';
|
||||
|
||||
if ($_GET["socid"] > 0)
|
||||
{
|
||||
$objsoc = new Societe($db);
|
||||
@ -203,7 +216,7 @@ if ($_GET["action"] == 'create')
|
||||
print '</td></tr>';
|
||||
}
|
||||
|
||||
print '<tr><td>Titre</td><td colspan="5">';
|
||||
print '<tr><td>'.$langs->trans("Title").'</td><td colspan="5">';
|
||||
print $form->select_civilite($obj->civilite);
|
||||
print '</td></tr>';
|
||||
|
||||
@ -239,11 +252,7 @@ if ($_GET["action"] == 'create')
|
||||
elseif ($_GET["action"] == 'edit')
|
||||
{
|
||||
// Fiche en mode edition
|
||||
print '<br>';
|
||||
|
||||
$contact = new Contact($db);
|
||||
$contact->fetch($_GET["id"], $user);
|
||||
|
||||
print '<form method="post" action="fiche.php?id='.$_GET["id"].'">';
|
||||
print '<input type="hidden" name="action" value="update">';
|
||||
print '<input type="hidden" name="contactid" value="'.$contact->id.'">';
|
||||
@ -300,12 +309,6 @@ else
|
||||
*
|
||||
*/
|
||||
|
||||
$contact = new Contact($db);
|
||||
$contact->fetch($_GET["id"], $user);
|
||||
|
||||
print_fiche_titre ($langs->trans("Contact")." : ". $contact->firstname.' '.$contact->name);
|
||||
|
||||
|
||||
print '<table class="noborder" width="100%">';
|
||||
|
||||
if ($contact->socid > 0)
|
||||
|
||||
@ -36,25 +36,40 @@ $langs->load("company");
|
||||
|
||||
llxHeader();
|
||||
|
||||
print '<div class="tabs">';
|
||||
print '<a class="tab" href="fiche.php?id='.$_GET["id"].'">Général</a>';
|
||||
print '<a class="tab" href="perso.php?id='.$_GET["id"].'">Informations personnelles</a>';
|
||||
print '<a class="tab" href="vcard.php?id='.$_GET["id"].'">VCard</a>';
|
||||
print '<a class="tab" href="info.php?id='.$_GET["id"].'" id="active">Info</a>';
|
||||
print '</div>';
|
||||
print '<div class="tabBar">';
|
||||
|
||||
$contact = new Contact($db);
|
||||
$contact->fetch($_GET["id"], $user);
|
||||
|
||||
|
||||
$h=0;
|
||||
$head[$h][0] = DOL_URL_ROOT.'fiche.php?id='.$_GET["id"];
|
||||
$head[$h][1] = "Général";
|
||||
$h++;
|
||||
|
||||
$head[$h][0] = DOL_URL_ROOT.'perso.php?id='.$_GET["id"];
|
||||
$head[$h][1] = 'Informations personnelles';
|
||||
$h++;
|
||||
|
||||
$head[$h][0] = DOL_URL_ROOT.'vcard.php?id='.$_GET["id"];
|
||||
$head[$h][1] = $langs->trans("VCard");
|
||||
$h++;
|
||||
|
||||
$head[$h][0] = DOL_URL_ROOT.'info.php?id='.$_GET["id"];
|
||||
$head[$h][1] = $langs->trans("Info");
|
||||
$hselected=$h;
|
||||
$h++;
|
||||
|
||||
dolibarr_fiche_head($head, $hselected, $contact->firstname.' '.$contact->name);
|
||||
|
||||
/*
|
||||
* Visualisation de la fiche
|
||||
*
|
||||
*/
|
||||
|
||||
$contact = new Contact($db);
|
||||
$contact->fetch($_GET["id"], $user);
|
||||
print '<table width="100%"><tr><td>';
|
||||
$contact->info($_GET["id"]);
|
||||
print '</td></tr></table>';
|
||||
|
||||
print_fiche_titre ($langs->trans("Contact")." : ". $contact->firstname.' '.$contact->name);
|
||||
|
||||
if ($contact->socid > 0)
|
||||
{
|
||||
$objsoc = new Societe($db);
|
||||
|
||||
@ -20,10 +20,21 @@
|
||||
* $Source$
|
||||
*
|
||||
*/
|
||||
|
||||
/*!
|
||||
\file htdocs/contact/perso.php
|
||||
\ingroup companies
|
||||
\brief Onglet informations personnelles d'un contact
|
||||
\version $Revision$
|
||||
*/
|
||||
|
||||
require("./pre.inc.php");
|
||||
require("../contact.class.php");
|
||||
require (DOL_DOCUMENT_ROOT."/lib/vcard/vcard.class.php");
|
||||
|
||||
$langs->load("companies");
|
||||
|
||||
|
||||
if ($_POST["action"] == 'update')
|
||||
{
|
||||
$contact = new Contact($db);
|
||||
@ -31,7 +42,7 @@ if ($_POST["action"] == 'update')
|
||||
|
||||
if ($_POST["birthdayyear"]) {
|
||||
if ($_POST["birthdayyear"]<=1970 && $_SERVER["WINDIR"]) {
|
||||
# windows mktime does not support negative date timestamp so birthday is not support for old persons
|
||||
# windows mktime does not support negative date timestamp so birthday is not supported for old persons
|
||||
$contact->birthday = $_POST["birthdayyear"].'-'.$_POST["birthdaymonth"].'-'.$_POST["birthdayday"];
|
||||
//array_push($error,"Windows ne sachant pas gérer des dates avant 1970, les dates de naissance avant cette date ne seront pas sauvegardées");
|
||||
} else {
|
||||
@ -50,22 +61,34 @@ if ($_POST["action"] == 'update')
|
||||
*/
|
||||
llxHeader();
|
||||
|
||||
print '<div class="tabs">';
|
||||
print '<a class="tab" href="fiche.php?id='.$_GET["id"].'">Général</a>';
|
||||
print '<a class="tab" href="perso.php?id='.$_GET["id"].'" id="active">Informations personnelles</a>';
|
||||
print '<a class="tab" href="vcard.php?id='.$_GET["id"].'">VCard</a>';
|
||||
print '<a class="tab" href="info.php?id='.$_GET["id"].'">Info</a>';
|
||||
print '</div>';
|
||||
print '<div class="tabBar">';
|
||||
$contact = new Contact($db);
|
||||
$contact->fetch($_GET["id"], $user);
|
||||
|
||||
|
||||
$h=0;
|
||||
$head[$h][0] = DOL_URL_ROOT.'fiche.php?id='.$_GET["id"];
|
||||
$head[$h][1] = "Général";
|
||||
$h++;
|
||||
|
||||
$head[$h][0] = DOL_URL_ROOT.'perso.php?id='.$_GET["id"];
|
||||
$head[$h][1] = 'Informations personnelles';
|
||||
$hselected=$h;
|
||||
$h++;
|
||||
|
||||
$head[$h][0] = DOL_URL_ROOT.'vcard.php?id='.$_GET["id"];
|
||||
$head[$h][1] = $langs->trans("VCard");
|
||||
$h++;
|
||||
|
||||
$head[$h][0] = DOL_URL_ROOT.'info.php?id='.$_GET["id"];
|
||||
$head[$h][1] = $langs->trans("Info");
|
||||
$h++;
|
||||
|
||||
dolibarr_fiche_head($head, $hselected, $contact->firstname.' '.$contact->name);
|
||||
|
||||
|
||||
if ($_GET["action"] == 'edit')
|
||||
{
|
||||
// Fiche info perso en mode edition
|
||||
|
||||
$contact = new Contact($db);
|
||||
$contact->fetch($_GET["id"], $user);
|
||||
|
||||
print_fiche_titre ("Contact : ". $contact->firstname.' '.$contact->name);
|
||||
|
||||
print '<form method="post" action="perso.php?id='.$_GET["id"].'">';
|
||||
print '<input type="hidden" name="action" value="update">';
|
||||
@ -76,12 +99,12 @@ if ($_GET["action"] == 'edit')
|
||||
$objsoc = new Societe($db);
|
||||
$objsoc->fetch($contact->socid);
|
||||
|
||||
print 'Société : '.$objsoc->nom_url.'<br>';
|
||||
print $langs->trans("Company").' : '.$objsoc->nom_url.'<br>';
|
||||
}
|
||||
|
||||
print 'Nom : '.$contact->name.' '.$contact->firstname ."<br>";
|
||||
print $langs->trans("Name").' : '.$contact->name.' '.$contact->firstname ."<br>";
|
||||
|
||||
print '<table class="border" cellpadding="3" celspacing="0" border="0" width="100%">';
|
||||
print '<table class="border" width="100%">';
|
||||
|
||||
$html = new Form($db);
|
||||
|
||||
@ -96,14 +119,14 @@ if ($_GET["action"] == 'edit')
|
||||
print '<td>Alerte : ';
|
||||
if ($contact->birthday_alert)
|
||||
{
|
||||
print '<input type="checkbox" name="birthday_alert" checked></td></tr>';
|
||||
print '<input type="checkbox" name="birthday_alert" checked></td>';
|
||||
}
|
||||
else
|
||||
{
|
||||
print '<input type="checkbox" name="birthday_alert"></td></tr>';
|
||||
print '<input type="checkbox" name="birthday_alert"></td>';
|
||||
}
|
||||
|
||||
print "</table>";
|
||||
print "</tr></table>";
|
||||
|
||||
print '<div class="FicheSubmit"><input type="submit" value="'.$langs->trans("Save").'">';
|
||||
|
||||
@ -115,18 +138,14 @@ else
|
||||
* Visualisation de la fiche
|
||||
*
|
||||
*/
|
||||
print '<table width="100%"><tr><td>';
|
||||
|
||||
$contact = new Contact($db);
|
||||
$contact->fetch($_GET["id"], $user);
|
||||
|
||||
print_fiche_titre ("Contact : ". $contact->firstname.' '.$contact->name);
|
||||
|
||||
if ($contact->socid > 0)
|
||||
{
|
||||
$objsoc = new Societe($db);
|
||||
$objsoc->fetch($contact->socid);
|
||||
|
||||
print 'Société : '.$objsoc->nom_url.'<br>';
|
||||
print $langs->trans("Company").' : '.$objsoc->nom_url.'<br>';
|
||||
}
|
||||
|
||||
if ($contact->birthday && $contact->birthday > 0) {
|
||||
@ -137,7 +156,12 @@ else
|
||||
else
|
||||
print ' (alerte anniversaire inactive)<br>';
|
||||
}
|
||||
else {
|
||||
print 'Date de naissance : '.$langs->trans("Unknown")."<br>";
|
||||
}
|
||||
|
||||
print "<br>";
|
||||
print "</table>";
|
||||
|
||||
print "</div>";
|
||||
|
||||
@ -148,12 +172,11 @@ else
|
||||
|
||||
print '<a class="tabAction" href="perso.php?id='.$_GET["id"].'&action=edit">'.$langs->trans('Edit').'</a>';
|
||||
|
||||
print '<a class="tabAction" href="fiche.php?id='.$_GET["id"].'&action=deleteWARNING">'.$langs->trans('Delete').'</a>';
|
||||
|
||||
print "</div>";
|
||||
}
|
||||
}
|
||||
$db->close();
|
||||
|
||||
$db->close();
|
||||
|
||||
llxFooter("<em>Dernière modification $Date$ révision $Revision$</em>");
|
||||
?>
|
||||
|
||||
Loading…
Reference in New Issue
Block a user