Commit 2a6fde9d by John Jarvis

javascript to redirect to the course being accessed

parent fd36c555
...@@ -35,13 +35,18 @@ ...@@ -35,13 +35,18 @@
(function() { (function() {
$(document).delegate('#login-form', 'ajax:success', function(data, json, xhr) { $(document).delegate('#login-form', 'ajax:success', function(data, json, xhr) {
if(json.success) { if(json.success) {
var u=decodeURI(window.location.search);
next=u.split("next=")[1]
if (next) {
location.href=next
} else {
location.href="${reverse('dashboard')}"; location.href="${reverse('dashboard')}";
} }
}
}); });
})(this) })(this)
</script> </script>
</%block> </%block>
<section class="login container"> <section class="login container">
......
Markdown is supported
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