Fix: Error message was not visible

This commit is contained in:
Laurent Destailleur 2011-03-05 01:08:38 +00:00
parent 5cb83686c3
commit d0514c09f9

View File

@ -113,7 +113,7 @@ if ($action == 'add_paiement')
if (empty($datepaye)) if (empty($datepaye))
{ {
$fiche_erreur_message = '<div class="error">'.$langs->trans('ErrorFieldRequired',$langs->transnoentities('Date')).'</div>'; $mesg = '<div class="error">'.$langs->trans('ErrorFieldRequired',$langs->transnoentities('Date')).'</div>';
$error++; $error++;
} }
@ -173,8 +173,6 @@ llxHeader();
$html=new Form($db); $html=new Form($db);
if ($mesg) print $mesg;
if ($action == 'create' || $action == 'add_paiement') if ($action == 'create' || $action == 'add_paiement')
{ {
$facture = new FactureFournisseur($db); $facture = new FactureFournisseur($db);
@ -202,6 +200,9 @@ if ($action == 'create' || $action == 'add_paiement')
print_fiche_titre($langs->trans('DoPayment')); print_fiche_titre($langs->trans('DoPayment'));
if ($mesg) print $mesg;
if ($errmsg) print $errmsg;
print '<form name="addpaiement" action="paiement.php" method="post">'; print '<form name="addpaiement" action="paiement.php" method="post">';
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="add_paiement">'; print '<input type="hidden" name="action" value="add_paiement">';
@ -402,6 +403,9 @@ if (! $_GET['action'] && ! $_POST['action'])
print_barre_liste($langs->trans('SupplierPayments'), $page, 'paiement.php',$paramlist,$sortfield,$sortorder,'',$num); print_barre_liste($langs->trans('SupplierPayments'), $page, 'paiement.php',$paramlist,$sortfield,$sortorder,'',$num);
if ($mesg) print $mesg;
if ($errmsg) print $errmsg;
print '<form method="GET" action="'.$_SERVER["PHP_SELF"].'">'; print '<form method="GET" action="'.$_SERVER["PHP_SELF"].'">';
print '<table class="noborder" width="100%">'; print '<table class="noborder" width="100%">';
print '<tr class="liste_titre">'; print '<tr class="liste_titre">';