From: x2001corpet Date: Mon, 2 Apr 2007 17:45:14 +0000 (+0000) Subject: display change when ajax succeed X-Git-Tag: xorg/0.9.13~3 X-Git-Url: http://git.polytechnique.org/?a=commitdiff_plain;h=d80891d44188350f61d1905cef2c6bf8421d82d3;p=platal.git display change when ajax succeed git-svn-id: svn+ssh://murphy/home/svn/platal/branches/platal-0.9.13@1657 839d8a87-29fc-0310-9880-83ba4fa771e5 --- diff --git a/modules/email.php b/modules/email.php index 0641bf2..965481e 100644 --- a/modules/email.php +++ b/modules/email.php @@ -205,15 +205,24 @@ class EmailModule extends PLModule if ($action == 'active' && $email) { $redirect->modify_one_email($email, true); + header('Content-Type: text/plain; charset=ISO-8859-15'); + echo 'L\'adresse '.$email.' a bien été activée.'; + exit(); } if ($action == 'inactive' && $email) { $redirect->modify_one_email($email, false); + header('Content-Type: text/plain; charset=ISO-8859-15'); + echo 'L\'adresse '.$email.' a bien été desactivée.'; + exit(); } if ($action == 'rewrite' && $email) { $rewrite = @func_get_arg(3); $redirect->modify_one_email_redirect($email, $rewrite); + header('Content-Type: text/plain; charset=ISO-8859-15'); + echo 'L\'adresse '.$email.' est maintenant réécrite en '.$rewrite.'.'; + exit(); } if (Env::has('emailop')) { diff --git a/templates/emails/redirect.tpl b/templates/emails/redirect.tpl index da80ee6..63d06dd 100644 --- a/templates/emails/redirect.tpl +++ b/templates/emails/redirect.tpl @@ -92,9 +92,9 @@ - active}checked="checked"{/if} onclick="Ajax.update_html(null,'{$globals->baseurl}/emails/redirect/'+(this.checked?'':'in')+'active/{$e->email}')"/> + active}checked="checked"{/if} onclick="Ajax.update_html('changeResult','{$globals->baseurl}/emails/redirect/'+(this.checked?'':'in')+'active/{$e->email}')"/> - {foreach from=$alias item=a}