Fix database connection test in installer
This commit is contained in:
parent
273ccc648d
commit
06e1cd15c0
@ -5,7 +5,10 @@
|
||||
<meta charset="utf-8"/>
|
||||
<link rel="apple-touch-icon" sizes="76x76" href="/assets/frontend/img/apple-icon.png">
|
||||
<link rel="icon" type="image/png" href="/assets/frontend/img/favicon.png">
|
||||
|
||||
<meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1"/>
|
||||
<meta name="csrf-token" content="{{ csrf_token() }}">
|
||||
|
||||
<title>@yield('title') - installer</title>
|
||||
<meta content='width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=0, shrink-to-fit=no'
|
||||
name='viewport'/>
|
||||
|
@ -123,18 +123,20 @@ function changeForm(selected) {
|
||||
$("tbody#" + selected + "_settings").show();
|
||||
}
|
||||
|
||||
$(document).ready(function() {
|
||||
var selValue = $("#db_conn option:selected").text();
|
||||
$(document).ready(() => {
|
||||
|
||||
const selValue = $("#db_conn option:selected").text();
|
||||
changeForm(selValue);
|
||||
|
||||
$("#db_conn").change(function(e) {
|
||||
var selValue = $("#db_conn option:selected").text();
|
||||
$("#db_conn").change((e) => {
|
||||
const selValue = $("#db_conn option:selected").text();
|
||||
changeForm(selValue);
|
||||
});
|
||||
|
||||
$("#dbtest_button").click(function(e) {
|
||||
$("#dbtest_button").click((e) => {
|
||||
e.preventDefault();
|
||||
var opts = {
|
||||
const opts = {
|
||||
_token: "{{ csrf_token() }}",
|
||||
db_conn: $("#db_conn option:selected").text(),
|
||||
db_host: $("input[name=db_host]").val(),
|
||||
db_port: $("input[name=db_port]").val(),
|
||||
@ -143,7 +145,7 @@ $(document).ready(function() {
|
||||
db_pass: $("input[name=db_pass]").val(),
|
||||
};
|
||||
|
||||
$.post("{{ route('installer.dbtest') }}", opts, function(data) {
|
||||
$.post("{{ route('installer.dbtest') }}", opts, (data) => {
|
||||
$("#dbtest").html(data);
|
||||
})
|
||||
})
|
||||
|
Loading…
Reference in New Issue
Block a user