add basic/advanced switcher for installation-mode
Signed-off-by: Michael Kaufmann <d00p@froxlor.org>
This commit is contained in:
@@ -2469,6 +2469,8 @@ Yours sincerely, your administrator',
|
||||
'phpinfoupdate' => 'Update your current PHP Version from %s to %s or higher',
|
||||
'start_installation' => 'Start installation',
|
||||
'check_again' => 'Reload to check again',
|
||||
'switchmode_advanced' => 'Show advanced options',
|
||||
'switchmode_basic' => 'Hide advanced options',
|
||||
'dependency_check' => [
|
||||
'title' => 'Welcome to froxlor',
|
||||
'description' => 'We check the system for dependencies to ensure that all required php extensions and modules are enabled so that froxlor runs properly.',
|
||||
|
||||
@@ -35,7 +35,17 @@
|
||||
<div class="card-body p-5">
|
||||
<form method="post" action="?step={{ setup.step }}">
|
||||
{% if setup.step > 0 %}
|
||||
<h4 class="mb-3">{{ section.title }}</h4>
|
||||
<div class="row">
|
||||
<div class="col-12 col-md-7 order-2 order-md-1">
|
||||
<h4 class="mb-3">{{ section.title }}</h4>
|
||||
</div>
|
||||
<div class="col-12 col-md-5 order-1 order-md-2">
|
||||
<div class="form-check form-switch">
|
||||
<input class="form-check-input" type="checkbox" id="switchInstallMode" {% if extended is defined and extended %}checked{% endif %}>
|
||||
<label class="form-check-label" for="switchInstallMode">{% if extended is defined and extended %}{{ lng('install.switchmode_basic') }}{% else %}{{ lng('install.switchmode_advanced') }}{% endif %}</label>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<p class="lead">{{ section.description }}</p>
|
||||
<hr />
|
||||
|
||||
|
||||
17
templates/Froxlor/src/js/components/install.js
Normal file
17
templates/Froxlor/src/js/components/install.js
Normal file
@@ -0,0 +1,17 @@
|
||||
$(function () {
|
||||
/*
|
||||
* switch between basic and advanced install mode
|
||||
*/
|
||||
$('#switchInstallMode').on('click', function () {
|
||||
var checked = $(this).prop('checked');
|
||||
window.location = '/install/install.php' + replaceQueryParam('extended', +checked, window.location.search);
|
||||
});
|
||||
|
||||
function replaceQueryParam(param, newval, search) {
|
||||
var regex = new RegExp("([?;&])" + param + "[^&;]*[;&]?");
|
||||
if (search.match(regex)) {
|
||||
search = search.replace(regex, "$1").replace(/&$/, '');
|
||||
}
|
||||
return search + '&' + param + '=' + newval;
|
||||
}
|
||||
});
|
||||
@@ -21,3 +21,4 @@ require('./components/ipsandports')
|
||||
require('./components/domains')
|
||||
require('./components/configfiles')
|
||||
require('./components/apikeys')
|
||||
require('./components/install')
|
||||
|
||||
Reference in New Issue
Block a user