From: Florent Bruneau Date: Mon, 31 Mar 2008 16:46:36 +0000 (+0200) Subject: Fix a race condition in active redirection validation. X-Git-Tag: xorg/0.9.16~36 X-Git-Url: http://git.polytechnique.org/?a=commitdiff_plain;h=6df558fd292377086448b61b45da923f1e0c369d;p=platal.git Fix a race condition in active redirection validation. Signed-off-by: Florent Bruneau --- diff --git a/templates/emails/redirect.tpl b/templates/emails/redirect.tpl index 102564c..9742816 100644 --- a/templates/emails/redirect.tpl +++ b/templates/emails/redirect.tpl @@ -116,6 +116,12 @@ } } + function updateRedirect(checked, email) + { + activeEnable(); + Ajax.update_html(null, 'emails/redirect/' + (checked ? '' : 'in') + 'active/' + email, redirectUpdate); + } + {/literal} //]]> {javascript name="jquery"} @@ -143,7 +149,7 @@ sufficient}class="active_email"{/if} {if $e->active}checked="checked"{/if} {if $smarty.foreach.redirect.total eq 1}disabled="disabled"{/if} - onchange="Ajax.update_html(null,'{$globals->baseurl}/emails/redirect/'+(this.checked?'':'in')+'active/{$e->email}', redirectUpdate)" /> + onchange="updateRedirect(this.checked, '{$e->email}')" /> {if $e->has_rewrite()}