Commit e047524e authored by Ad Schellevis's avatar Ad Schellevis

js cleanup system_advanced_admin.php for https://github.com/opnsense/core/issues/1005

parent 4ea7221f
...@@ -269,20 +269,17 @@ include("head.inc"); ...@@ -269,20 +269,17 @@ include("head.inc");
?> ?>
<body> <body>
<?php include("fbegin.inc"); ?> <?php include("fbegin.inc"); ?>
<script type="text/javascript"> <script type="text/javascript">
//<![CDATA[ $(document).ready(function() {
function prot_change() { $(".proto").change(function(){
if (document.iform.https_proto.checked) { if ($("#https_proto").prop('checked')) {
document.getElementById("ssl_opts").style.display=""; $(".ssl_opts").show();
} else { } else {
document.getElementById("ssl_opts").style.display="none"; $(".ssl_opts").hide();
}
} }
});
$( document ).ready(function() { $(".proto").change();
prot_change();
<?php <?php
// reload page after 20 seconds if webserver is restarted // reload page after 20 seconds if webserver is restarted
...@@ -293,7 +290,6 @@ include("head.inc"); ...@@ -293,7 +290,6 @@ include("head.inc");
<?php <?php
endif;?> endif;?>
}); });
//]]>
</script> </script>
<section class="page-content-main"> <section class="page-content-main">
...@@ -321,10 +317,10 @@ include("head.inc"); ...@@ -321,10 +317,10 @@ include("head.inc");
<tr> <tr>
<td><i class="fa fa-info-circle text-muted"></i> <?=gettext("Protocol"); ?></td> <td><i class="fa fa-info-circle text-muted"></i> <?=gettext("Protocol"); ?></td>
<td> <td>
<input name="webguiproto" id="http_proto" type="radio" value="http" <?= $pconfig['webguiproto'] == "http" ? 'checked="checked"' :'' ?> onclick="prot_change()" /> <input name="webguiproto" class="proto" id="http_proto" type="radio" value="http" <?= $pconfig['webguiproto'] == "http" ? 'checked="checked"' :'' ?>/>
<?=gettext("HTTP"); ?> <?=gettext("HTTP"); ?>
&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp;
<input name="webguiproto" id="https_proto" type="radio" value="https" <?= $pconfig['webguiproto'] == "https" ? 'checked="checked"' : '' ?> <?=$certs_available ? '' : 'disabled="disabled"' ?> onclick="prot_change()" /> <input name="webguiproto" class="proto" id="https_proto" type="radio" value="https" <?= $pconfig['webguiproto'] == "https" ? 'checked="checked"' : '' ?> <?=$certs_available ? '' : 'disabled="disabled"' ?>/>
<?=gettext("HTTPS"); ?> <?=gettext("HTTPS"); ?>
<?php <?php
...@@ -335,7 +331,7 @@ include("head.inc"); ...@@ -335,7 +331,7 @@ include("head.inc");
endif; ?> endif; ?>
</td> </td>
</tr> </tr>
<tr id="ssl_opts"> <tr class="ssl_opts">
<td><a id="help_for_sslcertref" href="#" class="showhelp"><i class="fa fa-info-circle"></i></a> <?=gettext("SSL Certificate"); ?></td> <td><a id="help_for_sslcertref" href="#" class="showhelp"><i class="fa fa-info-circle"></i></a> <?=gettext("SSL Certificate"); ?></td>
<td> <td>
<select name="ssl-certref" class="formselect selectpicker" data-style="btn-default"> <select name="ssl-certref" class="formselect selectpicker" data-style="btn-default">
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment