mirror of
https://github.com/invoiceninja/invoiceninja.git
synced 2025-07-09 03:14:30 -04:00
Merge pull request #5054 from beganovich/v5-0803-setup-relative-urls
(v5) Update URLs on setup
This commit is contained in:
commit
ebd56606ed
2
public/js/setup/setup.js
vendored
2
public/js/setup/setup.js
vendored
File diff suppressed because one or more lines are too long
@ -16,6 +16,6 @@
|
|||||||
"/js/clients/quotes/approve.js": "/js/clients/quotes/approve.js?id=85bcae0a646882e56b12",
|
"/js/clients/quotes/approve.js": "/js/clients/quotes/approve.js?id=85bcae0a646882e56b12",
|
||||||
"/js/clients/shared/multiple-downloads.js": "/js/clients/shared/multiple-downloads.js?id=5c35d28cf0a3286e7c45",
|
"/js/clients/shared/multiple-downloads.js": "/js/clients/shared/multiple-downloads.js?id=5c35d28cf0a3286e7c45",
|
||||||
"/js/clients/shared/pdf.js": "/js/clients/shared/pdf.js?id=fc3055d6a099f523ea98",
|
"/js/clients/shared/pdf.js": "/js/clients/shared/pdf.js?id=fc3055d6a099f523ea98",
|
||||||
"/js/setup/setup.js": "/js/setup/setup.js?id=44bc4a71fc1d3606fc8e",
|
"/js/setup/setup.js": "/js/setup/setup.js?id=8c46629d6d43a29fce69",
|
||||||
"/css/card-js.min.css": "/css/card-js.min.css?id=62afeb675235451543ad"
|
"/css/card-js.min.css": "/css/card-js.min.css?id=62afeb675235451543ad"
|
||||||
}
|
}
|
||||||
|
11
resources/js/setup/setup.js
vendored
11
resources/js/setup/setup.js
vendored
@ -23,6 +23,8 @@ class Setup {
|
|||||||
}
|
}
|
||||||
|
|
||||||
handleDatabaseCheck() {
|
handleDatabaseCheck() {
|
||||||
|
let url = document.querySelector('meta[name=setup-db-check]').content;
|
||||||
|
|
||||||
let data = {
|
let data = {
|
||||||
db_host: document.querySelector('input[name="db_host"]').value,
|
db_host: document.querySelector('input[name="db_host"]').value,
|
||||||
db_port: document.querySelector('input[name="db_port"]').value,
|
db_port: document.querySelector('input[name="db_port"]').value,
|
||||||
@ -36,7 +38,7 @@ class Setup {
|
|||||||
|
|
||||||
this.checkDbButton.disabled = true;
|
this.checkDbButton.disabled = true;
|
||||||
|
|
||||||
Axios.post('/setup/check_db', data)
|
Axios.post(url, data)
|
||||||
.then((response) =>
|
.then((response) =>
|
||||||
this.handleSuccess(this.checkDbAlert, 'mail-wrapper')
|
this.handleSuccess(this.checkDbAlert, 'mail-wrapper')
|
||||||
)
|
)
|
||||||
@ -46,6 +48,8 @@ class Setup {
|
|||||||
}
|
}
|
||||||
|
|
||||||
handleSmtpCheck() {
|
handleSmtpCheck() {
|
||||||
|
let url = document.querySelector('meta[name=setup-email-check]').content;
|
||||||
|
|
||||||
let data = {
|
let data = {
|
||||||
mail_driver: document.querySelector('select[name="mail_driver"]')
|
mail_driver: document.querySelector('select[name="mail_driver"]')
|
||||||
.value,
|
.value,
|
||||||
@ -71,7 +75,7 @@ class Setup {
|
|||||||
return (this.checkSmtpButton.disabled = false);
|
return (this.checkSmtpButton.disabled = false);
|
||||||
}
|
}
|
||||||
|
|
||||||
Axios.post('/setup/check_mail', data)
|
Axios.post(url, data)
|
||||||
.then((response) => {
|
.then((response) => {
|
||||||
this.handleSuccess(this.checkSmtpAlert, 'account-wrapper');
|
this.handleSuccess(this.checkSmtpAlert, 'account-wrapper');
|
||||||
this.handleSuccess(this.checkSmtpAlert, 'submit-wrapper');
|
this.handleSuccess(this.checkSmtpAlert, 'submit-wrapper');
|
||||||
@ -83,9 +87,10 @@ class Setup {
|
|||||||
}
|
}
|
||||||
|
|
||||||
handleTestPdfCheck() {
|
handleTestPdfCheck() {
|
||||||
|
let url = document.querySelector('meta[name=setup-pdf-check]').content;
|
||||||
this.checkPdfButton.disabled = true;
|
this.checkPdfButton.disabled = true;
|
||||||
|
|
||||||
Axios.post('/setup/check_pdf', {})
|
Axios.post(url, {})
|
||||||
.then((response) => {
|
.then((response) => {
|
||||||
try {
|
try {
|
||||||
let win = window.open(response.data.url, '_blank');
|
let win = window.open(response.data.url, '_blank');
|
||||||
|
@ -71,6 +71,12 @@
|
|||||||
{{-- Feel free to push anything to header using @push('header') --}}
|
{{-- Feel free to push anything to header using @push('header') --}}
|
||||||
@stack('head')
|
@stack('head')
|
||||||
|
|
||||||
|
@if(strpos(Request::url(),'setup'))
|
||||||
|
<meta name="setup-pdf-check" content="{{ str_replace("setup", "", Request::url())}}setup/check_pdf">
|
||||||
|
<meta name="setup-db-check" content="{{ str_replace("setup", "", Request::url())}}setup/check_db">
|
||||||
|
<meta name="setup-email-check" content="{{ str_replace("setup", "", Request::url())}}setup/check_mail">
|
||||||
|
@endif
|
||||||
|
|
||||||
<link rel="stylesheet" type="text/css" href="https://cdn.jsdelivr.net/npm/cookieconsent@3/build/cookieconsent.min.css" />
|
<link rel="stylesheet" type="text/css" href="https://cdn.jsdelivr.net/npm/cookieconsent@3/build/cookieconsent.min.css" />
|
||||||
</head>
|
</head>
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user