mirror of
https://github.com/invoiceninja/invoiceninja.git
synced 2024-11-10 13:12:50 +01:00
Update Javascript to use new URLs from meta tags
This commit is contained in:
parent
722a416839
commit
d20e5a0ebf
11
resources/js/setup/setup.js
vendored
11
resources/js/setup/setup.js
vendored
@ -23,6 +23,8 @@ class Setup {
|
||||
}
|
||||
|
||||
handleDatabaseCheck() {
|
||||
let url = document.querySelector('meta[name=setup-db-check]').content;
|
||||
|
||||
let data = {
|
||||
db_host: document.querySelector('input[name="db_host"]').value,
|
||||
db_port: document.querySelector('input[name="db_port"]').value,
|
||||
@ -36,7 +38,7 @@ class Setup {
|
||||
|
||||
this.checkDbButton.disabled = true;
|
||||
|
||||
Axios.post('/setup/check_db', data)
|
||||
Axios.post(url, data)
|
||||
.then((response) =>
|
||||
this.handleSuccess(this.checkDbAlert, 'mail-wrapper')
|
||||
)
|
||||
@ -46,6 +48,8 @@ class Setup {
|
||||
}
|
||||
|
||||
handleSmtpCheck() {
|
||||
let url = document.querySelector('meta[name=setup-email-check]').content;
|
||||
|
||||
let data = {
|
||||
mail_driver: document.querySelector('select[name="mail_driver"]')
|
||||
.value,
|
||||
@ -71,7 +75,7 @@ class Setup {
|
||||
return (this.checkSmtpButton.disabled = false);
|
||||
}
|
||||
|
||||
Axios.post('/setup/check_mail', data)
|
||||
Axios.post(url, data)
|
||||
.then((response) => {
|
||||
this.handleSuccess(this.checkSmtpAlert, 'account-wrapper');
|
||||
this.handleSuccess(this.checkSmtpAlert, 'submit-wrapper');
|
||||
@ -83,9 +87,10 @@ class Setup {
|
||||
}
|
||||
|
||||
handleTestPdfCheck() {
|
||||
let url = document.querySelector('meta[name=setup-pdf-check]').content;
|
||||
this.checkPdfButton.disabled = true;
|
||||
|
||||
Axios.post('/setup/check_pdf', {})
|
||||
Axios.post(url, {})
|
||||
.then((response) => {
|
||||
try {
|
||||
let win = window.open(response.data.url, '_blank');
|
||||
|
Loading…
Reference in New Issue
Block a user