blob: 638e0add534739211636c33b45fef184d163495b (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
|
"use strict"
function submit_login_form() {
var data = {
email_address : $('#login_email_address').val(),
password : $('#login_password').val()
};
// TODO: validate
$.ajax({
type : "POST",
url: '/login',
async : false,
cache : false,
data : JSON.stringify(data),
dataType : 'json',
contentType : "application/json; charset=utf-8",
success : function () {
document.location = "/index";
},
error : function (xhr, status, err_thrown) {
$('#login-view_failed-login').show();
}
});
}
|