javascript to redirect to the course being accessed
This commit is contained in:
@@ -33,15 +33,20 @@
|
|||||||
|
|
||||||
<script type="text/javascript">
|
<script type="text/javascript">
|
||||||
(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) {
|
||||||
location.href="${reverse('dashboard')}";
|
var u=decodeURI(window.location.search);
|
||||||
|
next=u.split("next=")[1]
|
||||||
|
if (next) {
|
||||||
|
location.href=next
|
||||||
|
} else {
|
||||||
|
location.href="${reverse('dashboard')}";
|
||||||
|
}
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
})(this)
|
})(this)
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
|
|
||||||
</%block>
|
</%block>
|
||||||
|
|
||||||
<section class="login container">
|
<section class="login container">
|
||||||
|
|||||||
Reference in New Issue
Block a user