javascript to redirect the user to the dashboard after reg
This commit is contained in:
@@ -225,4 +225,20 @@
|
||||
<p>Looking for help in registering with edX? View our <a href="#">help section for answers to commonly asked questions</a></p>
|
||||
</div>
|
||||
</aside>
|
||||
</section>
|
||||
</section>
|
||||
|
||||
<script type="text/javascript">
|
||||
(function() {
|
||||
$(document).delegate('#register-form', 'ajax:success', function(data, json, xhr) {
|
||||
if(json.success) {
|
||||
location.href="${reverse('dashboard')}";
|
||||
} else {
|
||||
$(".field-error").removeClass('field-error');
|
||||
$('#register_error').html(json.value).stop().css("display", "block");
|
||||
$("[data-field='"+json.field+"']").addClass('field-error')
|
||||
}
|
||||
});
|
||||
})(this)
|
||||
</script>
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user