X-Git-Url: http://git.polytechnique.org/?a=blobdiff_plain;f=htdocs%2Fjavascript%2Fajax.js;h=71797f0c8cf08d32eefd7ab1605d85311277752f;hb=a9cd2babbdceaeb57e9de04ce0e7113a14926ec1;hp=bc913035cc326b27358bd1ae60340259601e382b;hpb=5ff3f06b36211092cf9585d5677bd41ee7abc8ee;p=platal.git diff --git a/htdocs/javascript/ajax.js b/htdocs/javascript/ajax.js index bc91303..71797f0 100644 --- a/htdocs/javascript/ajax.js +++ b/htdocs/javascript/ajax.js @@ -1,5 +1,5 @@ /*************************************************************************** - * Copyright (C) 2003-2007 Polytechnique.org * + * Copyright (C) 2003-2008 Polytechnique.org * * http://opensource.polytechnique.org/ * * * * This program is free software; you can redistribute it and/or modify * @@ -76,6 +76,8 @@ function AjaxEngine() } } else if (ajax.xml_client.status == 403) { window.location.reload(); + } else if (ajax.xml_client.status >= 500) { + alert("Une erreur s'est produite lors du traitement de la requête"); } } }; @@ -140,11 +142,11 @@ function previewWiki(idFrom, idTo, withTitle, idShow) } } -function sendTestEmail(forlife) +function sendTestEmail(token, forlife) { - Ajax.update_html(null, 'emails/test' + (forlife == null ? '' : '/' + forlife), + Ajax.update_html(null, 'emails/test' + (forlife == null ? '' : '/' + forlife) + '?token=' + token, function() { - showTempMessage('mail_sent', "Un mail a été envoyé avec succès" + showTempMessage('mail_sent', "Un email a été envoyé avec succès" + (forlife == null ? " sur ton adresse." : " sur l'adresse de " + forlife), true); }); return false;