Commit 4bc6bf33 authored by Ad Schellevis's avatar Ad Schellevis

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

parent 067ffd68
...@@ -125,18 +125,21 @@ include("head.inc"); ...@@ -125,18 +125,21 @@ include("head.inc");
?> ?>
<body> <body>
<script type="text/javascript">
//<![CDATA[
//Generic show an advanced option function
function show_advanced(showboxID, configvalueID) {
document.getElementById(showboxID).innerHTML='';
aodiv = document.getElementById(configvalueID);
aodiv.style.display = "block";
}
//]]>
</script>
<script type="text/javascript"> <script type="text/javascript">
$( document ).ready(function() { $( document ).ready(function() {
$("#showstatisticsbox").click(function(event){
$("#showstatisticsbox").parent().hide();
$("#showstatistics").show();
});
$("#showrestrictbox").click(function(event){
$("#showrestrictbox").parent().hide();
$("#showrestrict").show();
});
$("#showleapsecbox").click(function(event){
$("#showleapsecbox").parent().hide();
$("#showleapsec").show();
});
/** /**
* Aliases * Aliases
*/ */
...@@ -317,8 +320,8 @@ include("head.inc"); ...@@ -317,8 +320,8 @@ include("head.inc");
<tr> <tr>
<td><i class="fa fa-info-circle text-muted"></i> <?=gettext('Statistics logging') ?></td> <td><i class="fa fa-info-circle text-muted"></i> <?=gettext('Statistics logging') ?></td>
<td> <td>
<div id="showstatisticsbox"> <div>
<input class="btn btn-default btn-xs" type="button" onclick="show_advanced('showstatisticsbox', 'showstatistics')" value="<?=gettext("Advanced");?>" /> - <?=gettext("Show statistics logging options");?> <input class="btn btn-default btn-xs" id="showstatisticsbox" type="button" value="<?=gettext("Advanced");?>" /> - <?=gettext("Show statistics logging options");?>
</div> </div>
<div id="showstatistics" style="display:none"> <div id="showstatistics" style="display:none">
<?= gettext("These options will create persistent daily log files in /var/log/ntp.") ?> <?= gettext("These options will create persistent daily log files in /var/log/ntp.") ?>
...@@ -337,8 +340,8 @@ include("head.inc"); ...@@ -337,8 +340,8 @@ include("head.inc");
<tr> <tr>
<td><i class="fa fa-info-circle text-muted"></i> <?=gettext('Access restrictions') ?></td> <td><i class="fa fa-info-circle text-muted"></i> <?=gettext('Access restrictions') ?></td>
<td> <td>
<div id="showrestrictbox"> <div>
<input type="button" class="btn btn-default btn-xs" onclick="show_advanced('showrestrictbox', 'showrestrict')" value="<?=gettext("Advanced");?>" /> - <?=gettext("Show access restriction options");?> <input type="button" id="showrestrictbox" class="btn btn-default btn-xs" value="<?=gettext("Advanced");?>" /> - <?=gettext("Show access restriction options");?>
</div> </div>
<div id="showrestrict" style="display:none"> <div id="showrestrict" style="display:none">
<?=gettext("these options control access to NTP from the WAN."); ?> <?=gettext("these options control access to NTP from the WAN."); ?>
...@@ -366,8 +369,8 @@ include("head.inc"); ...@@ -366,8 +369,8 @@ include("head.inc");
<tr> <tr>
<td><i class="fa fa-info-circle text-muted"></i> <?=gettext('Leap seconds') ?></td> <td><i class="fa fa-info-circle text-muted"></i> <?=gettext('Leap seconds') ?></td>
<td> <td>
<div id="showleapsecbox"> <div>
<input type="button" class="btn btn-default btn-xs" onclick="show_advanced('showleapsecbox', 'showleapsec')" value="<?=gettext("Advanced");?>" /> - <?=gettext("Show Leap second configuration");?> <input type="button" id="showleapsecbox" class="btn btn-default btn-xs" value="<?=gettext("Advanced");?>" /> - <?=gettext("Show Leap second configuration");?>
</div> </div>
<div id="showleapsec" style="display:none"> <div id="showleapsec" style="display:none">
<?=gettext("A leap second file allows NTP to advertize an upcoming leap second addition or subtraction.");?> <?=gettext("A leap second file allows NTP to advertize an upcoming leap second addition or subtraction.");?>
......
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