Commit 80bcf060 by John Jarvis

javascript to redirect the user to the dashboard after reg

parent 83745348
......@@ -226,3 +226,19 @@
</div>
</aside>
</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>
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