499 |
499 |
'DNS Default Domain',
|
500 |
500 |
'Provide a default domain name to clients',
|
501 |
501 |
$pconfig['dns_domain_enable']
|
502 |
|
))->toggles('.dnsdomain');
|
|
502 |
));
|
503 |
503 |
|
504 |
504 |
$group = new Form_Group('DNS Domain');
|
505 |
505 |
$group->addClass('dnsdomain');
|
... | ... | |
519 |
519 |
'DNS Servers',
|
520 |
520 |
'Provide a DNS server list to clients',
|
521 |
521 |
$pconfig['dns_server_enable']
|
522 |
|
))->toggles('.dnsservers');
|
|
522 |
));
|
523 |
523 |
|
524 |
524 |
$group = new Form_Group(null);
|
525 |
525 |
$group->addClass('dnsservers');
|
... | ... | |
560 |
560 |
'NTP Servers',
|
561 |
561 |
'Provide an NTP server list to clients',
|
562 |
562 |
$pconfig['ntp_server_enable']
|
563 |
|
))->toggles('.ntpservers');
|
|
563 |
));
|
564 |
564 |
|
565 |
565 |
$group = new Form_Group(null);
|
566 |
566 |
$group->addClass('ntpservers');
|
... | ... | |
581 |
581 |
|
582 |
582 |
$section->add($group);
|
583 |
583 |
|
584 |
|
// NTP servers - For this section we need to use Javascript hiding since there
|
|
584 |
// Netbios - For this section we need to use Javascript hiding since there
|
585 |
585 |
// are nested toggles
|
586 |
586 |
$section->addInput(new Form_Checkbox(
|
587 |
587 |
'netbios_enable',
|
... | ... | |
670 |
670 |
<script type="text/javascript">
|
671 |
671 |
//<![CDATA[
|
672 |
672 |
events.push(function() {
|
|
673 |
function dnsdomain_change() {
|
|
674 |
if ($('#dns_domain_enable').prop('checked')) {
|
|
675 |
hideClass('dnsdomain', false);
|
|
676 |
} else {
|
|
677 |
hideClass('dnsdomain', true);
|
|
678 |
}
|
|
679 |
}
|
673 |
680 |
|
674 |
|
// Hide/show that section, but have to also respect the wins_server_enable checkbox
|
|
681 |
function dnsservers_change() {
|
|
682 |
if ($('#dns_server_enable').prop('checked')) {
|
|
683 |
hideClass('dnsservers', false);
|
|
684 |
} else {
|
|
685 |
hideClass('dnsservers', true);
|
|
686 |
}
|
|
687 |
}
|
|
688 |
|
|
689 |
function ntpservers_change() {
|
|
690 |
if ($('#ntp_server_enable').prop('checked')) {
|
|
691 |
hideClass('ntpservers', false);
|
|
692 |
} else {
|
|
693 |
hideClass('ntpservers', true);
|
|
694 |
}
|
|
695 |
}
|
|
696 |
|
|
697 |
// Hide/show that section, but have to also respect the wins_server_enable and nbdd_server_enable checkboxes
|
675 |
698 |
function setNetbios() {
|
676 |
699 |
if ($('#netbios_enable').prop('checked')) {
|
677 |
700 |
hideInput('netbios_ntype', false);
|
... | ... | |
692 |
715 |
|
693 |
716 |
// ---------- Click checkbox handlers ---------------------------------------------------------
|
694 |
717 |
|
|
718 |
// On clicking DNS Default Domain
|
|
719 |
$('#dns_domain_enable').click(function () {
|
|
720 |
dnsdomain_change();
|
|
721 |
});
|
|
722 |
|
|
723 |
// On clicking DNS Servers
|
|
724 |
$('#dns_server_enable').click(function () {
|
|
725 |
dnsservers_change();
|
|
726 |
});
|
|
727 |
|
|
728 |
// On clicking NTP Servers
|
|
729 |
$('#ntp_server_enable').click(function () {
|
|
730 |
ntpservers_change();
|
|
731 |
});
|
|
732 |
|
695 |
733 |
// On clicking the netbios_enable checkbox
|
696 |
734 |
$('#netbios_enable').click(function () {
|
697 |
735 |
setNetbios();
|
... | ... | |
705 |
743 |
// ---------- On initial page load ------------------------------------------------------------
|
706 |
744 |
|
707 |
745 |
setNetbios();
|
|
746 |
dnsdomain_change();
|
|
747 |
dnsservers_change();
|
|
748 |
ntpservers_change();
|
|
749 |
|
708 |
750 |
});
|
709 |
751 |
//]]>
|
710 |
752 |
</script>
|