diff --git a/htdocs/comm/action/fiche.php b/htdocs/comm/action/fiche.php
index ca8e6dd5084..9f6816ddf35 100644
--- a/htdocs/comm/action/fiche.php
+++ b/htdocs/comm/action/fiche.php
@@ -19,15 +19,25 @@
* $Id$
* $Source$
*/
+
+/*!
+ \file htdocs/comm/action/fiche.php
+ \ingroup commercial
+ \brief Page de la fiche action commercial
+ \version $Revision$
+*/
+
require("./pre.inc.php");
$langs->load("company");
+$langs->load("commercial");
require("../../contact.class.php");
require("../../lib/webcal.class.php");
require("../../cactioncomm.class.php");
require("../../actioncomm.class.php");
+
/*
* Sécurité accés client
*/
@@ -38,8 +48,7 @@ if ($user->societe_id > 0)
}
/*
- *
- *
+ * Action création de l'action
*
*/
if ($_POST["action"] == 'add_action')
@@ -101,8 +110,7 @@ if ($_POST["action"] == 'add_action')
$webcal->add($user, $actioncomm->date, $societe->nom, $libelle);
}
- // Header("Location: ".DOL_URL_ROOT."/comm/fiche.php?socid=$socid");
- Header("Location: ".$_POST["from"]);
+ Header("Location: ".$_POST["from"]);
} else {
@@ -112,13 +120,22 @@ if ($_POST["action"] == 'add_action')
}
+/*
+ * Action suppression de l'action
+ *
+ */
if ($_POST["action"] == 'confirm_delete' && $_POST["confirm"] == 'yes')
{
$actioncomm = new ActionComm($db);
$actioncomm->delete($_GET["id"]);
+
Header("Location: index.php");
}
+/*
+ * Action mise à jour de l'action
+ *
+ */
if ($_POST["action"] == 'update')
{
$action = new Actioncomm($db);
@@ -138,10 +155,12 @@ llxHeader();
$html = new Form($db);
-/*
- * Affichage fiche action vierge en mode creation
- *
- */
+
+/* ************************************************************************** */
+/* */
+/* Affichage fiche en mode création */
+/* */
+/* ************************************************************************** */
if ($_GET["action"] == 'create')
{
@@ -164,19 +183,19 @@ if ($_GET["action"] == 'create')
*/
if ($_GET["actionid"] == 5)
{
- print_titre ("Saisie d'une action Rendez-vous");
+ print_titre ($langs->trans("AddActionRendezVous"));
print "
";
print ''."\n";
- print '
Rendez-vous | |
'.$langs->trans("Rendez-Vous").' | |
| '.$langs->trans("Action concernant la companie").' | '; + print ' |
| '.$langs->trans("ActionOnCompany").' | '; if ($_GET["socid"]) { $societe = new Societe($db); $nomsoc=$societe->get_nom($_GET["socid"]); @@ -190,7 +209,7 @@ if ($_GET["action"] == 'create') // Si la societe est imposée, on propose ces contacts if ($_GET["socid"]) { - print ' |
| '.$langs->trans("Action concernant le contact").' | '; + print ' |
| '.$langs->trans("ActionOnContact").' | '; print $html->select_contacts($_GET["socid"],'','contactid',1,1); print ' |
| '.$langs->trans("Action").' | '; @@ -235,7 +254,7 @@ if ($_GET["action"] == 'create') print ' |
| '.$langs->trans("Label").' | |
| '.$langs->trans("Action concernant la companie").' | '; + print ' |
| '.$langs->trans("ActionOnCompany").' | '; if ($_GET["socid"]) { $societe = new Societe($db); $nomsoc=$societe->get_nom($_GET["socid"]); @@ -249,7 +268,7 @@ if ($_GET["action"] == 'create') // Si la societe est imposée, on propose ces contacts if ($_GET["socid"]) { - print ' |
| '.$langs->trans("Action concernant le contact").' | '; + print ' |
| '.$langs->trans("ActionOnContact").' | '; print $html->select_contacts($_GET["socid"],'','contactid',1,1); print ' |
| '.$langs->trans("Description").' | '; print ' |