various html and js fixes

Signed-off-by: Maurice Preuß (envoyr) <envoyr@froxlor.org>
This commit is contained in:
Maurice Preuß (envoyr)
2023-11-11 21:29:02 +01:00
parent 3f1b792f60
commit 287ad84b18
14 changed files with 29 additions and 19 deletions

View File

@@ -18,3 +18,4 @@ window.Chart = Chart;
import axios from 'axios';
window.axios = axios;
window.axios.defaults.headers.common['X-Requested-With'] = 'XMLHttpRequest';
window.axios.defaults.headers.common['X-CSRF-TOKEN'] = document.querySelector('meta[name="csrf-token"]').getAttribute('content');

View File

@@ -31,6 +31,9 @@ export default function () {
planid: pid
},
dataType: "json",
beforeSend: function(request) {
request.setRequestHeader('X-CSRF-TOKEN', document.querySelector('meta[name="csrf-token"]').getAttribute('content'));
},
success: function (json) {
for (var i in json) {
if (i == 'email_imap' || i == 'email_pop3' || i == 'perlenabled' || i == 'phpenabled' || i == 'dnsenabled' || i == 'logviewenabled') {