diff --git a/htdocs/langs/fr_FR/errors.lang b/htdocs/langs/fr_FR/errors.lang index 1543d569c16..c46edc3945b 100644 --- a/htdocs/langs/fr_FR/errors.lang +++ b/htdocs/langs/fr_FR/errors.lang @@ -75,4 +75,7 @@ WarningNoDocumentModelActivated=Aucun modèle, pour la génération de document, ErrorDatabaseParameterWrong=Le paramètre de configuration de la base de donnée '%s' a une valeur non compatible pour une utilisation de Dolibarr (doit avoir la valeur '%s'). 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 -ErrorModuleSetupNotComplete=La configuration du module semble incomplète. Aller dans l'espace Configuration - Modules pour corriger. \ No newline at end of file +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 \ No newline at end of file diff --git a/htdocs/lib/functions.lib.php b/htdocs/lib/functions.lib.php index fd8cd251e27..f0f56b282d1 100644 --- a/htdocs/lib/functions.lib.php +++ b/htdocs/lib/functions.lib.php @@ -3431,12 +3431,14 @@ function monthArrayOrSelected($selected=0) /** * Print formated messages to output (Used to show messages on html output) * @param mesgstring Message - * @param mesgarray Messages array + * @param mesgarray Messages array * @param style Style of message 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_htmloutput_errors */ -function dol_htmloutput_mesg($mesgstring='',$mesgarray='', $style='ok') +function dol_htmloutput_mesg($mesgstring='',$mesgarray='', $style='ok', $keepembedded=0) { global $conf, $langs; @@ -3463,32 +3465,36 @@ function dol_htmloutput_mesg($mesgstring='',$mesgarray='', $style='ok') $out.= $langs->trans($mesgstring); if (empty($conf->global->MAIN_USE_JQUERY_JNOTIFY)) $out.= ''; } - if (! empty($conf->global->MAIN_USE_JQUERY_JNOTIFY) && $out) + if ($out) { - print ''; + if (! empty($conf->global->MAIN_USE_JQUERY_JNOTIFY) && ! $keepembedded) + { + print ''; + } + else + { + print $out; + } } - else - { - print $out; - } - return $ret; } /** * Print formated error messages to output (Used to show messages on html output) - * @param mesgstring Error message - * @param mesgarray Error messages array - * @return html Return html output + * @param mesgstring Error message + * @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 * @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); }