diff options
author | Simon Rettberg | 2015-09-30 11:52:37 +0200 |
---|---|---|
committer | Simon Rettberg | 2015-09-30 11:52:37 +0200 |
commit | b58d051c9af46c2e3ddb831d67dfca9eed2c38b1 (patch) | |
tree | 0a2e0b3e7e7ac710823eaef6d31e70daba0278ba | |
parent | Trigger server ip changed for all module types (diff) | |
download | slx-admin-b58d051c9af46c2e3ddb831d67dfca9eed2c38b1.tar.gz slx-admin-b58d051c9af46c2e3ddb831d67dfca9eed2c38b1.tar.xz slx-admin-b58d051c9af46c2e3ddb831d67dfca9eed2c38b1.zip |
[Webinterface/HTTPS] Only show "disable https" if it is enabled
-rw-r--r-- | modules/webinterface.inc.php | 2 | ||||
-rw-r--r-- | templates/webinterface/https.html | 5 |
2 files changed, 6 insertions, 1 deletions
diff --git a/modules/webinterface.inc.php b/modules/webinterface.inc.php index f3780277..cecccacd 100644 --- a/modules/webinterface.inc.php +++ b/modules/webinterface.inc.php @@ -52,7 +52,7 @@ class Page_WebInterface extends Page if (Request::get('show') === 'httpsupdate') { Render::addTemplate('webinterface/httpd-restart', array('taskid' => Session::get('https-id'))); } - Render::addTemplate('webinterface/https'); + Render::addTemplate('webinterface/https', array('httpsEnabled' => file_exists('/etc/lighttpd/server.pem'))); $data = array(); if (Property::getPasswordFieldType() === 'text') $data['selected_show'] = 'checked'; diff --git a/templates/webinterface/https.html b/templates/webinterface/https.html index d2b4c69a..c6161cd6 100644 --- a/templates/webinterface/https.html +++ b/templates/webinterface/https.html @@ -5,6 +5,10 @@ <div class="panel-heading">{{lang_httpsSettings}}</div> <div class="panel-body"> <p>{{lang_description}}</p> + {{^httpsEnabled}} + <p>{{lang_HttpsIsDisabled}}</p> + {{/httpsEnabled}} + {{#httpsEnabled}} <div class="input-group" onclick="$('#moff').prop('checked', true); $('#wcustom').hide()"> <span class="input-group-addon"><input id="moff" type="radio" name="mode" value="off"></span> @@ -12,6 +16,7 @@ {{lang_noHttps}} </span> </div> + {{/httpsEnabled}} <div class="input-group" onclick="$('#mrandom').prop('checked', true); $('#wcustom').hide()"> <span class="input-group-addon"><input id="mrandom" type="radio" name="mode" value="random"></span> |