summaryrefslogtreecommitdiff
path: root/res
diff options
context:
space:
mode:
authorLV-426 <lv-426@taproot.org.il>2015-02-04 03:05:19 +0200
committerLV-426 <lv-426@taproot.org.il>2015-02-04 03:05:19 +0200
commit69aa1c4b335136c1028bec5a9b83f17eeb8b0b8d (patch)
tree3376de51b704b232a6db91252d2420d172958329 /res
parent94980b6de8abf7709331ed282b609796deb2c867 (diff)
login.html: refactor code into user_login.js
Diffstat (limited to 'res')
-rw-r--r--res/templates/login.html27
1 files changed, 1 insertions, 26 deletions
diff --git a/res/templates/login.html b/res/templates/login.html
index 05736f63..21ccbf96 100644
--- a/res/templates/login.html
+++ b/res/templates/login.html
@@ -3,32 +3,7 @@
{% block head %}
{{ super() }}
<script src="/static/lib/jquery.js" type="text/javascript"></script>
-<script type="text/javascript">
- function submit_login_form() {
- var data = {
- username : $('#login_username').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) {
- $('#failed-login').show();
- }
- });
- }
-</script>
+<script src="/static/user_login.js" type="text/javascript"></script>
{% endblock %}
{% block content %}
<div class="login-background">