Commit 79e1656b authored by IKEDA Soji's avatar IKEDA Soji
Browse files

[-bug] javascript: refresh_mom_and_die() had not worked.

parent 09849e21
......@@ -3,7 +3,6 @@
<p>
[%|loc(user.email)%]You have logged in with email address %1[%END%]
</p>
[%~ RETURN %]
[% ELSE ~%]
<h2>
......@@ -29,6 +28,7 @@
<input type="hidden" name="previous_list" value="[% previous_list %]" />
<input type="hidden" name="list" value="[% list %]" />
<input type="hidden" name="action" value="sso_login" />
<input type="hidden" name="nomenu" value="[% nomenu %]" />
[% IF sso_number == 1 ~%]
[% FOREACH server = sso ~%]
<input type="hidden" name="auth_service_name"
......@@ -77,6 +77,7 @@
<input type="hidden" name="failure_referer" value="[% failure_referer %]" />
<input type="hidden" name="list" value="[% list %]" />
<input type="hidden" name="action" value="login" />
<input type="hidden" name="nomenu" value="[% nomenu %]" />
<input type="hidden" name="submit" value="submit" />
<div class="row">
<div class="columns">
......
......@@ -28,7 +28,7 @@
[% END -%]
</head>
<body onload="[% IF back_to_mom %] setTimeout('refresh_mom_and_die()',1000);[% END %]">
<body[%IF back_to_mom%] class="backToMom"[%END%]>
[% top_menu = 1 %]
......
......@@ -23,15 +23,20 @@
# along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
// To confirm on a link (A HREF)
function refresh_mom_and_die() {
url = window.opener.location.href;
if (url.indexOf('logout') > -1 ) {
url = sympa.home_url;
}
window.opener.location = url;
self.close();
}
/* Close login page opened as child window. */
$(function() {
$('body.backToMom').each(function(){
setTimeout(function(){
if (window.opener) {
var url = window.opener.location.href;
if (url.indexOf('logout') > -1 )
url = sympa.home_url;
window.opener.location = url;
}
window.close();
}, 1000);
});
});
/* Open in a new window. */
$(function() {
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment