Can keep messages into html

This commit is contained in:
Laurent Destailleur 2011-05-04 19:06:33 +00:00
parent d6abe49da2
commit e6f69de1b2
2 changed files with 28 additions and 19 deletions

View File

@ -76,3 +76,6 @@ ErrorDatabaseParameterWrong=Le paramètre de configuration de la base de donnée
ErrorNumRefModel=Une référence existe en base (%s) et est incompatible avec cette numérotation. Supprimez la ligne ou renommez la référence pour activer ce module. ErrorNumRefModel=Une référence existe en base (%s) et est incompatible avec cette numérotation. Supprimez la ligne ou renommez la référence pour activer ce module.
ErrorQtyTooLowForThisSupplier=Quantité insuffisante pour ce fournisseur ou aucun tarif défini sur ce produit pour ce fournisseur ErrorQtyTooLowForThisSupplier=Quantité insuffisante pour ce fournisseur ou aucun tarif défini sur ce produit pour ce fournisseur
ErrorModuleSetupNotComplete=La configuration du module semble incomplète. Aller dans l'espace Configuration - Modules pour corriger. ErrorModuleSetupNotComplete=La configuration du module semble incomplète. Aller dans l'espace Configuration - Modules pour corriger.
ErrorBadMask=Erreur sur le masque
ErrorBadMaskFailedToLocatePosOfSequence=Erreur, masque sans numéro de séquence
ErrorBadMaskBadRazMonth=Erreur, mauvais valeur de remise à zéro

View File

@ -3434,9 +3434,11 @@ function monthArrayOrSelected($selected=0)
* @param mesgarray Messages array * @param mesgarray Messages array
* @param style Style of message output * @param style Style of message output
* @return string Return html output * @return string Return html output
* @return $keepembedded Set to 1 in error message must be kept embedded into its html place (this disable jnotify)
* @see dol_print_error * @see dol_print_error
* @see dol_htmloutput_errors
*/ */
function dol_htmloutput_mesg($mesgstring='',$mesgarray='', $style='ok') function dol_htmloutput_mesg($mesgstring='',$mesgarray='', $style='ok', $keepembedded=0)
{ {
global $conf, $langs; global $conf, $langs;
@ -3463,7 +3465,9 @@ function dol_htmloutput_mesg($mesgstring='',$mesgarray='', $style='ok')
$out.= $langs->trans($mesgstring); $out.= $langs->trans($mesgstring);
if (empty($conf->global->MAIN_USE_JQUERY_JNOTIFY)) $out.= '</div>'; if (empty($conf->global->MAIN_USE_JQUERY_JNOTIFY)) $out.= '</div>';
} }
if (! empty($conf->global->MAIN_USE_JQUERY_JNOTIFY) && $out) if ($out)
{
if (! empty($conf->global->MAIN_USE_JQUERY_JNOTIFY) && ! $keepembedded)
{ {
print '<script type="text/javascript"> print '<script type="text/javascript">
jQuery(document).ready(function() { jQuery(document).ready(function() {
@ -3475,7 +3479,7 @@ function dol_htmloutput_mesg($mesgstring='',$mesgarray='', $style='ok')
{ {
print $out; print $out;
} }
}
return $ret; return $ret;
} }
@ -3483,12 +3487,14 @@ function dol_htmloutput_mesg($mesgstring='',$mesgarray='', $style='ok')
* Print formated error messages to output (Used to show messages on html output) * Print formated error messages to output (Used to show messages on html output)
* @param mesgstring Error message * @param mesgstring Error message
* @param mesgarray Error messages array * @param mesgarray Error messages array
* @return keepembedded Set to 1 in error message must be kept embedded into its html place (this disable jnotify)
* @return html Return html output * @return html Return html output
* @see dol_print_error * @see dol_print_error
* @see dol_htmloutput_mesg
*/ */
function dol_htmloutput_errors($mesgstring='',$mesgarray='') function dol_htmloutput_errors($mesgstring='', $mesgarray='', $keepembedded=0)
{ {
return dol_htmloutput_mesg($mesgstring, $mesgarray, 'error'); return dol_htmloutput_mesg($mesgstring, $mesgarray, 'error', $keepembedded);
} }