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')) {
</strong>
</td>
<td>
- <input type="checkbox" value="{$e->email}" {if $e->active}checked="checked"{/if} onclick="Ajax.update_html(null,'{$globals->baseurl}/emails/redirect/'+(this.checked?'':'in')+'active/{$e->email}')"/></td>
+ <input type="checkbox" value="{$e->email}" {if $e->active}checked="checked"{/if} onclick="Ajax.update_html('changeResult','{$globals->baseurl}/emails/redirect/'+(this.checked?'':'in')+'active/{$e->email}')"/></td>
<td>
- <select onchange="Ajax.update_html(null,'{$globals->baseurl}/emails/redirect/rewrite/{$e->email}/'+this.value)">
+ <select onchange="Ajax.update_html('changeResult','{$globals->baseurl}/emails/redirect/rewrite/{$e->email}/'+this.value)">
<option value=''>--- aucune ---</option>
{foreach from=$alias item=a}
<option {if $e->rewrite eq "`$a.alias`@polytechnique.org"}selected='selected'{/if}
<tr class="{cycle values="pair,impair"}"><td colspan="4">
<form action="emails/redirect" method="post">
<div>
+ <div id="changeResult" class="error" style="position:absolute;color:green"></div>
<br />
Ajouter une adresse email :
<input type="text" size="35" maxlength="60" name="email" value="" />