summaryrefslogtreecommitdiff
path: root/modules/user/js/user.js
blob: 021163b1599cbe22259957f87d4c19bceef7afbb (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
/**
 * Ajaxify user login form
 */
function ajaxify_login_form(event) {
  event.preventDefault();
  $("#gLoginForm").ajaxForm({
    target: "#gDialog",
    success: function(responseText, statusText) {
      if (!responseText) {
        window.location.reload();
      } else {
        ajaxify_login_form(event);
      }
    }
  });
  return false;
}

$("document").ready(function() {
    $.listen("submit", "#gLoginForm", function(event) {
      ajaxify_login_form(event);
    });
});