Correction du nom de l'input todo_note en note

This commit is contained in:
Rodolphe Quiedeville 2005-01-04 09:00:29 +00:00
parent 647f66a13d
commit c1f07dd34d

View File

@ -1,5 +1,5 @@
<?php <?php
/* Copyright (C) 2001-2004 Rodolphe Quiedeville <rodolphe@quiedeville.org> /* Copyright (C) 2001-2005 Rodolphe Quiedeville <rodolphe@quiedeville.org>
* Copyright (C) 2004 Laurent Destailleur <eldy@users.sourceforge.net> * Copyright (C) 2004 Laurent Destailleur <eldy@users.sourceforge.net>
* *
* This program is free software; you can redistribute it and/or modify * This program is free software; you can redistribute it and/or modify
@ -67,7 +67,8 @@ if ($_POST["action"] == 'add_action')
$societe->fetch($_POST["socid"]); $societe->fetch($_POST["socid"]);
} }
if ($_POST["actionid"]) { if ($_POST["actionid"])
{
$actioncomm = new ActionComm($db); $actioncomm = new ActionComm($db);
@ -97,7 +98,8 @@ if ($_POST["action"] == 'add_action')
{ {
$webcal = new Webcal(); $webcal = new Webcal();
if (! $webcal->localdb->ok) { if (! $webcal->localdb->ok)
{
// Si la creation de l'objet n'as pu se connecter // Si la creation de l'objet n'as pu se connecter
$error="Dolibarr n'a pu se connecter à la base Webcalendar avec les identifiants définis (host=".$conf->webcal->db->host." dbname=".$conf->webcal->db->name." user=".$conf->webcal->db->user."). L'option de mise a jour Webcalendar a été ignorée."; $error="Dolibarr n'a pu se connecter à la base Webcalendar avec les identifiants définis (host=".$conf->webcal->db->host." dbname=".$conf->webcal->db->name." user=".$conf->webcal->db->user."). L'option de mise a jour Webcalendar a été ignorée.";
$webcal=-1; $webcal=-1;
@ -131,23 +133,28 @@ if ($_POST["action"] == 'add_action')
// On crée l'action (avec ajout eventuel dans webcal si défini) // On crée l'action (avec ajout eventuel dans webcal si défini)
$idaction=$actioncomm->add($user, $webcal); $idaction=$actioncomm->add($user, $webcal);
if ($idaction > 0) { if ($idaction > 0)
if (! $actioncomm->error) { {
if (! $actioncomm->error)
{
// Si pas d'erreur // Si pas d'erreur
Header("Location: ".$_POST["from"]); Header("Location: ".$_POST["from"]);
} }
else { else
{
// Si erreur // Si erreur
$_GET["id"]=$idaction; $_GET["id"]=$idaction;
$error=$actioncomm->error; $error=$actioncomm->error;
} }
} else { }
else
{
dolibarr_print_error($db); dolibarr_print_error($db);
} }
} else { }
else
{
print "Le type d'action n'a pas été choisi"; print "Le type d'action n'a pas été choisi";
} }
} }
@ -179,15 +186,10 @@ if ($_POST["action"] == 'update')
Header("Location: ".$_POST["from"]); Header("Location: ".$_POST["from"]);
} }
llxHeader(); llxHeader();
$html = new Form($db); $html = new Form($db);
/* ************************************************************************** */ /* ************************************************************************** */
/* */ /* */
/* Affichage fiche en mode création */ /* Affichage fiche en mode création */
@ -200,7 +202,6 @@ if ($_GET["action"] == 'create')
if ($_GET["contactid"]) if ($_GET["contactid"])
{ {
$contact = new Contact($db); $contact = new Contact($db);
$contact->fetch($_GET["contactid"]); $contact->fetch($_GET["contactid"]);
} }
@ -228,19 +229,22 @@ if ($_GET["action"] == 'create')
// Societe, contact // Societe, contact
print '<tr><td width="10%">'.$langs->trans("ActionOnCompany").'</td><td width="40%">'; print '<tr><td width="10%">'.$langs->trans("ActionOnCompany").'</td><td width="40%">';
if ($_GET["socid"]) { if ($_GET["socid"])
{
$societe = new Societe($db); $societe = new Societe($db);
$nomsoc=$societe->get_nom($_GET["socid"]); $nomsoc=$societe->get_nom($_GET["socid"]);
print '<a href="../fiche.php?socid='.$_GET["socid"].'">'.$nomsoc.'</a>'; print '<a href="../fiche.php?socid='.$_GET["socid"].'">'.$nomsoc.'</a>';
print '<input type="hidden" name="socid" value="'.$_GET["socid"].'">'; print '<input type="hidden" name="socid" value="'.$_GET["socid"].'">';
} }
else { else
{
print $html->select_societes('','socid',1,1); print $html->select_societes('','socid',1,1);
} }
print '</td></tr>'; print '</td></tr>';
// Si la societe est imposée, on propose ces contacts // Si la societe est imposée, on propose ces contacts
if ($_GET["socid"]) { if ($_GET["socid"])
{
print '<tr><td width="10%">'.$langs->trans("ActionOnContact").'</td><td width="40%">'; print '<tr><td width="10%">'.$langs->trans("ActionOnContact").'</td><td width="40%">';
print $html->select_contacts($_GET["socid"],'','contactid',1,1); print $html->select_contacts($_GET["socid"],'','contactid',1,1);
print '</td></tr>'; print '</td></tr>';
@ -259,7 +263,7 @@ if ($_GET["action"] == 'create')
add_row_for_webcal_link(); add_row_for_webcal_link();
print '<tr><td valign="top">'.$langs->trans("Comment").'</td><td>'; print '<tr><td valign="top">'.$langs->trans("Comment").'</td><td>';
print '<textarea cols="60" rows="6" name="todo_note"></textarea></td></tr>'; print '<textarea cols="60" rows="6" name="note"></textarea></td></tr>';
print '<tr><td colspan="2" align="center"><input type="submit" value="'.$langs->trans("Add").'"></td></tr>'; print '<tr><td colspan="2" align="center"><input type="submit" value="'.$langs->trans("Add").'"></td></tr>';
print '</table>'; print '</table>';
} }
@ -277,10 +281,13 @@ if ($_GET["action"] == 'create')
// Type d'action actifs // Type d'action actifs
print '<tr><td width="10%">'.$langs->trans("Action").'</td><td>'; print '<tr><td width="10%">'.$langs->trans("Action").'</td><td>';
if ($_GET["actionid"]) { if ($_GET["actionid"])
{
print '<input type="hidden" name="actionid" value="'.$_GET["actionid"].'">'."\n"; print '<input type="hidden" name="actionid" value="'.$_GET["actionid"].'">'."\n";
print $caction->get_nom($_GET["actionid"]); print $caction->get_nom($_GET["actionid"]);
} else { }
else
{
$html->select_array("actionid", $caction->liste_array(1), 0); $html->select_array("actionid", $caction->liste_array(1), 0);
} }
print '</td></tr>'; print '</td></tr>';
@ -289,19 +296,22 @@ if ($_GET["action"] == 'create')
// Societe, contact // Societe, contact
print '<tr><td width="10%">'.$langs->trans("ActionOnCompany").'</td><td width="40%">'; print '<tr><td width="10%">'.$langs->trans("ActionOnCompany").'</td><td width="40%">';
if ($_GET["socid"]) { if ($_GET["socid"])
{
$societe = new Societe($db); $societe = new Societe($db);
$nomsoc=$societe->get_nom($_GET["socid"]); $nomsoc=$societe->get_nom($_GET["socid"]);
print '<a href="../fiche.php?socid='.$_GET["socid"].'">'.$nomsoc.'</a>'; print '<a href="../fiche.php?socid='.$_GET["socid"].'">'.$nomsoc.'</a>';
print '<input type="hidden" name="socid" value="'.$_GET["socid"].'">'; print '<input type="hidden" name="socid" value="'.$_GET["socid"].'">';
} }
else { else
{
print $html->select_societes('','socid',1,1); print $html->select_societes('','socid',1,1);
} }
print '</td></tr>'; print '</td></tr>';
// Si la societe est imposée, on propose ces contacts // Si la societe est imposée, on propose ces contacts
if ($_GET["socid"]) { if ($_GET["socid"])
{
print '<tr><td width="10%">'.$langs->trans("ActionOnContact").'</td><td width="40%">'; print '<tr><td width="10%">'.$langs->trans("ActionOnContact").'</td><td width="40%">';
print $html->select_contacts($_GET["socid"],'','contactid',1,1); print $html->select_contacts($_GET["socid"],'','contactid',1,1);
print '</td></tr>'; print '</td></tr>';
@ -352,15 +362,12 @@ if ($_GET["action"] == 'create')
// Description // Description
print '<tr><td valign="top">'.$langs->trans("Description").'</td><td>'; print '<tr><td valign="top">'.$langs->trans("Description").'</td><td>';
print '<textarea cols="60" rows="6" name="todo_note"></textarea></td></tr>'; print '<textarea cols="60" rows="6" name="note"></textarea></td></tr>';
print '</table>'; print '</table>';
print '<p align="center"><input type="submit" value="'.$langs->trans("Add").'"></p>'; print '<p align="center"><input type="submit" value="'.$langs->trans("Add").'"></p>';
} }
print "</form>"; print "</form>";
} }