mirror of
https://github.com/jwinterm/modoboa.git
synced 2026-10-17 05:41:25 +02:00
Merge pull request #2583 from bearstech/dynamic-root-url
set root_url js var in template so we can use a PATH_PREFIX without b…
This commit is contained in:
@@ -177,7 +177,7 @@ TwocolsNav.prototype = {
|
||||
startTFASetup: function (evt) {
|
||||
evt.preventDefault();
|
||||
$.ajax({
|
||||
url: '/api/v1/account/tfa/setup/',
|
||||
url: window.root_url + '/api/v1/account/tfa/setup/',
|
||||
type: 'post',
|
||||
contentType: 'application/json'
|
||||
}).done(function (resp) {
|
||||
@@ -191,7 +191,7 @@ TwocolsNav.prototype = {
|
||||
pin_code: $('#pin-code').val()
|
||||
};
|
||||
$.ajax({
|
||||
url: '/api/v1/account/tfa/setup/check/',
|
||||
url: window.root_url + '/api/v1/account/tfa/setup/check/',
|
||||
type: 'post',
|
||||
global: false,
|
||||
data: JSON.stringify(data),
|
||||
|
||||
@@ -87,6 +87,7 @@
|
||||
<script src="{% static 'js/top_notifications.js' %}" type="text/javascript"></script>
|
||||
<script type="text/javascript" src="{% url 'javascript-catalog' %}"></script>
|
||||
<script type="text/javascript">
|
||||
var root_url = "{% url 'core:root' %}".replace(/\/$/, "");
|
||||
var top_notifications;
|
||||
var userLang = "{{ LANGUAGE_CODE }}";
|
||||
|
||||
|
||||
Reference in New Issue
Block a user