Qual: Uniformize code

This commit is contained in:
Laurent Destailleur 2010-09-04 17:18:13 +00:00
parent 060d2df3ea
commit 83d473f0d7
2 changed files with 8 additions and 7 deletions

View File

@ -124,7 +124,7 @@ if ($id > 0 || ! empty($ref))
print '<form method="post" action="'.$_SERVER["PHP_SELF"].'?id='.$commande->id.'">'; print '<form method="post" action="'.$_SERVER["PHP_SELF"].'?id='.$commande->id.'">';
print '<input type="hidden" name="token" value="'.$_SESSION['newtoken'].'">'; print '<input type="hidden" name="token" value="'.$_SESSION['newtoken'].'">';
print '<input type="hidden" name="action" value="update">'; print '<input type="hidden" name="action" value="update">';
print '<textarea name="note_public" cols="80" rows="8">'.$commande->note_public."</textarea><br>"; print '<textarea name="note_public" cols="80" rows="'.ROWS_4.'">'.$commande->note_public."</textarea><br>";
} }
else else
{ {
@ -132,14 +132,14 @@ if ($id > 0 || ! empty($ref))
} }
print "</td></tr>"; print "</td></tr>";
// Note priv<EFBFBD>e // Note private
if (! $user->societe_id) if (! $user->societe_id)
{ {
print '<tr><td valign="top">'.$langs->trans("NotePrivate").' :</td>'; print '<tr><td valign="top">'.$langs->trans("NotePrivate").' :</td>';
print '<td valign="top" colspan="3">'; print '<td valign="top" colspan="3">';
if ($_GET["action"] == 'edit') if ($_GET["action"] == 'edit')
{ {
print '<textarea name="note" cols="80" rows="8">'.$commande->note."</textarea><br>"; print '<textarea name="note" cols="80" rows="'.ROWS_8.'">'.$commande->note."</textarea><br>";
} }
else else
{ {

View File

@ -72,7 +72,7 @@ $html = new Form($db);
/* */ /* */
/* *************************************************************************** */ /* *************************************************************************** */
$now=gmmktime(); $now=dol_now();
$id = $_GET['id']; $id = $_GET['id'];
$ref= $_GET['ref']; $ref= $_GET['ref'];
@ -154,7 +154,7 @@ if ($id > 0 || ! empty($ref))
{ {
print '<tr><td valign="top">'.$langs->trans("NotePrivate").'</td>'; print '<tr><td valign="top">'.$langs->trans("NotePrivate").'</td>';
print '<td colspan="2">'; print '<td colspan="2">';
if ($user->rights->fournisseur->commande->creer) print '<textarea cols="90" rows="'.ROWS_6.'" name="note">'; if ($user->rights->fournisseur->commande->creer) print '<textarea cols="90" rows="'.ROWS_8.'" name="note">';
print $commande->note; print $commande->note;
if ($user->rights->fournisseur->commande->creer) print '</textarea>'; if ($user->rights->fournisseur->commande->creer) print '</textarea>';
print '</td></tr>'; print '</td></tr>';
@ -171,8 +171,9 @@ if ($id > 0 || ! empty($ref))
} }
else else
{ {
/* Commande non trouv<75>e */ /* Order not found */
print "Commande inexistante"; $langs->load("errors");
print $langs->trans("ErrorRecordNotFound");
} }
} }