[INSTALL] Allow the setup of sslproxy during install time

install.php:
installer.php:
- add option field and handle logic

display.css:
- hardcode ssl's label margin-top value so all options are correctly displayed
This commit is contained in:
tenma 2020-03-15 21:37:37 +00:00 committed by Diogo Peralta Cordeiro
parent eac3f58e9a
commit 1d7855a70d
3 changed files with 7 additions and 1 deletions

View File

@ -454,6 +454,7 @@ abstract class Installer
"\$config['site']['server'] = {$vals['server']};\n" . "\$config['site']['server'] = {$vals['server']};\n" .
"\$config['site']['path'] = {$vals['path']}; \n\n" . "\$config['site']['path'] = {$vals['path']}; \n\n" .
"\$config['site']['ssl'] = {$vals['ssl']}; \n\n" . "\$config['site']['ssl'] = {$vals['ssl']}; \n\n" .
($this->ssl === 'proxy' ? "\$config['site']['sslproxy'] = true;\n\n" : '') .
// checks if fancy URLs are enabled // checks if fancy URLs are enabled
($this->fancy ? "\$config['site']['fancy'] = true;\n\n" : '') . ($this->fancy ? "\$config['site']['fancy'] = true;\n\n" : '') .

View File

@ -206,6 +206,7 @@ class WebInstaller extends Installer
<label for="ssl">Server SSL</label> <label for="ssl">Server SSL</label>
<input type="radio" name="ssl" id="ssl-always" value="always" {$ssl['always']}> enable<br> <input type="radio" name="ssl" id="ssl-always" value="always" {$ssl['always']}> enable<br>
<input type="radio" name="ssl" id="ssl-never" value="never" {$ssl['never']}> disable<br> <input type="radio" name="ssl" id="ssl-never" value="never" {$ssl['never']}> disable<br>
<input type="radio" name="ssl" id="ssl-proxy" value="proxy"> proxied<br>
<p class="form_guide" id="ssl-form_guide">Enabling SSL (https://) requires extra webserver configuration and certificate generation not offered by this installation.</p> <p class="form_guide" id="ssl-form_guide">Enabling SSL (https://) requires extra webserver configuration and certificate generation not offered by this installation.</p>
</li> </li>
</ul> </ul>
@ -357,7 +358,7 @@ STR;
$fail = true; $fail = true;
} }
if (!in_array($this->ssl, ['never', 'always'])) { if (!in_array($this->ssl, ['never', 'always', 'proxy'])) {
$this->updateStatus("Bad value for server SSL enabling."); $this->updateStatus("Bad value for server SSL enabling.");
$fail = true; $fail = true;
} }

View File

@ -1405,6 +1405,10 @@ form label.submit {
margin-left:0; margin-left:0;
} }
.form_settings label[for=ssl] {
margin-top:23px;
}
.form_settings label { .form_settings label {
margin-top:2px; margin-top:2px;
width: 25%; width: 25%;