Commit df44ade5 authored by Kostas Papadimitriou's avatar Kostas Papadimitriou
Browse files

astakos: Use proper update_token url

Propagate update_token url via window object to the updateToken js function.
parent 8ca30d54
......@@ -124,10 +124,10 @@
};
var MIDDLEWARE_TOKEN_INPUT_NAME = window.MIDDLEWARE_TOKEN_INPUT_NAME || 'csrfmiddlewaretoken';
var CHANGE_TOKEN_URL = window.CHANGE_TOKEN_URL || '/im/profile/update_token';
function renewToken() {
var MIDDLEWARE_TOKEN_INPUT_NAME = window.MIDDLEWARE_TOKEN_INPUT_NAME || 'csrfmiddlewaretoken';
var CHANGE_TOKEN_URL = window.CHANGE_TOKEN_URL;
var csrf_value = $("input[name="+MIDDLEWARE_TOKEN_INPUT_NAME+"]").val();
var url = CHANGE_TOKEN_URL;
var form = $("<form>");
......
......@@ -5,6 +5,9 @@
{% block headjs %}
{{ block.super }}
<script src="{{ IM_STATIC_URL }}js/auth_methods.js"></script>
<script>
var CHANGE_TOKEN_URL = '{% url update_token %}';
</script>
{% endblock %}
{% block body %}
......
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