fixed #2525
This commit is contained in:
parent
7f7d79728f
commit
055a6539e1
|
|
@ -3,7 +3,6 @@ body {
|
|||
font-size: 16px;
|
||||
font-family: "Montserrat", sans-serif;
|
||||
color: #000311;
|
||||
text-align: center;
|
||||
background: #fff;
|
||||
position: relative;
|
||||
height: 100%;
|
||||
|
|
@ -13,6 +12,7 @@ a { color: rgb(0, 65, 255); text-decoration: none;}
|
|||
|
||||
.initial-display{
|
||||
padding-top: 50px;
|
||||
text-align: center;
|
||||
}
|
||||
|
||||
.initial-display .logo {
|
||||
|
|
@ -24,20 +24,17 @@ a { color: rgb(0, 65, 255); text-decoration: none;}
|
|||
color: #333333;
|
||||
text-align: center;
|
||||
font-weight: 600;
|
||||
margin-top: 30px;
|
||||
margin-top: 10px;
|
||||
padding-bottom: 10px;
|
||||
}
|
||||
|
||||
.prepare-btn {
|
||||
box-shadow: 0 1px 4px 0 rgba(0, 0, 0, 0.2), 0 0 8px 0 rgba(0, 0, 0, 0.1);
|
||||
border-radius: 3px;
|
||||
border: none;
|
||||
cursor: pointer;
|
||||
font: inherit;
|
||||
display: inline-block;
|
||||
background: #0041FF;
|
||||
color: #ffffff;
|
||||
padding: 10px 20px;
|
||||
margin-top: 20px;
|
||||
.card {
|
||||
border-radius: 5px;
|
||||
box-shadow: 1px 9px 18px rgba(62, 85, 120, 0.45);
|
||||
}
|
||||
|
||||
.btn-primary {
|
||||
background-color: #0041FF;
|
||||
}
|
||||
|
||||
.warning {
|
||||
|
|
@ -51,38 +48,47 @@ a { color: rgb(0, 65, 255); text-decoration: none;}
|
|||
padding-bottom: 20px;
|
||||
}
|
||||
|
||||
.left-patern {
|
||||
position: absolute;
|
||||
left: 0;
|
||||
bottom: 0;
|
||||
.form-control{
|
||||
border: 2px solid #C7C7C7;
|
||||
border-radius: 3px;
|
||||
-webkit-transition: 0.2s cubic-bezier(0.4, 0, 0.2, 1);
|
||||
transition: 0.2s cubic-bezier(0.4, 0, 0.2, 1);
|
||||
padding: 0px 10px;
|
||||
font-size: 15px;
|
||||
margin-top: 10px;
|
||||
}
|
||||
|
||||
.right-patern {
|
||||
position: absolute;
|
||||
right: 0;
|
||||
bottom: 0;
|
||||
.form-control:focus {
|
||||
border-color: #0041FF;
|
||||
box-shadow: 0px 1px 1px rgba(0, 0, 0, 0.075) inset, 0px 0px 8px rgba(11, 50, 139, 0.5);
|
||||
}
|
||||
|
||||
.content {
|
||||
border-radius: 5px;
|
||||
box-shadow: 1px 8px 18px rgba(62, 85, 120, 0.45);
|
||||
min-height: 300px;
|
||||
width: 600px;
|
||||
margin-left: calc(50% - 300px);
|
||||
text-align: left;
|
||||
overflow-y: auto;
|
||||
.form-group label.required::after {
|
||||
margin-left: 1px;
|
||||
content: "*";
|
||||
color: #FC6868;
|
||||
font-weight: 700;
|
||||
display: inline-block;
|
||||
}
|
||||
|
||||
.form-error {
|
||||
color: #ff5656 !important;
|
||||
}
|
||||
|
||||
.control-group.has-error .control {
|
||||
border-color: #FC6868 !important;
|
||||
}
|
||||
|
||||
.requirements_list {
|
||||
width: 90%;
|
||||
list-style: none;
|
||||
margin-left: 5%;
|
||||
margin-left: 4%;
|
||||
padding:0;
|
||||
}
|
||||
|
||||
.requirements_list li {
|
||||
padding: 0 8px 8px;
|
||||
margin-bottom: 8px;
|
||||
padding: 0 10px 10px;
|
||||
margin-bottom: 10px;
|
||||
border-bottom: 1px dashed #dcdcdc;
|
||||
line-height: normal;
|
||||
}
|
||||
|
|
@ -94,11 +100,51 @@ a { color: rgb(0, 65, 255); text-decoration: none;}
|
|||
color:#9b9b9b;
|
||||
}
|
||||
|
||||
.content .cp-round {
|
||||
position: auto !important;
|
||||
.title {
|
||||
font-size: 16px;
|
||||
color: #151515;
|
||||
line-height: 30px;
|
||||
text-align: left;
|
||||
margin-top: 30px;
|
||||
margin-bottom: 10px;
|
||||
text-align: center;
|
||||
}
|
||||
|
||||
.content .cp-round:before {
|
||||
.welcome, .environment, .migration, .permission, .admin, .finish {
|
||||
display : none;
|
||||
}
|
||||
|
||||
pre.bash {
|
||||
background-color: black;
|
||||
color: white;
|
||||
font-size: medium ;
|
||||
font-family: Consolas,Monaco,Lucida Console,Liberation Mono,DejaVu Sans Mono,Bitstream Vera Sans Mono,Courier New, monospace;
|
||||
width: 100%;
|
||||
display: inline-block;
|
||||
height: 100%;
|
||||
}
|
||||
|
||||
.check {
|
||||
line-height: 35px;
|
||||
margin-left: 25%;
|
||||
}
|
||||
|
||||
.composer {
|
||||
position: auto;
|
||||
top: calc(50% + 24px);
|
||||
display: none;
|
||||
}
|
||||
|
||||
.message {
|
||||
padding-left: 140px;
|
||||
}
|
||||
|
||||
.cp-round {
|
||||
position: auto !important;
|
||||
padding-bottom: 130px;
|
||||
}
|
||||
|
||||
.cp-round:before {
|
||||
border-radius: 50%;
|
||||
content: " ";
|
||||
width: 48px;
|
||||
|
|
@ -114,7 +160,7 @@ a { color: rgb(0, 65, 255); text-decoration: none;}
|
|||
left: calc(50% - 24px);
|
||||
}
|
||||
|
||||
.content .cp-round:after {
|
||||
.cp-round:after {
|
||||
border-radius: 50%;
|
||||
content: " ";
|
||||
width: 48px;
|
||||
|
|
@ -136,123 +182,179 @@ a { color: rgb(0, 65, 255); text-decoration: none;}
|
|||
100% { transform: rotate(360deg); }
|
||||
}
|
||||
|
||||
.title {
|
||||
font-size: 16px;
|
||||
color: #151515;
|
||||
line-height: 30px;
|
||||
text-align: left;
|
||||
margin-top: 30px;
|
||||
margin-bottom: 10px;
|
||||
text-align: center;
|
||||
}
|
||||
|
||||
span {
|
||||
font-size: 16px;
|
||||
color: #333333;
|
||||
line-height: 30px;
|
||||
}
|
||||
|
||||
.welcome, .environment, .migration, .permission, .admin, .finish {
|
||||
display : none;
|
||||
}
|
||||
|
||||
.control-group {
|
||||
display: block;
|
||||
margin-bottom: 25px;
|
||||
font-size: 15px;
|
||||
color: #333333;
|
||||
width: 750px;
|
||||
max-width: 100%;
|
||||
position: relative;
|
||||
}
|
||||
|
||||
.control-group label {
|
||||
display: block;
|
||||
color: #3a3a3a;
|
||||
}
|
||||
|
||||
.control-group .control {
|
||||
background: #fff;
|
||||
border: 2px solid #C7C7C7;
|
||||
border-radius: 3px;
|
||||
width: 100%;
|
||||
height: 36px;
|
||||
display: inline-block;
|
||||
vertical-align: middle;
|
||||
-webkit-transition: 0.2s cubic-bezier(0.4, 0, 0.2, 1);
|
||||
transition: 0.2s cubic-bezier(0.4, 0, 0.2, 1);
|
||||
padding: 0px 10px;
|
||||
font-size: 15px;
|
||||
margin-top: 10px;
|
||||
margin-bottom: 5px;
|
||||
}
|
||||
|
||||
.control-group label.required::after {
|
||||
content: "*";
|
||||
color: #FC6868;
|
||||
font-weight: 700;
|
||||
display: inline-block;
|
||||
}
|
||||
|
||||
.form-error {
|
||||
color: #ff5656 !important;
|
||||
}
|
||||
|
||||
.control-group.has-error .control {
|
||||
border-color: #FC6868 !important;
|
||||
}
|
||||
|
||||
pre.bash {
|
||||
background-color: black;
|
||||
color: white;
|
||||
font-size: medium ;
|
||||
font-family: Consolas,Monaco,Lucida Console,Liberation Mono,DejaVu Sans Mono,Bitstream Vera Sans Mono,Courier New, monospace;
|
||||
width: 100%;
|
||||
display: inline-block;
|
||||
height: 100%;
|
||||
}
|
||||
|
||||
.check {
|
||||
line-height: 35px;
|
||||
margin-left: 25%;
|
||||
}
|
||||
|
||||
.composer {
|
||||
position: absolute;
|
||||
top: calc(50% + 24px);
|
||||
display: none;
|
||||
}
|
||||
|
||||
.message {
|
||||
padding-left: 140px;
|
||||
}
|
||||
|
||||
@media (min-width: 1281px) {
|
||||
.content {
|
||||
padding: 2rem 0;
|
||||
}
|
||||
|
||||
.content {
|
||||
max-height: 484px;
|
||||
margin: 20px auto;
|
||||
}
|
||||
}
|
||||
|
||||
@media (min-width: 768px) and (max-width: 1024px) and (orientation: landscape) {
|
||||
.initial-display{
|
||||
padding-top: 15px;
|
||||
}
|
||||
|
||||
.content {
|
||||
padding: 1rem 0;
|
||||
}
|
||||
|
||||
.content {
|
||||
max-height: 488px;
|
||||
margin: 30px auto;
|
||||
}
|
||||
|
||||
.initial-display p {
|
||||
margin-top: 4px;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/* Select */
|
||||
|
||||
.select2-container--bootstrap4 .select2-selection--single {
|
||||
height: calc(2.25rem + 2px) !important; }
|
||||
.select2-container--bootstrap4 .select2-selection--single .select2-selection__placeholder {
|
||||
color: #757575;
|
||||
line-height: 2.25rem; }
|
||||
.select2-container--bootstrap4 .select2-selection--single .select2-selection__arrow {
|
||||
position: absolute;
|
||||
top: 50%;
|
||||
right: 3px;
|
||||
width: 20px; }
|
||||
.select2-container--bootstrap4 .select2-selection--single .select2-selection__arrow b {
|
||||
top: 60%;
|
||||
border-color: #343a40 transparent transparent transparent;
|
||||
border-style: solid;
|
||||
border-width: 5px 4px 0 4px;
|
||||
width: 0;
|
||||
height: 0;
|
||||
left: 50%;
|
||||
margin-left: -4px;
|
||||
margin-top: -2px;
|
||||
position: absolute; }
|
||||
.select2-container--bootstrap4 .select2-selection--single .select2-selection__rendered {
|
||||
line-height: 2.25rem; }
|
||||
|
||||
.select2-search--dropdown .select2-search__field {
|
||||
border: 1px solid #ced4da;
|
||||
border-radius: 0.25rem; }
|
||||
|
||||
.select2-results__message {
|
||||
color: #6c757d; }
|
||||
|
||||
.select2-container--bootstrap4 .select2-selection--multiple {
|
||||
min-height: calc(2.25rem + 2px) !important; }
|
||||
.select2-container--bootstrap4 .select2-selection--multiple .select2-selection__rendered {
|
||||
-webkit-box-sizing: border-box;
|
||||
box-sizing: border-box;
|
||||
list-style: none;
|
||||
margin: 0;
|
||||
padding: 0 5px;
|
||||
width: 100%; }
|
||||
.select2-container--bootstrap4 .select2-selection--multiple .select2-selection__choice {
|
||||
color: #343a40;
|
||||
border: 1px solid #bdc6d0;
|
||||
border-radius: 0.2rem;
|
||||
padding: 0;
|
||||
padding-right: 5px;
|
||||
cursor: pointer;
|
||||
float: left;
|
||||
margin-top: 0.3em;
|
||||
margin-right: 5px; }
|
||||
.select2-container--bootstrap4 .select2-selection--multiple .select2-selection__choice__remove {
|
||||
color: #bdc6d0;
|
||||
font-weight: bold;
|
||||
margin-left: 3px;
|
||||
margin-right: 1px;
|
||||
padding-right: 3px;
|
||||
padding-left: 3px;
|
||||
float: left; }
|
||||
.select2-container--bootstrap4 .select2-selection--multiple .select2-selection__choice__remove:hover {
|
||||
color: #343a40; }
|
||||
|
||||
.select2-container {
|
||||
display: block; }
|
||||
.select2-container *:focus {
|
||||
outline: 0; }
|
||||
|
||||
.input-group .select2-container--bootstrap4 {
|
||||
-webkit-box-flex: 1;
|
||||
-ms-flex-positive: 1;
|
||||
flex-grow: 1; }
|
||||
|
||||
.input-group-prepend ~ .select2-container--bootstrap4 .select2-selection {
|
||||
border-top-left-radius: 0;
|
||||
border-bottom-left-radius: 0; }
|
||||
|
||||
.input-group > .select2-container--bootstrap4:not(:last-child) .select2-selection {
|
||||
border-top-right-radius: 0;
|
||||
border-bottom-right-radius: 0; }
|
||||
|
||||
.select2-container--bootstrap4 .select2-selection {
|
||||
background-color: #fff;
|
||||
border: 1px solid #ced4da;
|
||||
border-radius: 0.25rem;
|
||||
-webkit-transition: border-color 0.15s ease-in-out, -webkit-box-shadow 0.15s ease-in-out;
|
||||
transition: border-color 0.15s ease-in-out, -webkit-box-shadow 0.15s ease-in-out;
|
||||
transition: border-color 0.15s ease-in-out, box-shadow 0.15s ease-in-out;
|
||||
transition: border-color 0.15s ease-in-out, box-shadow 0.15s ease-in-out, -webkit-box-shadow 0.15s ease-in-out;
|
||||
width: 100%; }
|
||||
@media screen and (prefers-reduced-motion: reduce) {
|
||||
.select2-container--bootstrap4 .select2-selection {
|
||||
-webkit-transition: none;
|
||||
transition: none; } }
|
||||
|
||||
.select2-container--bootstrap4.select2-container--focus .select2-selection {
|
||||
border-color: #0041FF;
|
||||
-webkit-box-shadow: 0 0 0 0.2rem rgba(0, 123, 255, 0.25);
|
||||
box-shadow: 0 0 0 0.2rem rgba(0, 123, 255, 0.25); }
|
||||
|
||||
.select2-container--bootstrap4.select2-container--focus.select2-container--open .select2-selection {
|
||||
border-bottom: none;
|
||||
border-bottom-left-radius: 0;
|
||||
border-bottom-right-radius: 0; }
|
||||
|
||||
.select2-container--bootstrap4.select2-container--disabled .select2-selection, .select2-container--bootstrap4.select2-container--disabled.select2-container--focus .select2-selection {
|
||||
background-color: #e9ecef;
|
||||
cursor: not-allowed;
|
||||
border-color: #ced4da;
|
||||
-webkit-box-shadow: none;
|
||||
box-shadow: none; }
|
||||
|
||||
.select2-container--bootstrap4.select2-container--disabled .select2-search__field, .select2-container--bootstrap4.select2-container--disabled.select2-container--focus .select2-search__field {
|
||||
background-color: transparent; }
|
||||
|
||||
select.is-invalid ~ .select2-container--bootstrap4 .select2-selection,
|
||||
form.was-validated select:invalid ~ .select2-container--bootstrap4 .select2-selection {
|
||||
border-color: #dc3545; }
|
||||
|
||||
select.is-valid ~ .select2-container--bootstrap4 .select2-selection,
|
||||
form.was-validated select:valid ~ .select2-container--bootstrap4 .select2-selection {
|
||||
border-color: #28a745; }
|
||||
|
||||
.select2-container--bootstrap4 .select2-dropdown {
|
||||
border-color: #ced4da;
|
||||
border-top: none;
|
||||
border-top-left-radius: 0;
|
||||
border-top-right-radius: 0; }
|
||||
.select2-container--bootstrap4 .select2-dropdown.select2-dropdown--above {
|
||||
border-top: 1px solid #ced4da;
|
||||
border-top-left-radius: 0.25rem;
|
||||
border-top-right-radius: 0.25rem; }
|
||||
.select2-container--bootstrap4 .select2-dropdown .select2-results__option[aria-selected=true] {
|
||||
background-color: #e9ecef; }
|
||||
|
||||
.select2-container--bootstrap4 .select2-results__option--highlighted,
|
||||
.select2-container--bootstrap4 .select2-results__option--highlighted.select2-results__option[aria-selected=true] {
|
||||
background-color: #0041FF;
|
||||
color: #f8f9fa; }
|
||||
|
||||
.select2-container--bootstrap4 .select2-results__option[role=group] {
|
||||
padding: 0; }
|
||||
|
||||
.select2-container--bootstrap4 .select2-results > .select2-results__options {
|
||||
max-height: 15em;
|
||||
overflow-y: auto; }
|
||||
|
||||
.select2-container--bootstrap4 .select2-results__group {
|
||||
padding: 6px;
|
||||
display: list-item;
|
||||
color: #6c757d; }
|
||||
|
||||
.select2-container--bootstrap4 .select2-selection__clear {
|
||||
width: 1.2em;
|
||||
height: 1.2em;
|
||||
line-height: 1.15em;
|
||||
padding-left: 0.3em;
|
||||
margin-top: 0.5em;
|
||||
border-radius: 100%;
|
||||
background-color: #6c757d;
|
||||
color: #f8f9fa;
|
||||
float: right;
|
||||
margin-right: 0.3em; }
|
||||
.select2-container--bootstrap4 .select2-selection__clear:hover {
|
||||
background-color: #343a40; }
|
||||
|
||||
|
|
@ -9,11 +9,20 @@ $data = array();
|
|||
// validate the variables
|
||||
// if any of these variables don't exist, add an error to our $errors array
|
||||
|
||||
if (empty($_POST['app_name']))
|
||||
$errors['app_name'] = 'App Name is required.';
|
||||
|
||||
if (empty($_POST['app_url']))
|
||||
$errors['app_url'] = 'App Url is required.';
|
||||
|
||||
if (empty($_POST['app_name']))
|
||||
$errors['app_name'] = 'App Name is required.';
|
||||
if (empty($_POST['app_currency']))
|
||||
$errors['app_currency'] = 'The application currency is required.';
|
||||
|
||||
if (empty($_POST['app_locale']))
|
||||
$errors['app_locale'] = 'Please select a locale for the application.';
|
||||
|
||||
if (empty($_POST['app_timezone']))
|
||||
$errors['app_timezone'] = 'The application timezone is required.';
|
||||
|
||||
if (empty($_POST['host_name']))
|
||||
$errors['host_name'] = 'Host Name is required.';
|
||||
|
|
@ -51,7 +60,7 @@ $data = array();
|
|||
//return a response
|
||||
// if there are any errors in our errors array, return a success boolean of false
|
||||
|
||||
if ( ! empty($errors)) {
|
||||
if (! empty($errors)) {
|
||||
|
||||
// if there are items in our errors array, return those errors
|
||||
$data['success'] = false;
|
||||
|
|
@ -101,6 +110,9 @@ $data = array();
|
|||
$keyValueData['DB_PASSWORD'] = $_POST["user_password"];
|
||||
$keyValueData['APP_NAME'] = $_POST["app_name"];
|
||||
$keyValueData['APP_URL'] = $_POST["app_url"];
|
||||
$keyValueData['APP_CURRENCY'] = $_POST["app_currency"];
|
||||
$keyValueData['APP_LOCALE'] = $_POST["app_locale"];
|
||||
$keyValueData['APP_TIMEZONE'] = $_POST["app_timezone"];
|
||||
$keyValueData['DB_CONNECTION'] = $_POST["database_connection"];
|
||||
$keyValueData['DB_PORT'] = $_POST["port_name"];
|
||||
|
||||
|
|
|
|||
|
|
@ -1,201 +0,0 @@
|
|||
<html>
|
||||
|
||||
<body>
|
||||
|
||||
<div class="container environment" id="environment">
|
||||
<div class="initial-display">
|
||||
<p>Environment Configuration</p>
|
||||
|
||||
<form action="EnvConfig.php" method="POST" id="environment-form">
|
||||
<div class="content">
|
||||
<div class="databse-error" style="text-align: center; padding-top: 5px" id="database_error">
|
||||
</div>
|
||||
<div class="form-container" style="padding: 10%; padding-top: 10px">
|
||||
<div class="control-group" id="app_name">
|
||||
<label for="app_name" class="required">App Name</label>
|
||||
<input type = "text" name = "app_name" class = "control"
|
||||
value = "Bagisto_"
|
||||
data-validation="required length" data-validation-length="max50"
|
||||
>
|
||||
</div>
|
||||
|
||||
<div class="control-group" id="app_url">
|
||||
<label for="app_url" class="required">App URL</label>
|
||||
<input type="text" name="app_url" class="control" value="https://<?php echo $_SERVER['HTTP_HOST']; ?>"
|
||||
placeholder="http://localhost"
|
||||
data-validation="required length" data-validation-length="max50">
|
||||
</div>
|
||||
|
||||
<div class="control-group">
|
||||
<label for="database_connection" class="required">
|
||||
Database Connection
|
||||
</label>
|
||||
<select name="database_connection" id="database_connection" class="control">
|
||||
<option value="mysql" selected>Mysql</option>
|
||||
<option value="sqlite">SQlite</option>
|
||||
<option value="pgsql">pgSQL</option>
|
||||
<option value="sqlsrv">SQLSRV</option>
|
||||
</select>
|
||||
</div>
|
||||
|
||||
<div class="control-group" id="port_name">
|
||||
<label for="port_name" class="required">Database Port</label>
|
||||
<input type="text" name="port_name" class="control" value="3306" placeholder="3306"
|
||||
data-validation="required alphanumeric number length" data-validation-length="max5">
|
||||
</div>
|
||||
|
||||
<div class="control-group" id="host_name">
|
||||
<label for="host_name" class="required">Database Host</label>
|
||||
<input type="text" name="host_name" class="control" value="127.0.0.1"
|
||||
placeholder="127.0.0.1"
|
||||
data-validation="required length" data-validation-length="max50">
|
||||
</div>
|
||||
|
||||
<div class="control-group" id="database_name">
|
||||
<label for="database_name" class="required">Database Name</label>
|
||||
<input type="text" name="database_name" class="control"
|
||||
placeholder="database name"
|
||||
data-validation="length required" data-validation-length="max50">
|
||||
</div>
|
||||
|
||||
<div class="control-group" id="user_name">
|
||||
<label for="user_name" class="required">User Name</label>
|
||||
<input type="text" name="user_name" class="control"
|
||||
value = "bagisto_"
|
||||
data-validation="length required" data-validation-length="max50">
|
||||
</div>
|
||||
|
||||
<div class="control-group" id="user_password">
|
||||
<label for="user_password" class="required">User Password</label>
|
||||
<input type="password" name="user_password" class="control"
|
||||
placeholder="database password">
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div>
|
||||
<button class="prepare-btn" id="environment-check">Save & Continue</button>
|
||||
<div style="cursor: pointer; margin-top:10px">
|
||||
<span id="envronment-back">back</span>
|
||||
</div>
|
||||
</div>
|
||||
</form>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</body>
|
||||
|
||||
</html>
|
||||
|
||||
<script>
|
||||
$.validate({});
|
||||
</script>
|
||||
|
||||
<script>
|
||||
$(document).ready(function() {
|
||||
|
||||
// process the form
|
||||
$('#environment-form').submit(function(event) {
|
||||
$('.control-group').removeClass('has-error'); // remove the error class
|
||||
$('.form-error').remove(); // remove the error text
|
||||
|
||||
// get the form data
|
||||
var formData = {
|
||||
'app_name' : $('input[name=app_name]').val(),
|
||||
'app_url' : $('input[name=app_url]').val(),
|
||||
'host_name' : $('input[name=host_name]').val(),
|
||||
'port_name' : $('input[name=port_name]').val(),
|
||||
'database_name' : $('input[name=database_name]').val(),
|
||||
'user_name' : $('input[name=user_name]').val(),
|
||||
'user_password' : $('input[name=user_password]').val(),
|
||||
'database_connection' : $("#database_connection" ).val(),
|
||||
};
|
||||
|
||||
var target = window.location.href.concat('/EnvConfig.php');
|
||||
|
||||
// process the form
|
||||
$.ajax({
|
||||
type : 'POST',
|
||||
url : target,
|
||||
data : formData,
|
||||
dataType : 'json',
|
||||
encode : true
|
||||
})
|
||||
// using the done promise callback
|
||||
.done(function(data) {
|
||||
|
||||
if (!data.success) {
|
||||
|
||||
// handle errors
|
||||
if (data.errors.app_name) {
|
||||
$('#app_name').addClass('has-error');
|
||||
$('#app_name').append('<div class="form-error">' + data.errors.app_name + '</div>');
|
||||
}
|
||||
if (data.errors.app_url) {
|
||||
$('#app_url').addClass('has-error');
|
||||
$('#app_url').append('<div class="form-error">' + data.errors.app_url + '</div>');
|
||||
}
|
||||
if (data.errors.host_name) {
|
||||
$('#host_name').addClass('has-error');
|
||||
$('#host_name').append('<div class="form-error">' + data.errors.host_name + '</div>');
|
||||
}
|
||||
if (data.errors.port_name) {
|
||||
$('#port_name').addClass('has-error');
|
||||
$('#port_name').append('<div class="form-error">' + data.errors.port_name + '</div>');
|
||||
}
|
||||
if (data.errors.user_name) {
|
||||
$('#user_name').addClass('has-error');
|
||||
$('#user_name').append('<div class="form-error">' + data.errors.user_name + '</div>');
|
||||
}
|
||||
if (data.errors.database_name) {
|
||||
$('#database_name').addClass('has-error');
|
||||
$('#database_name').append('<div class="form-error">' + data.errors.database_name + '</div>');
|
||||
}
|
||||
if (data.errors.user_password) {
|
||||
$('#user_password').addClass('has-error');
|
||||
$('#user_password').append('<div class="form-error">' + data.errors.user_password + '</div>');
|
||||
}
|
||||
if (data.errors.app_url_space) {
|
||||
$('#app_url').addClass('has-error');
|
||||
$('#app_url').append('<div class="form-error">' + data.errors.app_url_space + '</div>');
|
||||
}
|
||||
if (data.errors.app_name_space) {
|
||||
$('#app_name').addClass('has-error');
|
||||
$('#app_name').append('<div class="form-error">' + data.errors.app_name_space + '</div>');
|
||||
}
|
||||
if (data.errors.host_name_space) {
|
||||
$('#host_name').addClass('has-error');
|
||||
$('#host_name').append('<div class="form-error">' + data.errors.host_name_space + '</div>');
|
||||
}
|
||||
if (data.errors.port_name_space) {
|
||||
$('#port_name').addClass('has-error');
|
||||
$('#port_name').append('<div class="form-error">' + data.errors.port_name_space + '</div>');
|
||||
}
|
||||
if (data.errors.user_name_space) {
|
||||
$('#user_name').addClass('has-error');
|
||||
$('#user_name').append('<div class="form-error">' + data.errors.user_name_space + '</div>');
|
||||
}
|
||||
if (data.errors.database_name_space) {
|
||||
$('#database_name').addClass('has-error');
|
||||
$('#database_name').append('<div class="form-error">' + data.errors.database_name_space + '</div>');
|
||||
}
|
||||
if (data.errors.user_password_space) {
|
||||
$('#user_password').addClass('has-error');
|
||||
$('#user_password').append('<div class="form-error">' + data.errors.user_password_space + '</div>');
|
||||
}
|
||||
if (data.errors.database_error) {
|
||||
$('#database_error').append('<div class="form-error">' + data.errors.database_error + '</div>');
|
||||
}
|
||||
} else {
|
||||
$('#environment').hide();
|
||||
$('#migration').show();
|
||||
}
|
||||
});
|
||||
|
||||
// stop the form from submitting the normal way and refreshing the page
|
||||
event.preventDefault();
|
||||
});
|
||||
|
||||
});
|
||||
</script>
|
||||
|
||||
|
|
@ -1,27 +0,0 @@
|
|||
<html>
|
||||
<body>
|
||||
<div class="container finish" id="finish">
|
||||
<div class="initial-display">
|
||||
<p>Installation completed</p>
|
||||
<div class="content">
|
||||
<div class="content-container" style="padding: 20px">
|
||||
<span>
|
||||
Bagisto is successfully installed on your system.<br>
|
||||
Click the below button to launch the admin panel.
|
||||
</span>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<button class="prepare-btn" onclick="finish()">Continue</button>
|
||||
</div>
|
||||
</div>
|
||||
</body>
|
||||
</html>
|
||||
|
||||
<script>
|
||||
function finish() {
|
||||
next = window.location.href.split("/installer")[0];
|
||||
next = next.concat('/admin/login');
|
||||
window.location.href = next;
|
||||
}
|
||||
</script>
|
||||
|
|
@ -1,23 +0,0 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<svg width="216px" height="469px" viewBox="0 0 216 469" version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink">
|
||||
<!-- Generator: Sketch 51.1 (57501) - http://www.bohemiancoding.com/sketch -->
|
||||
<title>feature-bg-2 copy</title>
|
||||
<desc>Created with Sketch.</desc>
|
||||
<defs></defs>
|
||||
<g id="Desktop" stroke="none" stroke-width="1" fill="none" fill-rule="evenodd">
|
||||
<g id="setup" transform="translate(0.000000, -321.000000)">
|
||||
<g id="installation" transform="translate(-312.000000, 321.000000)">
|
||||
<g id="feature-bg-2-copy">
|
||||
<path d="M410.51882,469 L351,350 L410.51882,350 L410.51882,469 Z M467.609149,350.309935 L527,350.309935 L467.609149,468.904085 L467.609149,350.309935 Z" id="Combined-Shape" fill="#0041FF"></path>
|
||||
<path d="M483.511111,261.037313 L396.488889,261.037313 L417.511111,219 L462.488889,219 L483.511111,261.037313 Z M506,306.007463 L528,350 L352,350 L374,306.007463 L506,306.007463 Z" id="Combined-Shape" fill="#000DBB"></path>
|
||||
<path d="M294.962601,235.592166 L352,350 L294.962601,350 L294.962601,235.592166 Z M235.326798,350 L176,350 L235.326798,231 L235.326798,350 Z" id="Combined-Shape" fill="#000DBB"></path>
|
||||
<polygon id="Combined-Shape" fill="#000DBB" points="411 469 293 469 322.012679 411 381.987321 411"></polygon>
|
||||
<path d="M352.037313,174 L310,174 L310,84.0674157 L352.037313,0 L352.037313,174 Z M397.007463,174 L397.007463,86.0224719 L441,174 L397.007463,174 Z" id="Combined-Shape" fill="#000DBB"></path>
|
||||
<path d="M323.155556,292.311111 L380.844444,292.311111 L352,350 L323.155556,292.311111 Z M293.337654,232.675308 L264,174 L440,174 L410.662346,232.675308 L293.337654,232.675308 Z" id="Combined-Shape" fill="#0041FF"></path>
|
||||
<path d="M220.488889,88.9626866 L307.511111,88.9626866 L286.488889,131 L241.511111,131 L220.488889,88.9626866 Z M198,43.9925373 L176,0 L352,0 L330,43.9925373 L198,43.9925373 Z" id="Combined-Shape" fill="#0041FF"></path>
|
||||
<path d="M221.488889,438.962687 L308.511111,438.962687 L287.488889,481 L242.511111,481 L221.488889,438.962687 Z M199,393.992537 L177,350 L353,350 L331,393.992537 L199,393.992537 Z" id="Combined-Shape" fill="#0041FF"></path>
|
||||
</g>
|
||||
</g>
|
||||
</g>
|
||||
</g>
|
||||
</svg>
|
||||
|
Before Width: | Height: | Size: 2.4 KiB |
|
|
@ -1,20 +0,0 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<svg width="235px" height="348px" viewBox="0 0 235 348" version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink">
|
||||
<!-- Generator: Sketch 51.1 (57501) - http://www.bohemiancoding.com/sketch -->
|
||||
<title>feature-bg-2</title>
|
||||
<desc>Created with Sketch.</desc>
|
||||
<defs></defs>
|
||||
<g id="Desktop" stroke="none" stroke-width="1" fill="none" fill-rule="evenodd">
|
||||
<g id="setup" transform="translate(-1069.000000, -442.000000)">
|
||||
<g id="installation" transform="translate(-312.000000, 321.000000)">
|
||||
<g id="feature-bg-2" transform="translate(1381.000000, 121.000000)">
|
||||
<polygon id="Combined-Shape" fill="#0041FF" points="131.511111 260 88 173 264 173 220.488889 260"></polygon>
|
||||
<path d="M206.962601,59.592166 L264,174 L206.962601,174 L206.962601,59.592166 Z M147.326798,174 L88,174 L147.326798,55 L147.326798,174 Z" id="Combined-Shape" fill="#000DBB"></path>
|
||||
<path d="M131.511111,260.037313 L44.4888889,260.037313 L65.5111111,218 L110.488889,218 L131.511111,260.037313 Z M154,305.007463 L176,349 L0,349 L22,305.007463 L154,305.007463 Z" id="Combined-Shape" fill="#000DBB"></path>
|
||||
<path d="M294.962601,235.592166 L352,350 L294.962601,350 L294.962601,235.592166 Z M235.326798,350 L176,350 L235.326798,231 L235.326798,350 Z" id="Combined-Shape" fill="#000DBB"></path>
|
||||
<path d="M220.488889,88.9626866 L307.511111,88.9626866 L286.488889,131 L241.511111,131 L220.488889,88.9626866 Z M198,43.9925373 L176,0 L352,0 L330,43.9925373 L198,43.9925373 Z" id="Combined-Shape" fill="#0041FF"></path>
|
||||
</g>
|
||||
</g>
|
||||
</g>
|
||||
</g>
|
||||
</svg>
|
||||
|
Before Width: | Height: | Size: 1.7 KiB |
|
|
@ -1,90 +0,0 @@
|
|||
<script>
|
||||
|
||||
window.onload = function() {
|
||||
|
||||
var welcome = document.getElementById('welcome');
|
||||
var requirement = document.getElementById('requirement');
|
||||
var permission = document.getElementById('permission');
|
||||
var environment = document.getElementById('environment');
|
||||
var migration = document.getElementById('migration');
|
||||
var admin = document.getElementById('admin');
|
||||
|
||||
var welcomeCheck = document.getElementById('welcome-check');
|
||||
var requirementCheck = document.getElementById('requirement-check');
|
||||
var requirementsRefresh = document.getElementById('requirements-refresh');
|
||||
|
||||
var permisssionCheck = document.getElementById('permission-check');
|
||||
var environmentCheck = document.getElementById('environment-check');
|
||||
var continue_to_admin = document.getElementById('continue');
|
||||
|
||||
var permissionBack = document.getElementById('permission-back');
|
||||
var requirementBack = document.getElementById('requirement-back');
|
||||
var envBack = document.getElementById('envronment-back');
|
||||
var migrationBack = document.getElementById('migration-back');
|
||||
|
||||
if (requirementCheck) {
|
||||
requirementCheck.addEventListener('click', myFunction);
|
||||
}
|
||||
|
||||
if (requirementsRefresh) {
|
||||
requirementsRefresh.addEventListener('click', myFunction);
|
||||
}
|
||||
|
||||
if (welcomeCheck) {
|
||||
welcomeCheck.addEventListener('click', myFunction);
|
||||
}
|
||||
|
||||
if (permisssionCheck) {
|
||||
permisssionCheck.addEventListener('click', myFunction);
|
||||
}
|
||||
|
||||
if (environmentCheck) {
|
||||
environmentCheck.addEventListener('click', myFunction);
|
||||
}
|
||||
|
||||
if (continue_to_admin) {
|
||||
continue_to_admin.addEventListener('click', myFunction);
|
||||
}
|
||||
|
||||
if (envBack) {
|
||||
envBack.addEventListener('click', myFunction);
|
||||
}
|
||||
|
||||
if (requirementBack) {
|
||||
requirementBack.addEventListener('click', myFunction);
|
||||
}
|
||||
|
||||
if (permissionBack) {
|
||||
permissionBack.addEventListener('click', myFunction);
|
||||
}
|
||||
|
||||
if (migrationBack) {
|
||||
migrationBack.addEventListener('click', myFunction);
|
||||
}
|
||||
|
||||
function myFunction() {
|
||||
if(this.id == 'welcome-check') {
|
||||
requirement.style.display = "block";
|
||||
welcome.style.display = "none";
|
||||
} else if (this.id == 'requirement-check') {
|
||||
environment.style.display = "block";
|
||||
requirement.style.display = "none";
|
||||
} else if (this.id == 'continue') {
|
||||
migration.style.display = "none";
|
||||
admin.style.display ="block";
|
||||
} else if (this.id == 'requirement-back') {
|
||||
welcome.style.display = "block";
|
||||
requirement.style.display = "none";
|
||||
} else if (this.id == 'envronment-back') {
|
||||
environment.style.display ="none";
|
||||
requirement.style.display = "block";
|
||||
} else if (this.id == 'migration-back') {
|
||||
migration.style.display = "none";
|
||||
environment.style.display ="block";
|
||||
} else if (this.id == 'requirements-refresh') {
|
||||
location.reload();
|
||||
}
|
||||
}
|
||||
};
|
||||
|
||||
</script>
|
||||
|
|
@ -1,18 +1,18 @@
|
|||
<html>
|
||||
<?php
|
||||
$actual_link = (isset($_SERVER['HTTPS']) && $_SERVER['HTTPS'] === 'on' ? "https" : "http") . "://$_SERVER[HTTP_HOST]$_SERVER[REQUEST_URI]";
|
||||
$greenCheck = $actual_link .'/'. 'Images/green-check.svg';
|
||||
$redCheck = $actual_link .'/'. 'Images/red-check.svg';
|
||||
?>
|
||||
|
||||
<?php
|
||||
$actual_link = (isset($_SERVER['HTTPS']) && $_SERVER['HTTPS'] === 'on' ? "https" : "http") . "://$_SERVER[HTTP_HOST]$_SERVER[REQUEST_URI]";
|
||||
<div class="container requirement" id="requirement">
|
||||
<div class="initial-display">
|
||||
<p>Server Requirements</p>
|
||||
</div>
|
||||
|
||||
$greenCheck = $actual_link .'/'. 'Images/green-check.svg';
|
||||
$redCheck = $actual_link .'/'. 'Images/red-check.svg';
|
||||
?>
|
||||
|
||||
<body>
|
||||
|
||||
<div class="container requirement" id="requirement">
|
||||
<div class="initial-display">
|
||||
<p>Server Requirements</p>
|
||||
<div class="content">
|
||||
<div class="row justify-content-center">
|
||||
<div class="col-md-6 col-md-offset-1">
|
||||
<div class="card card-default">
|
||||
<div class="card-body">
|
||||
<ul class="requirements_list">
|
||||
<li>
|
||||
<?php if($phpVersion['supported'] ? $src = $greenCheck : $src = $redCheck): ?>
|
||||
|
|
@ -53,15 +53,14 @@
|
|||
<?php endif; ?>
|
||||
</li>
|
||||
</ul>
|
||||
|
||||
<?php if(!isset($requirements['errors']) && ($phpVersion['supported'] && $composerInstall['composer_install'] == 0)): ?>
|
||||
<div class="text-center"><button type="button" class="btn btn-primary" id="requirement-check">Continue</button></div>
|
||||
<?php elseif(!($phpVersion['supported'] && $composerInstall['composer_install'] == 0)): ?>
|
||||
<div><button type="button" class="prepare-btn" id="requirements-refresh">Refresh</button></div>
|
||||
<?php endif; ?>
|
||||
</div>
|
||||
|
||||
<?php if(!isset($requirements['errors']) && ($phpVersion['supported'] && $composerInstall['composer_install'] == 0)): ?>
|
||||
<div><button type="button" class="prepare-btn" id="requirement-check">Continue</button></div>
|
||||
<?php elseif(!($phpVersion['supported'] && $composerInstall['composer_install'] == 0)): ?>
|
||||
<div><button type="button" class="prepare-btn" id="requirements-refresh">Refresh</button></div>
|
||||
<?php endif; ?>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
</body>
|
||||
</html>
|
||||
</div>
|
||||
</div>
|
||||
|
|
@ -0,0 +1,258 @@
|
|||
body {
|
||||
margin: 0;
|
||||
font-size: 16px;
|
||||
font-family: "Montserrat", sans-serif;
|
||||
color: #000311;
|
||||
text-align: center;
|
||||
background: #fff;
|
||||
position: relative;
|
||||
height: 100%;
|
||||
}
|
||||
|
||||
a { color: rgb(0, 65, 255); text-decoration: none;}
|
||||
|
||||
.initial-display{
|
||||
padding-top: 50px;
|
||||
}
|
||||
|
||||
.initial-display .logo {
|
||||
width: 150px;
|
||||
}
|
||||
|
||||
.initial-display p {
|
||||
font-size: 24px;
|
||||
color: #333333;
|
||||
text-align: center;
|
||||
font-weight: 600;
|
||||
margin-top: 25px;
|
||||
}
|
||||
|
||||
.prepare-btn {
|
||||
box-shadow: 0 1px 4px 0 rgba(0, 0, 0, 0.2), 0 0 8px 0 rgba(0, 0, 0, 0.1);
|
||||
border-radius: 3px;
|
||||
border: none;
|
||||
cursor: pointer;
|
||||
font: inherit;
|
||||
display: inline-block;
|
||||
background: #0041FF;
|
||||
color: #ffffff;
|
||||
padding: 10px 20px;
|
||||
margin-top: 20px;
|
||||
}
|
||||
|
||||
.warning {
|
||||
margin-left: 15%;
|
||||
}
|
||||
|
||||
.footer {
|
||||
bottom: 0;
|
||||
position: absolute;
|
||||
width: 100%;
|
||||
padding-bottom: 20px;
|
||||
}
|
||||
|
||||
.left-patern {
|
||||
position: absolute;
|
||||
left: 0;
|
||||
bottom: 0;
|
||||
}
|
||||
|
||||
.right-patern {
|
||||
position: absolute;
|
||||
right: 0;
|
||||
bottom: 0;
|
||||
}
|
||||
|
||||
.content {
|
||||
border-radius: 5px;
|
||||
box-shadow: 1px 8px 18px rgba(62, 85, 120, 0.45);
|
||||
min-height: 300px;
|
||||
width: 600px;
|
||||
margin-left: calc(50% - 300px);
|
||||
text-align: left;
|
||||
overflow-y: auto;
|
||||
}
|
||||
|
||||
.requirements_list {
|
||||
width: 90%;
|
||||
list-style: none;
|
||||
margin-left: 5%;
|
||||
padding:0;
|
||||
}
|
||||
|
||||
.requirements_list li {
|
||||
padding: 0 8px 8px;
|
||||
margin-bottom: 8px;
|
||||
border-bottom: 1px dashed #dcdcdc;
|
||||
line-height: normal;
|
||||
}
|
||||
|
||||
.requirements_list li:last-child { border-bottom: 0;}
|
||||
|
||||
.requirements_list small {
|
||||
font-size: 13px;
|
||||
color:#9b9b9b;
|
||||
}
|
||||
|
||||
.content .cp-round {
|
||||
position: auto !important;
|
||||
}
|
||||
|
||||
.content .cp-round:before {
|
||||
border-radius: 50%;
|
||||
content: " ";
|
||||
width: 48px;
|
||||
height: 48px;
|
||||
display: inline-block;
|
||||
box-sizing: border-box;
|
||||
border-top: solid 6px #bababa;
|
||||
border-right: solid 6px #bababa;
|
||||
border-bottom: solid 6px #bababa;
|
||||
border-left: solid 6px #bababa;
|
||||
position: absolute;
|
||||
top: calc(40% - 14px);
|
||||
left: calc(50% - 24px);
|
||||
}
|
||||
|
||||
.content .cp-round:after {
|
||||
border-radius: 50%;
|
||||
content: " ";
|
||||
width: 48px;
|
||||
height: 48px;
|
||||
display: inline-block;
|
||||
box-sizing: border-box;
|
||||
border-top: solid 6px #0041FF;
|
||||
border-right: solid 6px #bababa;
|
||||
border-bottom: solid 6px #bababa;
|
||||
border-left: solid 6px #bababa;
|
||||
position: absolute;
|
||||
top: calc(40% - 14px);
|
||||
left: calc(50% - 24px);
|
||||
animation: spin 1s ease-in-out infinite;
|
||||
}
|
||||
|
||||
@keyframes spin {
|
||||
0% { transform: rotate(0deg); }
|
||||
100% { transform: rotate(360deg); }
|
||||
}
|
||||
|
||||
.title {
|
||||
font-size: 16px;
|
||||
color: #151515;
|
||||
line-height: 30px;
|
||||
text-align: left;
|
||||
margin-top: 30px;
|
||||
margin-bottom: 10px;
|
||||
text-align: center;
|
||||
}
|
||||
|
||||
span {
|
||||
font-size: 16px;
|
||||
color: #333333;
|
||||
line-height: 30px;
|
||||
}
|
||||
|
||||
.welcome, .environment, .migration, .permission, .admin, .finish {
|
||||
display : none;
|
||||
}
|
||||
|
||||
.control-group {
|
||||
display: block;
|
||||
margin-bottom: 15px;
|
||||
font-size: 15px;
|
||||
color: #333333;
|
||||
width: 750px;
|
||||
max-width: 100%;
|
||||
position: relative;
|
||||
}
|
||||
|
||||
.control-group label {
|
||||
display: block;
|
||||
color: #3a3a3a;
|
||||
}
|
||||
|
||||
.control-group .control {
|
||||
background: #fff;
|
||||
border: 2px solid #C7C7C7;
|
||||
border-radius: 3px;
|
||||
width: 100%;
|
||||
height: 36px;
|
||||
display: inline-block;
|
||||
vertical-align: middle;
|
||||
-webkit-transition: 0.2s cubic-bezier(0.4, 0, 0.2, 1);
|
||||
transition: 0.2s cubic-bezier(0.4, 0, 0.2, 1);
|
||||
padding: 0px 10px;
|
||||
font-size: 15px;
|
||||
margin-top: 10px;
|
||||
margin-bottom: 5px;
|
||||
}
|
||||
|
||||
.control-group label.required::after {
|
||||
content: "*";
|
||||
color: #FC6868;
|
||||
font-weight: 700;
|
||||
display: inline-block;
|
||||
}
|
||||
|
||||
.form-error {
|
||||
color: #ff5656 !important;
|
||||
}
|
||||
|
||||
.control-group.has-error .control {
|
||||
border-color: #FC6868 !important;
|
||||
}
|
||||
|
||||
pre.bash {
|
||||
background-color: black;
|
||||
color: white;
|
||||
font-size: medium ;
|
||||
font-family: Consolas,Monaco,Lucida Console,Liberation Mono,DejaVu Sans Mono,Bitstream Vera Sans Mono,Courier New, monospace;
|
||||
width: 100%;
|
||||
display: inline-block;
|
||||
height: 100%;
|
||||
}
|
||||
|
||||
.check {
|
||||
line-height: 35px;
|
||||
margin-left: 25%;
|
||||
}
|
||||
|
||||
.composer {
|
||||
position: absolute;
|
||||
top: calc(50% + 24px);
|
||||
display: none;
|
||||
}
|
||||
|
||||
.message {
|
||||
padding-left: 140px;
|
||||
}
|
||||
|
||||
@media (min-width: 1281px) {
|
||||
.content {
|
||||
padding: 2rem 0;
|
||||
}
|
||||
|
||||
.content {
|
||||
max-height: 484px;
|
||||
margin: 20px auto;
|
||||
}
|
||||
}
|
||||
|
||||
@media (min-width: 768px) and (max-width: 1024px) and (orientation: landscape) {
|
||||
.initial-display{
|
||||
padding-top: 15px;
|
||||
}
|
||||
|
||||
.content {
|
||||
padding: 1rem 0;
|
||||
}
|
||||
|
||||
.content {
|
||||
max-height: 488px;
|
||||
margin: 30px auto;
|
||||
}
|
||||
|
||||
.initial-display p {
|
||||
margin-top: 4px;
|
||||
}
|
||||
}
|
||||
|
|
@ -1,13 +1,11 @@
|
|||
<?php
|
||||
$actual_link = (isset($_SERVER['HTTPS']) && $_SERVER['HTTPS'] === 'on' ? "https" : "http") . "://$_SERVER[HTTP_HOST]$_SERVER[REQUEST_URI]";
|
||||
|
||||
$cssUrl = $actual_link .'/'. 'css/style.css';
|
||||
$logo = $actual_link .'/'. 'Images/logo.svg';
|
||||
?>
|
||||
<!DOCTYPE html>
|
||||
<html>
|
||||
<?php
|
||||
$actual_link = (isset($_SERVER['HTTPS']) && $_SERVER['HTTPS'] === 'on' ? "https" : "http") . "://$_SERVER[HTTP_HOST]$_SERVER[REQUEST_URI]";
|
||||
|
||||
$cssUrl = $actual_link .'/'. 'CSS/style.css';
|
||||
$logo = $actual_link .'/'. 'Images/logo.svg';
|
||||
$leftIcon = $actual_link .'/'. 'Images/left-side.svg';
|
||||
$rightIcon = $actual_link .'/'. 'Images/right-side.svg';
|
||||
?>
|
||||
|
||||
<head>
|
||||
<meta charset="utf-8">
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no">
|
||||
|
|
@ -16,11 +14,19 @@
|
|||
|
||||
<link rel="icon" sizes="16x16" href="Images/favicon.ico">
|
||||
<link rel="stylesheet" href="https://fonts.googleapis.com/css?family=Montserrat:400,500">
|
||||
<!-- Latest compiled and minified CSS -->
|
||||
<link rel="stylesheet" type="text/css" href= "<?php echo $cssUrl; ?> ">
|
||||
|
||||
<script src="//ajax.googleapis.com/ajax/libs/jquery/1.10.2/jquery.min.js"></script>
|
||||
<!-- Latest compiled and minified CSS -->
|
||||
<link rel="stylesheet" href="//stackpath.bootstrapcdn.com/bootstrap/4.4.1/css/bootstrap.min.css" integrity="sha384-Vkoo8x4CGsO3+Hhxv8T/Q5PaXtkKtu6ug5TOeNV6gBiFeWPGFN9MuhOf23Q9Ifjh" crossorigin="anonymous">
|
||||
<link rel="stylesheet" href="//cdn.jsdelivr.net/npm/select2@4.0.13/dist/css/select2.min.css">
|
||||
|
||||
<script src="//code.jquery.com/jquery-3.4.1.min.js" ></script>
|
||||
<script src="//cdn.jsdelivr.net/npm/popper.js@1.16.0/dist/umd/popper.min.js" integrity="sha384-Q6E9RHvbIyZFJoft+2mJbHaEWldlvI9IOYy5n3zV9zzTtmI3UksdQRVvoxMfooAo" crossorigin="anonymous"></script>
|
||||
<script src="//stackpath.bootstrapcdn.com/bootstrap/4.4.1/js/bootstrap.min.js" integrity="sha384-wfSDF2E50Y2D1uUdj0O3uMBJnjuUD4Ih7YwaYd1iqfktj0Uod8GCExl3Og8ifwB6" crossorigin="anonymous"></script>
|
||||
|
||||
<script src="//cdnjs.cloudflare.com/ajax/libs/jquery-form-validator/2.3.26/jquery.form-validator.min.js"></script>
|
||||
<script src="//cdn.jsdelivr.net/npm/select2@4.0.13/dist/js/select2.min.js"></script>
|
||||
|
||||
<link rel="stylesheet" type="text/css" href= "<?php echo $cssUrl; ?> ">
|
||||
</head>
|
||||
|
||||
<body>
|
||||
|
|
@ -109,14 +115,11 @@
|
|||
include __DIR__ . '/Classes/Requirement.php';
|
||||
|
||||
// including php files
|
||||
include __DIR__ . '/Environment.php';
|
||||
include __DIR__ . '/Migration.php';
|
||||
include __DIR__ . '/Admin.php';
|
||||
include __DIR__ . '/Email.php';
|
||||
include __DIR__ . '/Finish.php';
|
||||
|
||||
// including js
|
||||
include __DIR__ . '/JS/script';
|
||||
include __DIR__ . '/views/environment.blade.php';
|
||||
include __DIR__ . '/views/migration.blade.php';
|
||||
include __DIR__ . '/views/admin.blade.php';
|
||||
include __DIR__ . '/views/email.blade.php';
|
||||
include __DIR__ . '/views/finish.blade.php';
|
||||
|
||||
// object creation
|
||||
$requirement = new Requirement();
|
||||
|
|
@ -136,9 +139,10 @@
|
|||
}
|
||||
?>
|
||||
|
||||
<div style="margin-bottom: 5px; margin-top: 30px;">
|
||||
Powered by <a href="https://bagisto.com/" target="_blank">Bagisto</a>, a community project by
|
||||
<a href="https://webkul.com/" target="_blank">Webkul</a>
|
||||
<div style="margin-bottom: 5px; margin-top: 30px; text-align: center;">
|
||||
<a href="https://bagisto.com/" target="_blank">Bagisto</a> a community project by <a href="https://webkul.com/" target="_blank">Webkul</a>
|
||||
</div>
|
||||
|
||||
<script src="js/script.js"></script>
|
||||
</body>
|
||||
</html>
|
||||
|
|
|
|||
|
|
@ -0,0 +1,86 @@
|
|||
window.onload = function() {
|
||||
|
||||
var welcome = document.getElementById('welcome');
|
||||
var requirement = document.getElementById('requirement');
|
||||
var permission = document.getElementById('permission');
|
||||
var environment = document.getElementById('environment');
|
||||
var migration = document.getElementById('migration');
|
||||
var admin = document.getElementById('admin');
|
||||
|
||||
var welcomeCheck = document.getElementById('welcome-check');
|
||||
var requirementCheck = document.getElementById('requirement-check');
|
||||
var requirementsRefresh = document.getElementById('requirements-refresh');
|
||||
|
||||
var permisssionCheck = document.getElementById('permission-check');
|
||||
var environmentCheck = document.getElementById('environment-check');
|
||||
var continue_to_admin = document.getElementById('continue');
|
||||
|
||||
var permissionBack = document.getElementById('permission-back');
|
||||
var requirementBack = document.getElementById('requirement-back');
|
||||
var envBack = document.getElementById('envronment-back');
|
||||
var migrationBack = document.getElementById('migration-back');
|
||||
|
||||
if (requirementCheck) {
|
||||
requirementCheck.addEventListener('click', myFunction);
|
||||
}
|
||||
|
||||
if (requirementsRefresh) {
|
||||
requirementsRefresh.addEventListener('click', myFunction);
|
||||
}
|
||||
|
||||
if (welcomeCheck) {
|
||||
welcomeCheck.addEventListener('click', myFunction);
|
||||
}
|
||||
|
||||
if (permisssionCheck) {
|
||||
permisssionCheck.addEventListener('click', myFunction);
|
||||
}
|
||||
|
||||
if (environmentCheck) {
|
||||
environmentCheck.addEventListener('click', myFunction);
|
||||
}
|
||||
|
||||
if (continue_to_admin) {
|
||||
continue_to_admin.addEventListener('click', myFunction);
|
||||
}
|
||||
|
||||
if (envBack) {
|
||||
envBack.addEventListener('click', myFunction);
|
||||
}
|
||||
|
||||
if (requirementBack) {
|
||||
requirementBack.addEventListener('click', myFunction);
|
||||
}
|
||||
|
||||
if (permissionBack) {
|
||||
permissionBack.addEventListener('click', myFunction);
|
||||
}
|
||||
|
||||
if (migrationBack) {
|
||||
migrationBack.addEventListener('click', myFunction);
|
||||
}
|
||||
|
||||
function myFunction() {
|
||||
if(this.id == 'welcome-check') {
|
||||
requirement.style.display = "block";
|
||||
welcome.style.display = "none";
|
||||
} else if (this.id == 'requirement-check') {
|
||||
environment.style.display = "block";
|
||||
requirement.style.display = "none";
|
||||
} else if (this.id == 'continue') {
|
||||
migration.style.display = "none";
|
||||
admin.style.display ="block";
|
||||
} else if (this.id == 'requirement-back') {
|
||||
welcome.style.display = "block";
|
||||
requirement.style.display = "none";
|
||||
} else if (this.id == 'envronment-back') {
|
||||
environment.style.display ="none";
|
||||
requirement.style.display = "block";
|
||||
} else if (this.id == 'migration-back') {
|
||||
migration.style.display = "none";
|
||||
environment.style.display ="block";
|
||||
} else if (this.id == 'requirements-refresh') {
|
||||
location.reload();
|
||||
}
|
||||
}
|
||||
};
|
||||
83
public/installer/Admin.php → public/installer/views/admin.blade.php
Executable file → Normal file
83
public/installer/Admin.php → public/installer/views/admin.blade.php
Executable file → Normal file
|
|
@ -1,60 +1,49 @@
|
|||
<html>
|
||||
<div class="container admin" id="admin">
|
||||
<div class="initial-display">
|
||||
<p>Create a Administrator</p>
|
||||
</div>
|
||||
|
||||
<body>
|
||||
|
||||
<div class="container admin" id="admin">
|
||||
<div class="initial-display">
|
||||
<p>Admin Details</p>
|
||||
|
||||
<form action="AdminConfig.php" method= "POST" id="admin-form">
|
||||
<div class="content">
|
||||
<div class="form-container" style="padding: 10%; padding-top: 35px">
|
||||
<div class="control-group" id="admin_name">
|
||||
<label for="admin_name" class="required">Name</label>
|
||||
<input type="text" name="admin_name" class="control"
|
||||
data-validation="required length" data-validation-length="max50">
|
||||
</div>
|
||||
|
||||
<div class="control-group" id="admin_email">
|
||||
<label for="admin_email" class="required">Email</label>
|
||||
<input type="text" name="admin_email" class="control"
|
||||
data-validation="required email length" data-validation-length="max50">
|
||||
</div>
|
||||
|
||||
<div class="control-group" id="admin_password">
|
||||
<label for="admin_password" class="required">Password</label>
|
||||
<input type="password" name="admin_password" class="control"
|
||||
data-validation="length required" data-validation-length="min6">
|
||||
</div>
|
||||
|
||||
<div class="control-group" id="admin_re_password">
|
||||
<label for="admin_re_password" class="required">Re-Password</label>
|
||||
<input type="password" name="admin_re_password" class="control"
|
||||
data-validation="length required" data-validation-length="min6">
|
||||
</div>
|
||||
<div class="row justify-content-center">
|
||||
<div class="col-md-6 col-md-offset-1">
|
||||
<div class="card card-default">
|
||||
<div class="card-body">
|
||||
<form action="AdminConfig.php" method= "POST" id="admin-form">
|
||||
<div class="form-group" id="admin_name">
|
||||
<label for="admin_user_name" class="required">Name</label>
|
||||
<input type="text" name="admin_name" id="admin_user_name" class="form-control" data-validation="required length" data-validation-length="max50">
|
||||
</div>
|
||||
|
||||
<div class="form-group" id="admin_email">
|
||||
<label for="admin_user_email" class="required">Email</label>
|
||||
<input type="text" name="admin_email" id="admin_user_email" class="form-control" data-validation="required email length" data-validation-length="max50">
|
||||
</div>
|
||||
|
||||
<div class="form-group" id="admin_password">
|
||||
<label for="admin_user_password" class="required">Password</label>
|
||||
<input type="password" name="admin_password" id="admin_user_password" class="form-control" data-validation="length required" data-validation-length="min6">
|
||||
</div>
|
||||
|
||||
<div class="form-group" id="admin_re_password">
|
||||
<label for="admin_user_repassword" class="required">Password confirmation</label>
|
||||
<input type="password" name="admin_re_password" id="admin_user_repassword" class="form-control" data-validation="length required" data-validation-length="min6">
|
||||
</div>
|
||||
</div>
|
||||
<div>
|
||||
<button class="prepare-btn" id="admin-check">Continue</button>
|
||||
</div>
|
||||
</form>
|
||||
|
||||
<div class="text-center" style="padding-bottom: 10px;">
|
||||
<button type="submit" class="btn btn-primary" id="admin-check">Continue</button>
|
||||
</div>
|
||||
</form>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</body>
|
||||
|
||||
</html>
|
||||
|
||||
<script>
|
||||
$.validate({});
|
||||
</script>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<script>
|
||||
$(document).ready(function() {
|
||||
$.validate({});
|
||||
// process the form
|
||||
$('#admin-form').submit(function(event) {
|
||||
$('.control-group').removeClass('has-error'); // remove the error class
|
||||
$('.form-group').removeClass('has-error'); // remove the error class
|
||||
$('.form-error').remove(); // remove the error text
|
||||
// get the form data
|
||||
var formData = {
|
||||
|
|
@ -1,50 +1,58 @@
|
|||
<div class="container email" id="email">
|
||||
<div class="initial-display">
|
||||
<p>Email Configuration</p>
|
||||
<form action="EmailConfig.php" method= "POST" id="email-form">
|
||||
<div class="content">
|
||||
<div class="form-container" style="padding: 10%; padding-top: 35px">
|
||||
<input type="hidden" name="mail_driver" value="smtp">
|
||||
</div>
|
||||
|
||||
<div class="control-group" id="mail_host">
|
||||
<label for="mail_host" class="required">Outgoing mail server</label>
|
||||
<input type="text" name="mail_host" class="control" placeholder="smtp.mailtrap.io" data-validation="required">
|
||||
</div>
|
||||
|
||||
<div class="control-group" id="mail_port">
|
||||
<label for="mail_port" class="required">Outgoing mail server port</label>
|
||||
<input type="text" name="mail_port" class="control" placeholder="2525" data-validation="required">
|
||||
</div>
|
||||
|
||||
<div class="control-group" id="mail_encryption">
|
||||
<label for="mail_encryption">Encryption</label>
|
||||
<select name="mail_encryption" class="control">
|
||||
<option value="ssl">SSL</option>
|
||||
<option value="tls">TLS</option>
|
||||
<option value="">None</option>
|
||||
</select>
|
||||
</div>
|
||||
|
||||
<div class="control-group" id="mail_from">
|
||||
<label for="mail_from" class="required">Store email address</label>
|
||||
<input type="text" name="mail_from" class="control" placeholder="store@example.com" data-validation="required">
|
||||
</div>
|
||||
|
||||
<div class="control-group" id="mail_username">
|
||||
<label for="mail_username" class="required">Username</label>
|
||||
<input type="text" name="mail_username" class="control" placeholder="store@example.com" data-validation="required">
|
||||
</div>
|
||||
|
||||
<div class="control-group" id="mail_password">
|
||||
<label for="mail_password" class="required">Password</label>
|
||||
<input type="password" name="mail_password" class="control">
|
||||
</div>
|
||||
<div class="row justify-content-center">
|
||||
<div class="col-md-6 col-md-offset-1">
|
||||
<div class="card card-default">
|
||||
<div class="card-body">
|
||||
<form action="EmailConfig.php" method= "POST" id="email-form">
|
||||
<input type="hidden" name="mail_driver" value="smtp">
|
||||
|
||||
<div class="form-row">
|
||||
<div class="form-group col-md-6" id="mail_host">
|
||||
<label for="mail_hostname" class="required">Outgoing mail server</label>
|
||||
<input type="text" name="mail_host" id="mail_hostname" class="form-control" placeholder="smtp.mailtrap.io" data-validation="required">
|
||||
</div>
|
||||
|
||||
<div class="form-group col-md-6" id="mail_port">
|
||||
<label for="mail_portnumber" class="required">Server port</label>
|
||||
<input type="text" name="mail_port" id="mail_portnumber" class="form-control" placeholder="2525" data-validation="required">
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="form-group" id="mail_encryption">
|
||||
<label for="mail_encrypt">Encryption</label>
|
||||
<select name="mail_encryption" id="mail_encrypt" class="form-control">
|
||||
<option value="ssl">SSL</option>
|
||||
<option value="tls">TLS</option>
|
||||
<option value="">None</option>
|
||||
</select>
|
||||
</div>
|
||||
|
||||
<div class="form-group" id="mail_from">
|
||||
<label for="email_from" class="required">Store email address</label>
|
||||
<input type="text" name="mail_from" id="email_from" class="form-control" placeholder="store@example.com" data-validation="required">
|
||||
</div>
|
||||
|
||||
<div class="form-group" id="mail_username">
|
||||
<label for="email_username" class="required">Username</label>
|
||||
<input type="text" name="mail_username" id="email_username" class="form-control" placeholder="store@example.com" data-validation="required">
|
||||
</div>
|
||||
|
||||
<div class="form-group" id="mail_password">
|
||||
<label for="email_password" class="required">Password</label>
|
||||
<input type="password" name="mail_password" id="email_password" class="form-control" data-validation="required">
|
||||
</div>
|
||||
|
||||
<div class="text-center">
|
||||
<button class="btn btn-primary" id="mail-check">Save configuration</button>
|
||||
</div>
|
||||
</form>
|
||||
</div>
|
||||
</div>
|
||||
<div>
|
||||
<button class="prepare-btn" id="mail-check">Save configuration</button>
|
||||
</div>
|
||||
</form>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
|
@ -57,7 +65,7 @@
|
|||
$('#email').hide();
|
||||
// process the form
|
||||
$('#email-form').submit(function(event) {
|
||||
$('.control-group').removeClass('has-error'); // remove the error class
|
||||
$('.form-group').removeClass('has-error'); // remove the error class
|
||||
$('.form-error').remove(); // remove the error text
|
||||
// get the form data
|
||||
var mailformData = {
|
||||
|
|
@ -0,0 +1,247 @@
|
|||
<div class="container environment" id="environment">
|
||||
<div class="initial-display">
|
||||
<p>Environment Configuration</p>
|
||||
</div>
|
||||
|
||||
<div class="row justify-content-center">
|
||||
<div class="col-md-6 col-md-offset-1">
|
||||
<div class="card card-default">
|
||||
<div class="card-body">
|
||||
<form action="EnvConfig.php" method="POST" id="environment-form">
|
||||
<div id="app-settings">
|
||||
<div class="form-group" id="app_name">
|
||||
<label for="application_name" class="required">Application Name</label>
|
||||
<input type= "text" name= "app_name" id="application_name" class="form-control" value="Bagisto_" data-validation="required length"
|
||||
data-validation-length="max20">
|
||||
</div>
|
||||
|
||||
<div class="form-group" id="app_url">
|
||||
<label for="application_url" class="required">Default URL</label>
|
||||
<input type="text" name="app_url" id="application_url" class="form-control" value="https://<?php echo $_SERVER['HTTP_HOST']; ?>"
|
||||
data-validation="required length" data-validation-length="max50">
|
||||
</div>
|
||||
|
||||
<div class="form-group" id="app_currency">
|
||||
<label for="application_currency" class="required">Default Currency</label>
|
||||
<select name="app_currency" id="application_currency" class="form-control" data-validation="required length" data-validation-length="max50">
|
||||
<option value="EUR">Euro</option>
|
||||
<option value="USD" selected>US Dollar</option>
|
||||
</select>
|
||||
</div>
|
||||
|
||||
<div class="form-group" id="app_timezone">
|
||||
<label for="application_timezone" class="required">Default Timezone</label>
|
||||
<select name="app_timezone" id="application_timezone" class="js-example-basic-single">
|
||||
<?php
|
||||
|
||||
$tzlist = DateTimeZone::listIdentifiers(DateTimeZone::ALL);
|
||||
$current = date_default_timezone_get();
|
||||
|
||||
foreach($tzlist as $key => $value) {
|
||||
if(!$value === $current) {
|
||||
echo "<option value='$value' selected>" . $value . "</option>";
|
||||
} else {
|
||||
echo "<option value='$value'>" . $value . "</option>";
|
||||
}
|
||||
}
|
||||
?>
|
||||
</select>
|
||||
</div>
|
||||
|
||||
<div class="form-group" id="app_locale">
|
||||
<label for="application_locale" class="required">Default Locale</label>
|
||||
<select name="app_locale" id="application_locale" class="form-control" data-validation="required">
|
||||
<option value="nl">Dutch</option>
|
||||
<option value="en" selected>English</option>
|
||||
<option value="fr">French</option>
|
||||
</select>
|
||||
</div>
|
||||
|
||||
<div class="text-center">
|
||||
<button type="button" class="btn btn-primary" id="environment-next">Continue</button>
|
||||
<button type="button" class="btn btn-secondary" id="envronment-back">Go back</button>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div id="database-settings">
|
||||
<div class="databse-error" id="database_error"></div>
|
||||
|
||||
<div class="form-group" id="database_connection">
|
||||
<label for="db_connection" class="required">Database Connection</label>
|
||||
<select name="database_connection" id="db_connection" class="form-control">
|
||||
<option value="mysql" selected>Mysql</option>
|
||||
<option value="sqlite">SQlite</option>
|
||||
<option value="pgsql">pgSQL</option>
|
||||
<option value="sqlsrv">SQLSRV</option>
|
||||
</select>
|
||||
</div>
|
||||
|
||||
<div class="form-row">
|
||||
<div class="form-group col-md-6" id="host_name">
|
||||
<label for="db_hostname" class="required">Database Hostname</label>
|
||||
<input type="text" name="host_name" id="db_hostname" class="form-control" value="127.0.0.1"
|
||||
data-validation="required length" data-validation-length="max50">
|
||||
</div>
|
||||
|
||||
<div class="form-group col-md-6" id="port_name">
|
||||
<label for="db_port" class="required">Database Port</label>
|
||||
<input type="text" name="port_name" id="db_port" class="form-control" value="3306"
|
||||
data-validation="required alphanumeric number length" data-validation-length="max5">
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="form-group" id="database_name">
|
||||
<label for="db_name" class="required">Database Name</label>
|
||||
<input type="text" name="database_name" id="db_name" class="form-control"
|
||||
data-validation="length required" data-validation-length="max50">
|
||||
</div>
|
||||
|
||||
<div class="form-group" id="user_name">
|
||||
<label for="db_username" class="required">Database Username</label>
|
||||
<input type="text" name="user_name" id="db_username" class="form-control"
|
||||
data-validation="length required" data-validation-length="max50">
|
||||
</div>
|
||||
|
||||
<div class="form-group" id="user_password">
|
||||
<label for="db_password" class="required">Database Password</label>
|
||||
<input type="password" name="user_password" id="db_password" class="form-control" data-validation="required">
|
||||
</div>
|
||||
|
||||
<div class="text-center">
|
||||
<button class="btn btn-primary" id="environment-check">Save & Continue</button>
|
||||
<button type="button" class="btn btn-secondary" id="environment-first">Go back</button>
|
||||
</div>
|
||||
</div>
|
||||
</form>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<script type="text/javascript">
|
||||
$(document).ready(function() {
|
||||
$('.js-example-basic-single').select2({
|
||||
theme: 'bootstrap4'
|
||||
});
|
||||
|
||||
$.validate({});
|
||||
$('#database-settings').hide();
|
||||
$('#environment-next').click(function() {
|
||||
$('#app-settings').hide();
|
||||
$('#database-settings').show();
|
||||
});
|
||||
|
||||
$('#environment-first').click(function() {
|
||||
$('#app-settings').show();
|
||||
$('#database-settings').hide();
|
||||
});
|
||||
|
||||
// process the form
|
||||
$('#environment-form').submit(function(event) {
|
||||
$('.control-group').removeClass('has-error'); // remove the error class
|
||||
$('.form-error').remove(); // remove the error text
|
||||
|
||||
// get the form data
|
||||
var formData = {
|
||||
'app_name' : $('input[name=app_name]').val(),
|
||||
'app_url' : $('input[name=app_url]').val(),
|
||||
'app_currency' : $('select[name=app_currency]').val(),
|
||||
'app_locale' : $('select[name=app_locale]').val(),
|
||||
'app_timezone' : $('select[name=app_timezone]').val(),
|
||||
'host_name' : $('input[name=host_name]').val(),
|
||||
'port_name' : $('input[name=port_name]').val(),
|
||||
'database_connection' : $("select[name=database_connection]" ).val(),
|
||||
'database_name' : $('input[name=database_name]').val(),
|
||||
'user_name' : $('input[name=user_name]').val(),
|
||||
'user_password' : $('input[name=user_password]').val(),
|
||||
};
|
||||
|
||||
var target = window.location.href.concat('/EnvConfig.php');
|
||||
|
||||
// process the form
|
||||
$.ajax({
|
||||
type : 'POST',
|
||||
url : target,
|
||||
data : formData,
|
||||
dataType : 'json',
|
||||
encode : true
|
||||
})
|
||||
// using the done promise callback
|
||||
.done(function(data) {
|
||||
if (!data.success) {
|
||||
// handle errors
|
||||
if (data.errors.app_name) {
|
||||
$('#app_name').addClass('has-error');
|
||||
$('#app_name').append('<div class="form-error">' + data.errors.app_name + '</div>');
|
||||
}
|
||||
if (data.errors.app_url) {
|
||||
$('#app_url').addClass('has-error');
|
||||
$('#app_url').append('<div class="form-error">' + data.errors.app_url + '</div>');
|
||||
}
|
||||
if (data.errors.app_timezone) {
|
||||
$('#app_timezone').addClass('has-error');
|
||||
$('#app_timezone').append('<div class="form-error">' + data.errors.app_timezone + '</div>');
|
||||
}
|
||||
if (data.errors.host_name) {
|
||||
$('#host_name').addClass('has-error');
|
||||
$('#host_name').append('<div class="form-error">' + data.errors.host_name + '</div>');
|
||||
}
|
||||
if (data.errors.port_name) {
|
||||
$('#port_name').addClass('has-error');
|
||||
$('#port_name').append('<div class="form-error">' + data.errors.port_name + '</div>');
|
||||
}
|
||||
if (data.errors.user_name) {
|
||||
$('#user_name').addClass('has-error');
|
||||
$('#user_name').append('<div class="form-error">' + data.errors.user_name + '</div>');
|
||||
}
|
||||
if (data.errors.database_name) {
|
||||
$('#database_name').addClass('has-error');
|
||||
$('#database_name').append('<div class="form-error">' + data.errors.database_name + '</div>');
|
||||
}
|
||||
if (data.errors.user_password) {
|
||||
$('#user_password').addClass('has-error');
|
||||
$('#user_password').append('<div class="form-error">' + data.errors.user_password + '</div>');
|
||||
}
|
||||
if (data.errors.app_url_space) {
|
||||
$('#app_url').addClass('has-error');
|
||||
$('#app_url').append('<div class="form-error">' + data.errors.app_url_space + '</div>');
|
||||
}
|
||||
if (data.errors.app_name_space) {
|
||||
$('#app_name').addClass('has-error');
|
||||
$('#app_name').append('<div class="form-error">' + data.errors.app_name_space + '</div>');
|
||||
}
|
||||
if (data.errors.host_name_space) {
|
||||
$('#host_name').addClass('has-error');
|
||||
$('#host_name').append('<div class="form-error">' + data.errors.host_name_space + '</div>');
|
||||
}
|
||||
if (data.errors.port_name_space) {
|
||||
$('#port_name').addClass('has-error');
|
||||
$('#port_name').append('<div class="form-error">' + data.errors.port_name_space + '</div>');
|
||||
}
|
||||
if (data.errors.user_name_space) {
|
||||
$('#user_name').addClass('has-error');
|
||||
$('#user_name').append('<div class="form-error">' + data.errors.user_name_space + '</div>');
|
||||
}
|
||||
if (data.errors.database_name_space) {
|
||||
$('#database_name').addClass('has-error');
|
||||
$('#database_name').append('<div class="form-error">' + data.errors.database_name_space + '</div>');
|
||||
}
|
||||
if (data.errors.user_password_space) {
|
||||
$('#user_password').addClass('has-error');
|
||||
$('#user_password').append('<div class="form-error">' + data.errors.user_password_space + '</div>');
|
||||
}
|
||||
if (data.errors.database_error) {
|
||||
$('#database_error').append('<div class="form-error">' + data.errors.database_error + '</div>');
|
||||
}
|
||||
} else {
|
||||
$('#environment').hide();
|
||||
$('#migration').show();
|
||||
}
|
||||
});
|
||||
|
||||
// stop the form from submitting the normal way and refreshing the page
|
||||
event.preventDefault();
|
||||
});
|
||||
});
|
||||
</script>
|
||||
|
|
@ -0,0 +1,37 @@
|
|||
<div class="container finish" id="finish">
|
||||
<div class="initial-display">
|
||||
<p>Installation completed</p>
|
||||
</div>
|
||||
|
||||
<div class="row justify-content-center">
|
||||
<div class="col-md-7">
|
||||
<div class="card card-default">
|
||||
<div class="card-body">
|
||||
<div class="alert alert-success">
|
||||
<b>Bagisto</b> is successfully installed on your system.<br>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="clearfix"> </div>
|
||||
<div class="" role="toolbar" aria-label="buttons">
|
||||
<button class="btn btn-primary" onclick="finish()">Launch the admin interface</button>
|
||||
<a href="https://bagisto.com/en/extensions/" class="btn btn-secondary" target="_blank">Bagisto Extensions</a>
|
||||
<a href="https://forums.bagisto.com/" class="btn btn-secondary" target="_blank">Bagisto Forums</a>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<script>
|
||||
function finish() {
|
||||
next = window.location.href.split("/installer")[0];
|
||||
next = next.concat('/admin/login');
|
||||
window.location.href = next;
|
||||
}
|
||||
|
||||
$(document).ready(function() {
|
||||
$('#finish').hide();
|
||||
$('#requirement').show();
|
||||
});
|
||||
</script>
|
||||
164
public/installer/Migration.php → public/installer/views/migration.blade.php
Executable file → Normal file
164
public/installer/Migration.php → public/installer/views/migration.blade.php
Executable file → Normal file
|
|
@ -1,40 +1,40 @@
|
|||
<html>
|
||||
<style>
|
||||
.window {
|
||||
max-height: 488px;
|
||||
background: #222;
|
||||
color: #fff;
|
||||
overflow: hidden;
|
||||
position: relative;
|
||||
margin: 0 auto;
|
||||
width: 100%;
|
||||
|
||||
<style>
|
||||
.window {
|
||||
background: #222;
|
||||
color: #fff;
|
||||
overflow: hidden;
|
||||
position: relative;
|
||||
margin: 0 auto;
|
||||
width: 100%;
|
||||
|
||||
&:before {
|
||||
content: ' ';
|
||||
display: block;
|
||||
height: 48px;
|
||||
background: #C6C6C6;
|
||||
}
|
||||
|
||||
&:after {
|
||||
content: '. . .';
|
||||
position: absolute;
|
||||
left: 12px;
|
||||
right: 0;
|
||||
top: -3px;
|
||||
font-family: "Times New Roman", Times, serif;
|
||||
font-size: 96px;
|
||||
color: #fff;
|
||||
line-height: 0;
|
||||
letter-spacing: -12px;
|
||||
}
|
||||
&:before {
|
||||
content: ' ';
|
||||
display: block;
|
||||
height: 48px;
|
||||
background: #C6C6C6;
|
||||
}
|
||||
|
||||
.terminal {
|
||||
margin: 20px;
|
||||
font-family: monospace;
|
||||
font-size: 16px;
|
||||
color: #22da26;
|
||||
&:after {
|
||||
content: '. . .';
|
||||
position: absolute;
|
||||
left: 12px;
|
||||
right: 0;
|
||||
top: -3px;
|
||||
font-family: "Times New Roman", Times, serif;
|
||||
font-size: 96px;
|
||||
color: #fff;
|
||||
line-height: 0;
|
||||
letter-spacing: -12px;
|
||||
}
|
||||
}
|
||||
|
||||
.terminal {
|
||||
margin: 20px;
|
||||
font-family: monospace;
|
||||
font-size: 16px;
|
||||
color: #22da26;
|
||||
max-height: 488px;
|
||||
|
||||
.command {
|
||||
width: 0%;
|
||||
|
|
@ -47,72 +47,76 @@
|
|||
color: #22da26;
|
||||
}
|
||||
}
|
||||
}
|
||||
</style>
|
||||
|
||||
</style>
|
||||
<div class="container migration" id="migration">
|
||||
<div class="initial-display">
|
||||
<p>Database Configuration</p>
|
||||
</div>
|
||||
|
||||
<body>
|
||||
|
||||
<div class="container migration" id="migration">
|
||||
<div class="initial-display">
|
||||
<p>Migration & Seed</p>
|
||||
|
||||
<div class="content" id="migration-result">
|
||||
<div class="row justify-content-center">
|
||||
<div class="col-md-6 col-md-offset-1">
|
||||
<div class="card card-default">
|
||||
<div class="card-body" id="migration-result">
|
||||
<div class="cp-spinner cp-round" id="loader"></div>
|
||||
<div class="window" id="migrate">
|
||||
</div>
|
||||
<div class="window" id="key">
|
||||
</div>
|
||||
<div class="window" id="seed">
|
||||
</div>
|
||||
<div class="window" id="publish">
|
||||
</div>
|
||||
<div class="window" id="composer">
|
||||
</div>
|
||||
|
||||
<div id="install-log">
|
||||
<label for="install-details">Installation log</label>
|
||||
<textarea rows="15" id="install-details" class="form-control"></textarea>
|
||||
</div>
|
||||
|
||||
<div class="instructions" style="padding-top: 40px;" id="instructions">
|
||||
<div style="text-align: center;">
|
||||
<span> Click the below button to run following : </span>
|
||||
<h4> Click the button below to run following :</h4>
|
||||
</div>
|
||||
|
||||
<div class="message">
|
||||
<span>Database Migration </span>
|
||||
<span>Create the database tables </span>
|
||||
</div>
|
||||
|
||||
<div class="message">
|
||||
<span> Database Seeder </span>
|
||||
<span> Populate the database tables </span>
|
||||
</div>
|
||||
|
||||
<div class="message">
|
||||
<span> Publishing Vendor </span>
|
||||
</div>
|
||||
<div class="message">
|
||||
<span> Generating Application Key </span>
|
||||
</div>
|
||||
|
||||
|
||||
<div class="row">
|
||||
<div class="col-md-12 text-center">
|
||||
<p class="composer" id="comp">Checking Composer Dependency</p>
|
||||
<p class="composer" id="composer-migrate">Migrating Database</p>
|
||||
<p class="composer" id="composer-seed">Seeding Data</p>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<span class="composer" id="comp" style="left: calc(50% - 135px);">Checking Composer Dependency</span>
|
||||
<span class="composer" id="composer-migrate" style="left: calc(50% - 85px);">Migrating Database</span>
|
||||
<span class="composer" id="composer-seed" style="left: calc(50% - 55px);">Seeding Data</span>
|
||||
<div class="clearfix"> </div>
|
||||
|
||||
<form method="POST" id="migration-form">
|
||||
<div style="text-align: center;">
|
||||
<button class="btn btn-primary" id="migrate-seed">Start installation</button>
|
||||
<button class="btn btn-primary" id="continue">Continue</button>
|
||||
</div>
|
||||
|
||||
<div style="cursor: pointer; margin-top:10px">
|
||||
<span id="migration-back">back</span>
|
||||
</div>
|
||||
</form>
|
||||
</div>
|
||||
|
||||
<form method="POST" id="migration-form">
|
||||
<div>
|
||||
<button class="prepare-btn" id="migrate-seed">Migrate & Seed</button>
|
||||
<button class="prepare-btn" id="continue">Continue</button>
|
||||
</div>
|
||||
<div style="cursor: pointer; margin-top:10px">
|
||||
<span id="migration-back">back</span>
|
||||
</div>
|
||||
</form>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</body>
|
||||
|
||||
</html>
|
||||
|
||||
<script>
|
||||
$(document).ready(function() {
|
||||
$('#continue').hide();
|
||||
$('#loader').hide();
|
||||
$('#install-log').hide();
|
||||
|
||||
// process the form
|
||||
$('#migration-form').submit(function(event) {
|
||||
|
|
@ -177,15 +181,16 @@
|
|||
// using the done promise callback
|
||||
.done(function(data) {
|
||||
$('#composer-seed').hide();
|
||||
$('#install-log').show();
|
||||
|
||||
if (data['seeder']) {
|
||||
$('#seed').append('<div class="terminal">' + data['seeder'] + '</div>');
|
||||
$('#install-details').append(data['seeder']);
|
||||
}
|
||||
if (data['publish']) {
|
||||
$('#publish').append('<div class="terminal">' + data['publish'] + '</div>');
|
||||
$('#install-details').append(data['publish']);
|
||||
}
|
||||
if (data['key']) {
|
||||
$('#key').append('<div class="terminal">' + data['key'] + '</div>');
|
||||
$('#install-details').append(data['key']);
|
||||
}
|
||||
|
||||
if ((data['key_results'] == 0) && (data['seeder_results'] == 0) && (data['publish_results'] == 0)) {
|
||||
|
|
@ -201,7 +206,7 @@
|
|||
$('#migrate-seed').hide();
|
||||
$('#migration-back').hide();
|
||||
if (data['migrate']) {
|
||||
$('#migrate').append('<div class="terminal">' + data['migrate'] + '</div>');
|
||||
$('#install-details').append(data['migrate']);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
@ -212,7 +217,8 @@
|
|||
$('#composer-migrate').hide();
|
||||
$('#migrate-seed').hide();
|
||||
$('#migration-back').hide();
|
||||
$('#composer').append('<div class="terminal">' + data['composer'] +'</div>');
|
||||
$('#install-details').append(data['composer']);
|
||||
$('#install-log').show();
|
||||
}
|
||||
}
|
||||
});
|
||||
Loading…
Reference in New Issue