diff options
Diffstat (limited to 'modules-available/webinterface/templates')
4 files changed, 139 insertions, 25 deletions
diff --git a/modules-available/webinterface/templates/acme-error.html b/modules-available/webinterface/templates/acme-error.html new file mode 100644 index 00000000..facbbad2 --- /dev/null +++ b/modules-available/webinterface/templates/acme-error.html @@ -0,0 +1,5 @@ +<div class="alert alert-danger"> + {{lang_msgAcmeFailed}} +</div> +<pre>{{error}}</pre> +<hr>
\ No newline at end of file diff --git a/modules-available/webinterface/templates/heading.html b/modules-available/webinterface/templates/heading.html index 59a8cf6b..b759eea9 100644 --- a/modules-available/webinterface/templates/heading.html +++ b/modules-available/webinterface/templates/heading.html @@ -4,6 +4,7 @@ <script><!-- document.addEventListener('DOMContentLoaded', function () { var $boxCustom = $('#wcustom'); + var $boxAcme = $('#wacme'); $('.row-select').click(function (e) { if (e.target.tagName === 'INPUT') return; @@ -11,9 +12,13 @@ document.addEventListener('DOMContentLoaded', function () { }); $('#cert-options').find('input').change(function(e) { $boxCustom.toggle(e.target.id === 'mcustom'); + $boxAcme.toggle(e.target.id === 'macme'); }); if ($('#mcustom').is(':checked')) { $boxCustom.show(); } + if ($('#macme').is(':checked')) { + $boxAcme.show(); + } }); //--></script>
\ No newline at end of file diff --git a/modules-available/webinterface/templates/httpd-restart.html b/modules-available/webinterface/templates/httpd-restart.html index ac4e726b..75d86ad3 100644 --- a/modules-available/webinterface/templates/httpd-restart.html +++ b/modules-available/webinterface/templates/httpd-restart.html @@ -19,7 +19,9 @@ function slxRestartCb(task) { } else { console.log('Disabling because ' + task.statusCode); clearInterval(slxRedirTimer); - window.location.replace(window.location.href.replace('&show=httpsupdate', '')); + if (task.statusCode === 'TASK_FINISHED' && (!task.data || !task.data.error || !task.data.error.length)) { + window.location.replace(window.location.href.replace('&show=httpsupdate', '')); + } } } diff --git a/modules-available/webinterface/templates/https.html b/modules-available/webinterface/templates/https.html index ad36e9e5..5198c299 100644 --- a/modules-available/webinterface/templates/https.html +++ b/modules-available/webinterface/templates/https.html @@ -6,10 +6,10 @@ <div class="panel-body"> <p>{{lang_httpsDescription}}</p> {{^httpsUsed}} - {{lang_youreNotUsingHttps}} + <p>{{lang_youreNotUsingHttps}}</p> {{/httpsUsed}} {{#httpsUsed}} - {{lang_youreUsingHttps}} + <p>{{lang_youreUsingHttps}}</p> {{/httpsUsed}} <div class="text-info slx-bold"> {{#offSelected}} @@ -24,8 +24,80 @@ {{#suppliedSelected}} <p>{{lang_suppliedSelected}}</p> {{/suppliedSelected}} + {{#acmeSelected}} + <p>{{lang_acmeSelected}}</p> + {{/acmeSelected}} </div> + <table class="slx-table"> + {{#certIssuer}} + <tr><td>{{lang_certIssuer}}:</td><td>{{.}}</td></tr> + {{/certIssuer}} + {{#certExpire}} + <tr><td>{{lang_certExpireTime}}:</td><td class="{{certExpireClass}}">{{.}}</td></tr> + {{/certExpire}} + {{#certDomains.0}} + <tr> + <td style="vertical-align:top">{{lang_currentCertDomains}}:</td> + <td> + {{#certDomains}} + <div>{{.}}</div> + {{/certDomains}} + </td> + </tr> + {{/certDomains.0}} + </table> + + <label>{{lang_generalHttpsOptions}}</label> + <div class="input-group row-select"> + <span class="input-group-addon"> + <span class="checkbox"> + <input id="httpsredirect" type="checkbox" name="httpsredirect" value="on" {{redirect_checked}} {{perms.edit.https.disabled}}> + <label></label> + </span> + </span> + <span class="form-control"> + {{lang_httpsRedirect}} + </span> + </div> + <div class="input-group row-select"> + <span class="input-group-addon"> + <span class="checkbox"> + <input id="usehsts" type="checkbox" name="usehsts" value="on" {{hsts_checked}} {{perms.edit.https.disabled}}> + <label></label> + </span> + </span> + <span class="form-control"> + {{lang_useHsts}} + </span> + </div> + <div class="input-group row-select"> + <span class="input-group-addon"> + <span class="checkbox"> + <input id="redirdomain" type="checkbox" name="redirdomain" value="on" {{redirdomain_checked}} {{perms.edit.https.disabled}}> + <label></label> + </span> + </span> + <span class="form-control"> + {{lang_redirectDomain}} + </span> + </div> + <br> + + <label>{{lang_changeCertificateOption}}</label> <div id="cert-options"> + + <div class="input-group row-select"> + <span class="input-group-addon"> + <span class="radio"> + <input id="https-do-nothing" type="radio" name="mode" value="noop" {{perms.edit.https.disabled}} checked> + <label></label> + </span> + </span> + <span class="form-control"> + {{lang_httpsOptionNoChange}} + </span> + </div> + {{#httpsEnabled}} <div class="input-group row-select"> <span class="input-group-addon"> @@ -39,6 +111,7 @@ </span> </div> {{/httpsEnabled}} + <div class="input-group row-select"> <span class="input-group-addon"> <span class="radio"> @@ -50,6 +123,7 @@ {{lang_randomCert}} </span> </div> + <div class="input-group row-select"> <span class="input-group-addon"> <span class="radio"> @@ -61,6 +135,18 @@ {{lang_customCert}} </span> </div> + + <div class="input-group row-select"> + <span class="input-group-addon"> + <span class="radio"> + <input id="macme" type="radio" name="mode" value="acme" {{perms.edit.https.disabled}}> + <label></label> + </span> + </span> + <span class="form-control"> + {{lang_optionAcme}} + </span> + </div> </div> <div class="well well-sm collapse" id="wcustom"> @@ -85,29 +171,45 @@ MIIFfTCCA... <hr> </div> - <br> - <div class="input-group row-select"> - <span class="input-group-addon"> - <span class="checkbox"> - <input id="httpsredirect" type="checkbox" name="httpsredirect" value="on" {{redirect_checked}} {{perms.edit.https.disabled}}> - <label></label> - </span> - </span> - <span class="form-control"> - {{lang_httpsRedirect}} - </span> - </div> - <div class="input-group row-select"> - <span class="input-group-addon"> - <span class="checkbox"> - <input id="usehsts" type="checkbox" name="usehsts" value="on" {{hsts_checked}} {{perms.edit.https.disabled}}> - <label></label> - </span> - </span> - <span class="form-control"> - {{lang_useHsts}} - </span> + <div class="well well-sm collapse" id="wacme"> + <p>{{lang_acmeCreateNewHint}}</p> + <div class="form-group"> + <label for="acme-provider">{{lang_acmeProvider}}</label> + <select class="form-control" name="acme-provider" id="acme-provider"> + {{#acmeProviders}} + <option value="{{id}}" {{selected}}>{{name}}</option> + {{/acmeProviders}} + </select> + </div> + <div class="form-group"> + <label for="acme-mail">{{lang_acmeMail}}</label> + <input class="form-control" name="acme-mail" id="acme-mail" value="{{acmeMail}}"> + </div> + <div class="form-group"> + <label for="acme-domains">{{lang_acmeDomains}}</label> + <textarea rows="4" class="form-control" name="acme-domains" id="acme-domains">{{acmeDomains}}</textarea> + </div> + <hr> + <div class="slx-space"> + {{lang_acmeKidKeyHint}} + </div> + <div class="form-group"> + <label for="acme-kid">{{lang_acmeKeyId}}</label> + <input class="form-control" type="text" id="acme-kid" name="acme-kid" value="{{acmeKeyId}}"> + </div> + <div class="form-group"> + <label for="acme-hmac-key">{{lang_acmeHmacKey}}</label> + <input class="form-control" type="text" id="acme-hmac-key" name="acme-hmac-key" + value="{{acmeHmacKey}}"> + </div> + <div class="slx-space"></div> + <div class="checkbox"> + <input type="checkbox" name="acme-wipe-all" value="1" id="acme-wipe-all"> + <label for="acme-wipe-all">{{lang_acmeWipeAll}}</label> + </div> + <i>{{lang_acmeWipeAllHint}}</i> </div> + <br> <div class="pull-right"> |