Fix: Show error message

This commit is contained in:
Laurent Destailleur 2011-05-04 18:34:16 +00:00
parent ab8d73226b
commit d6abe49da2
11 changed files with 136 additions and 92 deletions

View File

@ -246,8 +246,12 @@ foreach ($conf->file->dol_document_root as $dirroot)
print $module->info();
print '</td>';
// Examples
print '<td nowrap="nowrap">'.$module->getExample()."</td>\n";
// Show example of numbering module
print '<td nowrap="nowrap">';
$tmp=$module->getExample();
if (preg_match('/^Error/',$tmp)) print $langs->trans($tmp);
else print $tmp;
print '</td>'."\n";
print '<td align="center">';
if ($conf->global->COMMANDE_ADDON == "$file")

View File

@ -119,8 +119,12 @@ if (is_resource($handle))
print $module->info();
print '</td>';
// Examples
print '<td nowrap="nowrap">'.$module->getExample()."</td>\n";
// Show example of numbering module
print '<td nowrap="nowrap">';
$tmp=$module->getExample();
if (preg_match('/^Error/',$tmp)) print $langs->trans($tmp);
else print $tmp;
print '</td>'."\n";
print '<td align="center">';
if ($conf->global->CONTRACT_ADDON == "$file")

View File

@ -329,8 +329,12 @@ foreach ($conf->file->dol_document_root as $dirroot)
print $module->info();
print '</td>';
// Examples
print '<td nowrap="nowrap">'.$module->getExample()."</td>\n";
// Show example of numbering module
print '<td nowrap="nowrap">';
$tmp=$module->getExample();
if (preg_match('/^Error/',$tmp)) print $langs->trans($tmp);
else print $tmp;
print '</td>'."\n";
print '<td align="center">';
if ($conf->global->EXPEDITION_ADDON_NUMBER == "$file")

View File

@ -35,6 +35,7 @@ $langs->load("admin");
$langs->load("companies");
$langs->load("bills");
$langs->load("other");
$langs->load("errors");
if (!$user->admin)
accessforbidden();
@ -303,8 +304,12 @@ foreach ($conf->file->dol_document_root as $dirroot)
print '</td>';
// Affiche example
print '<td nowrap="nowrap">'.$module->getExample().'</td>';
// Show example of numbering module
print '<td nowrap="nowrap">';
$tmp=$module->getExample();
if (preg_match('/^Error/',$tmp)) print $langs->trans($tmp);
else print $tmp;
print '</td>'."\n";
print '<td align="center">';
//print "> ".$conf->global->FACTURE_ADDON." - ".$file;
@ -359,7 +364,7 @@ foreach ($conf->file->dol_document_root as $dirroot)
if ($conf->global->FACTURE_ADDON.'.php' == $file) // If module is the one used, we show existing errors
{
if (! empty($module->error)) dol_htmloutput_errors($module->error,'');
if (! empty($module->error)) dol_htmloutput_errors($module->error,'',1);
}
print '</td>';

View File

@ -236,8 +236,12 @@ foreach ($conf->file->dol_document_root as $dirroot)
print $module->info();
print '</td>';
// Examples
print '<td nowrap="nowrap">'.$module->getExample()."</td>\n";
// Show example of numbering module
print '<td nowrap="nowrap">';
$tmp=$module->getExample();
if (preg_match('/^Error/',$tmp)) print $langs->trans($tmp);
else print $tmp;
print '</td>'."\n";
print '<td align="center">';
if ($conf->global->FICHEINTER_ADDON == $classname)

View File

@ -270,8 +270,12 @@ if (is_resource($handle))
print $module->info();
print '</td>';
// Examples
print '<td nowrap="nowrap">'.$module->getExample()."</td>\n";
// Show example of numbering module
print '<td nowrap="nowrap">';
$tmp=$module->getExample();
if (preg_match('/^Error/',$tmp)) print $langs->trans($tmp);
else print $tmp;
print '</td>'."\n";
print '<td align="center">';
if ($conf->global->COMMANDE_SUPPLIER_ADDON == "$file")

View File

@ -243,8 +243,12 @@ foreach ($conf->file->dol_document_root as $dirroot)
print $module->info();
print '</td>';
// Affiche example
print '<td nowrap="nowrap">'.$module->getExample().'</td>';
// Show example of numbering module
print '<td nowrap="nowrap">';
$tmp=$module->getExample();
if (preg_match('/^Error/',$tmp)) print $langs->trans($tmp);
else print $tmp;
print '</td>'."\n";
print '<td align="center">';
if ($conf->global->LIVRAISON_ADDON == "$file")

View File

@ -207,8 +207,12 @@ if (is_resource($handle))
print $module->info();
print '</td>';
// Examples
print '<td nowrap="nowrap">'.$module->getExample()."</td>\n";
// Show example of numbering module
print '<td nowrap="nowrap">';
$tmp=$module->getExample();
if (preg_match('/^Error/',$tmp)) print $langs->trans($tmp);
else print $tmp;
print '</td>'."\n";
print '<td align="center">';
if ($conf->global->PROJECT_ADDON == "$file")

View File

@ -247,8 +247,12 @@ foreach ($conf->file->dol_document_root as $dirroot)
print $module->info();
print '</td>';
// Examples
print '<td nowrap="nowrap">'.$module->getExample()."</td>\n";
// Show example of numbering module
print '<td nowrap="nowrap">';
$tmp=$module->getExample();
if (preg_match('/^Error/',$tmp)) print $langs->trans($tmp);
else print $tmp;
print '</td>'."\n";
print '<td align="center">';
if ($conf->global->PROPALE_ADDON == "$file")

View File

@ -259,8 +259,12 @@ foreach ($arrayhandler as $key => $module)
print $langs->trans("MinLength").': '.$module->length;
print '</td>';
// Affiche example
print '<td width="60">'.$module->getExample().'</td>';
// Show example of numbering module
print '<td nowrap="nowrap">';
$tmp=$module->getExample();
if (preg_match('/^Error/',$tmp)) print $langs->trans($tmp);
else print $tmp;
print '</td>'."\n";
print '<td width="100" align="center">';
if ($conf->global->USER_PASSWORD_GENERATED == $key)

View File

@ -75,3 +75,6 @@ ErrorDatabaseParameterWrong=Database setup parameter '<b>%s</b>' has a value not
ErrorNumRefModel=A reference exists into database (%s) and is not compatible with this numbering rule. Remove record or renamed reference to activate this module.
ErrorQtyTooLowForThisSupplier=Quantity too low for this supplier or no price defined on this product for this supplier
ErrorModuleSetupNotComplete=Setup of module looks to be uncomplete. Go on Setup - Modules to complete.
ErrorBadMask=Error on mask
ErrorBadMaskFailedToLocatePosOfSequence=Error, mask without sequence number
ErrorBadMaskBadRazMonth=Erreur, bad reset value