Commit 0f2f9ce7 authored by Ad Schellevis's avatar Ad Schellevis

(legacy) spacing and unused css classes in vpn_openvpn_csc.php

parent 8b12976f
...@@ -246,34 +246,38 @@ $( document ).ready(function() { ...@@ -246,34 +246,38 @@ $( document ).ready(function() {
function dns_domain_change() { function dns_domain_change() {
if (document.iform.dns_domain_enable.checked) if (document.iform.dns_domain_enable.checked) {
document.getElementById("dns_domain_data").style.display=""; document.getElementById("dns_domain_data").style.display="";
else } else {
document.getElementById("dns_domain_data").style.display="none"; document.getElementById("dns_domain_data").style.display="none";
}
} }
function dns_server_change() { function dns_server_change() {
if (document.iform.dns_server_enable.checked) if (document.iform.dns_server_enable.checked) {
document.getElementById("dns_server_data").style.display=""; document.getElementById("dns_server_data").style.display="";
else } else {
document.getElementById("dns_server_data").style.display="none"; document.getElementById("dns_server_data").style.display="none";
}
} }
function wins_server_change() { function wins_server_change() {
if (document.iform.wins_server_enable.checked) if (document.iform.wins_server_enable.checked) {
document.getElementById("wins_server_data").style.display=""; document.getElementById("wins_server_data").style.display="";
else } else {
document.getElementById("wins_server_data").style.display="none"; document.getElementById("wins_server_data").style.display="none";
}
} }
function ntp_server_change() { function ntp_server_change() {
if (document.iform.ntp_server_enable.checked) if (document.iform.ntp_server_enable.checked) {
document.getElementById("ntp_server_data").style.display=""; document.getElementById("ntp_server_data").style.display="";
else } else {
document.getElementById("ntp_server_data").style.display="none"; document.getElementById("ntp_server_data").style.display="none";
}
} }
function netbios_change() { function netbios_change() {
...@@ -291,39 +295,31 @@ function netbios_change() { ...@@ -291,39 +295,31 @@ function netbios_change() {
</script> </script>
<? <?
if ($act!="new" && $act!="edit") { if ($act!="new" && $act!="edit") {
$main_buttons = array( $main_buttons = array(
array('href'=>'vpn_openvpn_csc.php?act=new', 'label'=>gettext("add csc")), array('href'=>'vpn_openvpn_csc.php?act=new', 'label'=>gettext("add csc")),
); );
} }
?> ?>
<?php include("fbegin.inc"); ?> <?php include("fbegin.inc"); ?>
<section class="page-content-main"> <section class="page-content-main">
<div class="container-fluid"> <div class="container-fluid">
<div class="row"> <div class="row">
<?php
<?php
if (isset($input_errors) && count($input_errors) > 0) { if (isset($input_errors) && count($input_errors) > 0) {
print_input_errors($input_errors); print_input_errors($input_errors);
} }
if (isset($savemsg)) { if (isset($savemsg)) {
print_info_box($savemsg); print_info_box($savemsg);
} }?>
?>
<section class="col-xs-12"> <section class="col-xs-12">
<div class="tab-content content-box col-xs-12"> <div class="tab-content content-box col-xs-12">
<?php
<?php if ($act=="new" || $act=="edit") : if ($act=="new" || $act=="edit") :?>
?>
<form action="vpn_openvpn_csc.php" method="post" name="iform" id="iform"> <form action="vpn_openvpn_csc.php" method="post" name="iform" id="iform">
<div class="table-responsive"> <div class="table-responsive">
<table class="table table-striped table-sort"> <table class="table table-striped">
<tr> <tr>
<td width="22%"><?=gettext("General information"); ?></td> <td width="22%"><?=gettext("General information"); ?></td>
<td width="78%" align="right"> <td width="78%" align="right">
...@@ -332,8 +328,8 @@ if ($act!="new" && $act!="edit") { ...@@ -332,8 +328,8 @@ if ($act!="new" && $act!="edit") {
</td> </td>
</tr> </tr>
<tr> <tr>
<td width="22%" valign="top" class="vncellreq"><a id="help_for_disable" href="#" class="showhelp"><i class="fa fa-info-circle"></i></a> <?=gettext("Disabled"); ?></td> <td width="22%"><a id="help_for_disable" href="#" class="showhelp"><i class="fa fa-info-circle"></i></a> <?=gettext("Disabled"); ?></td>
<td width="78%" class="vtable"> <td width="78%">
<input name="disable" type="checkbox" value="yes" <?= !empty($pconfig['disable']) ? "checked=\"checked\"" : "";?> /> <input name="disable" type="checkbox" value="yes" <?= !empty($pconfig['disable']) ? "checked=\"checked\"" : "";?> />
<div class="hidden" for="help_for_disable"> <div class="hidden" for="help_for_disable">
<?=gettext("Set this option to disable this client-specific override without removing it from the list"); ?> <?=gettext("Set this option to disable this client-specific override without removing it from the list"); ?>
...@@ -341,26 +337,26 @@ if ($act!="new" && $act!="edit") { ...@@ -341,26 +337,26 @@ if ($act!="new" && $act!="edit") {
</td> </td>
</tr> </tr>
<tr> <tr>
<td width="22%" valign="top" class="vncellreq"><a id="help_for_common_name" href="#" class="showhelp"><i class="fa fa-info-circle"></i></a> <?=gettext("Common name"); ?></td> <td width="22%"><a id="help_for_common_name" href="#" class="showhelp"><i class="fa fa-info-circle"></i></a> <?=gettext("Common name"); ?></td>
<td width="78%" class="vtable"> <td width="78%">
<input name="common_name" type="text" class="formfld unknown" size="30" value="<?=$pconfig['common_name'];?>" /> <input name="common_name" type="text" value="<?=$pconfig['common_name'];?>" />
<div class="hidden" for="help_for_common_name"> <div class="hidden" for="help_for_common_name">
<?=gettext("Enter the client's X.509 common name here"); ?>. <?=gettext("Enter the client's X.509 common name here"); ?>.
</div> </div>
</td> </td>
</tr> </tr>
<tr> <tr>
<td width="22%" valign="top" class="vncell"><a id="help_for_description" href="#" class="showhelp"><i class="fa fa-info-circle"></i></a> <?=gettext("Description"); ?></td> <td width="22%"><a id="help_for_description" href="#" class="showhelp"><i class="fa fa-info-circle"></i></a> <?=gettext("Description"); ?></td>
<td width="78%" class="vtable"> <td width="78%">
<input name="description" type="text" class="formfld unknown" size="30" value="<?=$pconfig['description'];?>" /> <input name="description" type="text" value="<?=$pconfig['description'];?>" />
<div class="hidden" for="help_for_description"> <div class="hidden" for="help_for_description">
<?=gettext("You may enter a description here for your reference (not parsed)"); ?>. <?=gettext("You may enter a description here for your reference (not parsed)"); ?>.
</div> </div>
</td> </td>
</tr> </tr>
<tr> <tr>
<td width="22%" valign="top" class="vncell"><a id="help_for_block" href="#" class="showhelp"><i class="fa fa-info-circle"></i></a> <?=gettext("Connection blocking"); ?></td> <td width="22%"><a id="help_for_block" href="#" class="showhelp"><i class="fa fa-info-circle"></i></a> <?=gettext("Connection blocking"); ?></td>
<td width="78%" class="vtable"> <td width="78%">
<input name="block" type="checkbox" value="yes" <?= !empty($pconfig['block']) ? "checked=\"checked\"" : "";?> /> <input name="block" type="checkbox" value="yes" <?= !empty($pconfig['block']) ? "checked=\"checked\"" : "";?> />
<div class="hidden" for="help_for_block"> <div class="hidden" for="help_for_block">
<?=gettext("Block this client connection based on its common name"); ?>.<br/> <?=gettext("Block this client connection based on its common name"); ?>.<br/>
...@@ -371,15 +367,15 @@ if ($act!="new" && $act!="edit") { ...@@ -371,15 +367,15 @@ if ($act!="new" && $act!="edit") {
</td> </td>
</tr> </tr>
<tr> <tr>
<td colspan="2" class="list" height="12"></td> <td colspan="2" height="12"></td>
</tr> </tr>
<tr> <tr>
<td colspan="2" valign="top" class="listtopic"><?=gettext("Tunnel Settings"); ?></td> <td colspan="2" ><?=gettext("Tunnel Settings"); ?></td>
</tr> </tr>
<tr> <tr>
<td width="22%" valign="top" class="vncell"><a id="help_for_tunnel_network" href="#" class="showhelp"><i class="fa fa-info-circle"></i></a> <?=gettext("Tunnel Network"); ?></td> <td width="22%"><a id="help_for_tunnel_network" href="#" class="showhelp"><i class="fa fa-info-circle"></i></a> <?=gettext("Tunnel Network"); ?></td>
<td width="78%" class="vtable"> <td width="78%">
<input name="tunnel_network" type="text" class="formfld unknown" size="20" value="<?=$pconfig['tunnel_network'];?>" /> <input name="tunnel_network" type="text" size="20" value="<?=$pconfig['tunnel_network'];?>" />
<div class="hidden" for="help_for_tunnel_network"> <div class="hidden" for="help_for_tunnel_network">
<?=gettext("This is the virtual network used for private " . <?=gettext("This is the virtual network used for private " .
"communications between this client and the " . "communications between this client and the " .
...@@ -392,9 +388,9 @@ if ($act!="new" && $act!="edit") { ...@@ -392,9 +388,9 @@ if ($act!="new" && $act!="edit") {
</td> </td>
</tr> </tr>
<tr id="local_optsv4"> <tr id="local_optsv4">
<td width="22%" valign="top" class="vncell"><a id="help_for_local_network" href="#" class="showhelp"><i class="fa fa-info-circle"></i></a> <?=gettext("IPv4 Local Network/s"); ?></td> <td width="22%"><a id="help_for_local_network" href="#" class="showhelp"><i class="fa fa-info-circle"></i></a> <?=gettext("IPv4 Local Network/s"); ?></td>
<td width="78%" class="vtable"> <td width="78%">
<input name="local_network" type="text" class="formfld unknown" size="40" value="<?=$pconfig['local_network'];?>" /> <input name="local_network" type="text" size="40" value="<?=$pconfig['local_network'];?>" />
<div class="hidden" for="help_for_local_network"> <div class="hidden" for="help_for_local_network">
<?=gettext("These are the IPv4 networks that will be accessible " . <?=gettext("These are the IPv4 networks that will be accessible " .
"from this particular client. Expressed as a comma-separated list of one or more CIDR ranges."); ?> "from this particular client. Expressed as a comma-separated list of one or more CIDR ranges."); ?>
...@@ -404,9 +400,9 @@ if ($act!="new" && $act!="edit") { ...@@ -404,9 +400,9 @@ if ($act!="new" && $act!="edit") {
</td> </td>
</tr> </tr>
<tr id="local_optsv6"> <tr id="local_optsv6">
<td width="22%" valign="top" class="vncell"><a id="help_for_local_networkv6" href="#" class="showhelp"><i class="fa fa-info-circle"></i></a> <?=gettext("IPv6 Local Network/s"); ?></td> <td width="22%"><a id="help_for_local_networkv6" href="#" class="showhelp"><i class="fa fa-info-circle"></i></a> <?=gettext("IPv6 Local Network/s"); ?></td>
<td width="78%" class="vtable"> <td width="78%">
<input name="local_networkv6" type="text" class="formfld unknown" size="40" value="<?=$pconfig['local_networkv6'];?>" /> <input name="local_networkv6" type="text" size="40" value="<?=$pconfig['local_networkv6'];?>" />
<div class="hidden" for="help_for_local_networkv6"> <div class="hidden" for="help_for_local_networkv6">
<?=gettext("These are the IPv6 networks that will be accessible " . <?=gettext("These are the IPv6 networks that will be accessible " .
"from this particular client. Expressed as a comma-separated list of one or more IP/PREFIX networks."); ?><br /> "from this particular client. Expressed as a comma-separated list of one or more IP/PREFIX networks."); ?><br />
...@@ -416,9 +412,9 @@ if ($act!="new" && $act!="edit") { ...@@ -416,9 +412,9 @@ if ($act!="new" && $act!="edit") {
</td> </td>
</tr> </tr>
<tr id="remote_optsv4"> <tr id="remote_optsv4">
<td width="22%" valign="top" class="vncell"><a id="help_for_remote_network" href="#" class="showhelp"><i class="fa fa-info-circle"></i></a> <?=gettext("IPv4 Remote Network/s"); ?></td> <td width="22%"><a id="help_for_remote_network" href="#" class="showhelp"><i class="fa fa-info-circle"></i></a> <?=gettext("IPv4 Remote Network/s"); ?></td>
<td width="78%" class="vtable"> <td width="78%">
<input name="remote_network" type="text" class="formfld unknown" size="40" value="<?=$pconfig['remote_network'];?>" /> <input name="remote_network" type="text" size="40" value="<?=$pconfig['remote_network'];?>" />
<div class="hidden" for="help_for_remote_network"> <div class="hidden" for="help_for_remote_network">
<?=gettext("These are the IPv4 networks that will be routed " . <?=gettext("These are the IPv4 networks that will be routed " .
"to this client specifically using iroute, so that a site-to-site " . "to this client specifically using iroute, so that a site-to-site " .
...@@ -432,9 +428,9 @@ if ($act!="new" && $act!="edit") { ...@@ -432,9 +428,9 @@ if ($act!="new" && $act!="edit") {
</td> </td>
</tr> </tr>
<tr id="remote_optsv6"> <tr id="remote_optsv6">
<td width="22%" valign="top" class="vncell"><a id="help_for_remote_networkv6" href="#" class="showhelp"><i class="fa fa-info-circle"></i></a> <?=gettext("IPv6 Remote Network/s"); ?></td> <td width="22%"><a id="help_for_remote_networkv6" href="#" class="showhelp"><i class="fa fa-info-circle"></i></a> <?=gettext("IPv6 Remote Network/s"); ?></td>
<td width="78%" class="vtable"> <td width="78%">
<input name="remote_networkv6" type="text" class="formfld unknown" size="40" value="<?=$pconfig['remote_networkv6'];?>" /> <input name="remote_networkv6" type="text" size="40" value="<?=$pconfig['remote_networkv6'];?>" />
<div class="hidden" for="help_for_remote_networkv6"> <div class="hidden" for="help_for_remote_networkv6">
<?=gettext("These are the IPv6 networks that will be routed " . <?=gettext("These are the IPv6 networks that will be routed " .
"to this client specifically using iroute, so that a site-to-site " . "to this client specifically using iroute, so that a site-to-site " .
...@@ -448,8 +444,8 @@ if ($act!="new" && $act!="edit") { ...@@ -448,8 +444,8 @@ if ($act!="new" && $act!="edit") {
</td> </td>
</tr> </tr>
<tr> <tr>
<td width="22%" valign="top" class="vncell"><a id="help_for_gwredir" href="#" class="showhelp"><i class="fa fa-info-circle"></i></a> <?=gettext("Redirect Gateway"); ?></td> <td width="22%"><a id="help_for_gwredir" href="#" class="showhelp"><i class="fa fa-info-circle"></i></a> <?=gettext("Redirect Gateway"); ?></td>
<td width="78%" class="vtable"> <td width="78%">
<input name="gwredir" type="checkbox" value="yes" <?= !empty($pconfig['gwredir']) ? "checked=\"checked\"" : "";?> /> <input name="gwredir" type="checkbox" value="yes" <?= !empty($pconfig['gwredir']) ? "checked=\"checked\"" : "";?> />
<div class="hidden" for="help_for_gwredir"> <div class="hidden" for="help_for_gwredir">
<?=gettext("Force all client generated traffic through the tunnel"); ?>. <?=gettext("Force all client generated traffic through the tunnel"); ?>.
...@@ -457,14 +453,14 @@ if ($act!="new" && $act!="edit") { ...@@ -457,14 +453,14 @@ if ($act!="new" && $act!="edit") {
</td> </td>
</tr> </tr>
<tr> <tr>
<td colspan="2" class="list" height="12"></td> <td colspan="2" height="12"></td>
</tr> </tr>
<tr> <tr>
<td colspan="2" valign="top" class="listtopic"><?=gettext("Client Settings"); ?></td> <td colspan="2"><?=gettext("Client Settings"); ?></td>
</tr> </tr>
<tr> <tr>
<td width="22%" valign="top" class="vncell"><a id="help_for_push_reset" href="#" class="showhelp"><i class="fa fa-info-circle"></i></a> <?=gettext("Server Definitions"); ?></td> <td width="22%"><a id="help_for_push_reset" href="#" class="showhelp"><i class="fa fa-info-circle"></i></a> <?=gettext("Server Definitions"); ?></td>
<td width="78%" class="vtable"> <td width="78%">
<input name="push_reset" type="checkbox" value="yes" <?= !empty($pconfig['push_reset']) ? "checked=\"checked\"" : "";?> /> <input name="push_reset" type="checkbox" value="yes" <?= !empty($pconfig['push_reset']) ? "checked=\"checked\"" : "";?> />
<div class="hidden" for="help_for_push_reset"> <div class="hidden" for="help_for_push_reset">
<?=gettext("Prevent this client from receiving any server-defined client settings."); ?> <?=gettext("Prevent this client from receiving any server-defined client settings."); ?>
...@@ -472,11 +468,11 @@ if ($act!="new" && $act!="edit") { ...@@ -472,11 +468,11 @@ if ($act!="new" && $act!="edit") {
</td> </td>
</tr> </tr>
<tr> <tr>
<td width="22%" valign="top" class="vncell"><a id="help_for_dns_domain" href="#" class="showhelp"><i class="fa fa-info-circle"></i></a> <?=gettext("DNS Default Domain"); ?></td> <td width="22%"><a id="help_for_dns_domain" href="#" class="showhelp"><i class="fa fa-info-circle"></i></a> <?=gettext("DNS Default Domain"); ?></td>
<td width="78%" class="vtable"> <td width="78%">
<input name="dns_domain_enable" type="checkbox" id="dns_domain_enable" value="yes" <?= !empty($pconfig['dns_domain']) ? "checked=\"checked\"" : "";?> onclick="dns_domain_change()" /> <input name="dns_domain_enable" type="checkbox" id="dns_domain_enable" value="yes" <?= !empty($pconfig['dns_domain']) ? "checked=\"checked\"" : "";?> onclick="dns_domain_change()" />
<div id="dns_domain_data"> <div id="dns_domain_data">
<input name="dns_domain" type="text" class="formfld unknown" id="dns_domain" size="30" value="<?=$pconfig['dns_domain'];?>" /> <input name="dns_domain" type="text" id="dns_domain" value="<?=$pconfig['dns_domain'];?>" />
</div> </div>
<div class="hidden" for="help_for_dns_domain"> <div class="hidden" for="help_for_dns_domain">
<?=gettext("Provide a default domain name to clients"); ?><br /> <?=gettext("Provide a default domain name to clients"); ?><br />
...@@ -484,18 +480,18 @@ if ($act!="new" && $act!="edit") { ...@@ -484,18 +480,18 @@ if ($act!="new" && $act!="edit") {
</td> </td>
</tr> </tr>
<tr> <tr>
<td width="22%" valign="top" class="vncell"><a id="help_for_dns_server" href="#" class="showhelp"><i class="fa fa-info-circle"></i></a> <?=gettext("DNS Servers"); ?></td> <td width="22%"><a id="help_for_dns_server" href="#" class="showhelp"><i class="fa fa-info-circle"></i></a> <?=gettext("DNS Servers"); ?></td>
<td width="78%" class="vtable"> <td width="78%">
<input name="dns_server_enable" type="checkbox" id="dns_server_enable" value="yes" <?=!empty($pconfig['dns_server1']) || !empty($pconfig['dns_server2']) || !empty($pconfig['dns_server3']) || !empty($pconfig['dns_server4']) ? "checked=\"checked\"" : "" ;?> onclick="dns_server_change()" /> <input name="dns_server_enable" type="checkbox" id="dns_server_enable" value="yes" <?=!empty($pconfig['dns_server1']) || !empty($pconfig['dns_server2']) || !empty($pconfig['dns_server3']) || !empty($pconfig['dns_server4']) ? "checked=\"checked\"" : "" ;?> onclick="dns_server_change()" />
<div id="dns_server_data"> <div id="dns_server_data">
<?=gettext("Server #1:"); ?>&nbsp; <?=gettext("Server #1:"); ?>&nbsp;
<input name="dns_server1" type="text" class="formfld unknown" id="dns_server1" size="20" value="<?=htmlspecialchars($pconfig['dns_server1']);?>" /> <input name="dns_server1" type="text" id="dns_server1" size="20" value="<?=htmlspecialchars($pconfig['dns_server1']);?>" />
<?=gettext("Server #2:"); ?>&nbsp; <?=gettext("Server #2:"); ?>&nbsp;
<input name="dns_server2" type="text" class="formfld unknown" id="dns_server2" size="20" value="<?=htmlspecialchars($pconfig['dns_server2']);?>" /> <input name="dns_server2" type="text" id="dns_server2" size="20" value="<?=htmlspecialchars($pconfig['dns_server2']);?>" />
<?=gettext("Server #3:"); ?>&nbsp; <?=gettext("Server #3:"); ?>&nbsp;
<input name="dns_server3" type="text" class="formfld unknown" id="dns_server3" size="20" value="<?=htmlspecialchars($pconfig['dns_server3']);?>" /> <input name="dns_server3" type="text" id="dns_server3" size="20" value="<?=htmlspecialchars($pconfig['dns_server3']);?>" />
<?=gettext("Server #4:"); ?>&nbsp; <?=gettext("Server #4:"); ?>&nbsp;
<input name="dns_server4" type="text" class="formfld unknown" id="dns_server4" size="20" value="<?=htmlspecialchars($pconfig['dns_server4']);?>" /> <input name="dns_server4" type="text" id="dns_server4" size="20" value="<?=htmlspecialchars($pconfig['dns_server4']);?>" />
</div> </div>
<div class="hidden" for="help_for_dns_server"> <div class="hidden" for="help_for_dns_server">
<?=gettext("Provide a DNS server list to clients"); ?> <?=gettext("Provide a DNS server list to clients"); ?>
...@@ -503,14 +499,14 @@ if ($act!="new" && $act!="edit") { ...@@ -503,14 +499,14 @@ if ($act!="new" && $act!="edit") {
</td> </td>
</tr> </tr>
<tr> <tr>
<td width="22%" valign="top" class="vncell"><a id="help_for_ntp_server" href="#" class="showhelp"><i class="fa fa-info-circle"></i></a> <?=gettext("NTP Servers"); ?></td> <td width="22%"><a id="help_for_ntp_server" href="#" class="showhelp"><i class="fa fa-info-circle"></i></a> <?=gettext("NTP Servers"); ?></td>
<td width="78%" class="vtable"> <td width="78%">
<input name="ntp_server_enable" type="checkbox" id="ntp_server_enable" value="yes" <?=!empty($pconfig['ntp_server1']) || !empty($pconfig['ntp_server2']) ? "checked=\"checked\"" : "" ;?> onclick="ntp_server_change()" /> <input name="ntp_server_enable" type="checkbox" id="ntp_server_enable" value="yes" <?=!empty($pconfig['ntp_server1']) || !empty($pconfig['ntp_server2']) ? "checked=\"checked\"" : "" ;?> onclick="ntp_server_change()" />
<div id="ntp_server_data"> <div id="ntp_server_data">
<?=gettext("Server #1:"); ?>&nbsp; <?=gettext("Server #1:"); ?>&nbsp;
<input name="ntp_server1" type="text" class="formfld unknown" id="ntp_server1" size="20" value="<?=$pconfig['ntp_server1'];?>" /> <input name="ntp_server1" type="text" id="ntp_server1" size="20" value="<?=$pconfig['ntp_server1'];?>" />
<?=gettext("Server #2:"); ?>&nbsp; <?=gettext("Server #2:"); ?>&nbsp;
<input name="ntp_server2" type="text" class="formfld unknown" id="ntp_server2" size="20" value="<?=$pconfig['ntp_server2'];?>" /> <input name="ntp_server2" type="text" id="ntp_server2" size="20" value="<?=$pconfig['ntp_server2'];?>" />
</div> </div>
<div class="hidden" for="help_for_ntp_server"> <div class="hidden" for="help_for_ntp_server">
<?=gettext("Provide a NTP server list to clients"); ?> <?=gettext("Provide a NTP server list to clients"); ?>
...@@ -518,8 +514,8 @@ if ($act!="new" && $act!="edit") { ...@@ -518,8 +514,8 @@ if ($act!="new" && $act!="edit") {
</td> </td>
</tr> </tr>
<tr> <tr>
<td width="22%" valign="top" class="vncell"><a id="help_for_netbios_enable" href="#" class="showhelp"><i class="fa fa-info-circle"></i></a> <?=gettext("NetBIOS Options"); ?></td> <td width="22%"><a id="help_for_netbios_enable" href="#" class="showhelp"><i class="fa fa-info-circle"></i></a> <?=gettext("NetBIOS Options"); ?></td>
<td width="78%" class="vtable"> <td width="78%">
<input name="netbios_enable" type="checkbox" id="netbios_enable" value="yes" <?=!empty($pconfig['netbios_enable']) ? "checked=\"checked\"" : "" ;?> onclick="netbios_change()" /> <input name="netbios_enable" type="checkbox" id="netbios_enable" value="yes" <?=!empty($pconfig['netbios_enable']) ? "checked=\"checked\"" : "" ;?> onclick="netbios_change()" />
<?=gettext("Enable NetBIOS over TCP/IP");?> <?=gettext("Enable NetBIOS over TCP/IP");?>
<div class="hidden" for="help_for_netbios_enable"> <div class="hidden" for="help_for_netbios_enable">
...@@ -528,21 +524,17 @@ if ($act!="new" && $act!="edit") { ...@@ -528,21 +524,17 @@ if ($act!="new" && $act!="edit") {
<div id="netbios_data"> <div id="netbios_data">
<?=gettext("Node Type"); ?>:&nbsp; <?=gettext("Node Type"); ?>:&nbsp;
<select name='netbios_ntype' class="formselect"> <select name='netbios_ntype'>
<?php <?php
foreach ($netbios_nodetypes as $type => $name) : foreach ($netbios_nodetypes as $type => $name) :
$selected = ""; $selected = "";
if ($pconfig['netbios_ntype'] == $type) { if ($pconfig['netbios_ntype'] == $type) {
$selected = "selected=\"selected\""; $selected = "selected=\"selected\"";
} }?>
?> <option value="<?=$type;?>" <?=$selected;?>><?=$name;?></option>
<option value="<?=$type;
?>" <?=$selected;
?>><?=$name;?></option>
<?php <?php
endforeach; ?> endforeach; ?>
</select> </select>
<div class="hidden" for="help_for_netbios_enable"> <div class="hidden" for="help_for_netbios_enable">
<?=gettext("Possible options: b-node (broadcasts), p-node " . <?=gettext("Possible options: b-node (broadcasts), p-node " .
"(point-to-point name queries to a WINS server), " . "(point-to-point name queries to a WINS server), " .
...@@ -550,7 +542,7 @@ if ($act!="new" && $act!="edit") { ...@@ -550,7 +542,7 @@ if ($act!="new" && $act!="edit") {
"h-node (query name server, then broadcast)."); ?> "h-node (query name server, then broadcast)."); ?>
</div> </div>
Scope ID:&nbsp; Scope ID:&nbsp;
<input name="netbios_scope" type="text" class="formfld unknown" id="netbios_scope" size="30" value="<?=$pconfig['netbios_scope'];?>" /> <input name="netbios_scope" type="text" id="netbios_scope" value="<?=$pconfig['netbios_scope'];?>" />
<div class="hidden" for="help_for_netbios_enable"> <div class="hidden" for="help_for_netbios_enable">
<?=gettext("A NetBIOS Scope ID provides an extended naming " . <?=gettext("A NetBIOS Scope ID provides an extended naming " .
"service for NetBIOS over TCP/IP. The NetBIOS " . "service for NetBIOS over TCP/IP. The NetBIOS " .
...@@ -562,14 +554,14 @@ if ($act!="new" && $act!="edit") { ...@@ -562,14 +554,14 @@ if ($act!="new" && $act!="edit") {
</td> </td>
</tr> </tr>
<tr id="wins_opts"> <tr id="wins_opts">
<td width="22%" valign="top" class="vncell"><a id="help_for_wins_server" href="#" class="showhelp"><i class="fa fa-info-circle"></i></a> <?=gettext("WINS Servers"); ?></td> <td width="22%"><a id="help_for_wins_server" href="#" class="showhelp"><i class="fa fa-info-circle"></i></a> <?=gettext("WINS Servers"); ?></td>
<td width="78%" class="vtable"> <td width="78%">
<input name="wins_server_enable" type="checkbox" id="wins_server_enable" value="yes" <?=!empty($pconfig['wins_server1']) || !empty($pconfig['wins_server2']) ? "checked=\"checked\"" : "" ;?> onclick="wins_server_change()" /> <input name="wins_server_enable" type="checkbox" id="wins_server_enable" value="yes" <?=!empty($pconfig['wins_server1']) || !empty($pconfig['wins_server2']) ? "checked=\"checked\"" : "" ;?> onclick="wins_server_change()" />
<div id="wins_server_data"> <div id="wins_server_data">
<?=gettext("Server #1:"); ?> <?=gettext("Server #1:"); ?>
<input name="wins_server1" type="text" class="formfld unknown" id="wins_server1" size="20" value="<?=$pconfig['wins_server1'];?>" /> <input name="wins_server1" type="text" id="wins_server1" size="20" value="<?=$pconfig['wins_server1'];?>" />
<?=gettext("Server #2:"); ?> <?=gettext("Server #2:"); ?>
<input name="wins_server2" type="text" class="formfld unknown" id="wins_server2" size="20" value="<?=$pconfig['wins_server2'];?>" /> <input name="wins_server2" type="text" id="wins_server2" size="20" value="<?=$pconfig['wins_server2'];?>" />
</div> </div>
<div class="hidden" for="help_for_wins_server"> <div class="hidden" for="help_for_wins_server">
<?=gettext("Provide a WINS server list to clients"); ?> <?=gettext("Provide a WINS server list to clients"); ?>
...@@ -577,8 +569,8 @@ if ($act!="new" && $act!="edit") { ...@@ -577,8 +569,8 @@ if ($act!="new" && $act!="edit") {
</td> </td>
</tr> </tr>
<tr> <tr>
<td width="22%" valign="top" class="vncell"><a id="help_for_custom_options" href="#" class="showhelp"><i class="fa fa-info-circle"></i></a> <?=gettext("Advanced"); ?></td> <td width="22%"><a id="help_for_custom_options" href="#" class="showhelp"><i class="fa fa-info-circle"></i></a> <?=gettext("Advanced"); ?></td>
<td width="78%" class="vtable"> <td width="78%">
<textarea rows="6" cols="70" name="custom_options" id="custom_options"><?=$pconfig['custom_options'];?></textarea> <textarea rows="6" cols="70" name="custom_options" id="custom_options"><?=$pconfig['custom_options'];?></textarea>
<div class="hidden" for="help_for_custom_options"> <div class="hidden" for="help_for_custom_options">
<?=gettext("Enter any additional options you would like to add for this client specific override, separated by a semicolon"); ?><br /> <?=gettext("Enter any additional options you would like to add for this client specific override, separated by a semicolon"); ?><br />
...@@ -591,58 +583,51 @@ if ($act!="new" && $act!="edit") { ...@@ -591,58 +583,51 @@ if ($act!="new" && $act!="edit") {
<td width="78%"> <td width="78%">
<input name="save" type="submit" class="btn btn-primary" value="<?=gettext("Save"); ?>" /> <input name="save" type="submit" class="btn btn-primary" value="<?=gettext("Save"); ?>" />
<input name="act" type="hidden" value="<?=$act;?>" /> <input name="act" type="hidden" value="<?=$act;?>" />
<?php if (isset($id) && $a_csc[$id]) : <?php
?> if (isset($id) && $a_csc[$id]) :?>
<input name="id" type="hidden" value="<?=htmlspecialchars($id);?>" /> <input name="id" type="hidden" value="<?=htmlspecialchars($id);?>" />
<?php <?php
endif; ?> endif; ?>
</td> </td>
</tr> </tr>
</table> </table>
</div> </div>
</form> </form>
<?php
<?php else :?>
else :
?>
<div class="table-responsive"> <div class="table-responsive">
<table class="table table-striped"> <table class="table table-striped">
<tr> <tr>
<td width="10%" class="listhdrr"><?=gettext("Disabled"); ?></td> <td><?=gettext("Disabled"); ?></td>
<td width="40%" class="listhdrr"><?=gettext("Common Name"); ?></td> <td><?=gettext("Common Name"); ?></td>
<td width="40%" class="listhdrr"><?=gettext("Description"); ?></td> <td><?=gettext("Description"); ?></td>
<td width="10%" class="list"></td> <td></td>
</tr> </tr>
<?php <?php
$i = 0; $i = 0;
foreach ($a_csc as $csc) : foreach ($a_csc as $csc) :
$disabled = "NO"; $disabled = "NO";
if (isset($csc['disable'])) { if (isset($csc['disable'])) {
$disabled = "YES"; $disabled = "YES";
} }?>
?>
<tr ondblclick="document.location='vpn_openvpn_csc.php?act=edit&amp;id=<?=$i;?>'"> <tr ondblclick="document.location='vpn_openvpn_csc.php?act=edit&amp;id=<?=$i;?>'">
<td class="listlr"> <td>
<?=$disabled;?> <?=$disabled;?>
</td> </td>
<td class="listr"> <td>
<?=htmlspecialchars($csc['common_name']);?> <?=htmlspecialchars($csc['common_name']);?>
</td> </td>
<td class="listbg"> <td>
<?=htmlspecialchars($csc['description']);?> <?=htmlspecialchars($csc['description']);?>
</td> </td>
<td valign="middle" class="list nowrap"> <td>
<a href="vpn_openvpn_csc.php?act=edit&amp;id=<?=$i;?>" class="btn btn-default btn-xs"><span class="glyphicon glyphicon-pencil"></span></a> <a href="vpn_openvpn_csc.php?act=edit&amp;id=<?=$i;?>" class="btn btn-default btn-xs"><span class="glyphicon glyphicon-pencil"></span></a>
<a id="del_<?=$i; <a id="del_<?=$i;?>" title="<?=gettext("delete csc"); ?>" class="act_delete btn btn-default btn-xs"><span class="fa fa-trash text-muted"></span></a>
?>" title="<?=gettext("delete csc"); ?>" class="act_delete btn btn-default btn-xs"><span class="fa fa-trash text-muted"></span></a>
</td> </td>
</tr> </tr>
<?php <?php
$i++; $i++;
endforeach; endforeach;?>
?>
<tr> <tr>
<td colspan="4"> <td colspan="4">
<p> <p>
...@@ -652,8 +637,8 @@ else : ...@@ -652,8 +637,8 @@ else :
</tr> </tr>
</table> </table>
</div> </div>
<?php <?php
endif; ?> endif; ?>
</div> </div>
</section> </section>
......
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