Commit cdd948df authored by Ad Schellevis's avatar Ad Schellevis

(legacy) refactor interfaces.php, box all sections

parent 22e41cac
...@@ -345,7 +345,7 @@ if ($_SERVER['REQUEST_METHOD'] === 'GET') { ...@@ -345,7 +345,7 @@ if ($_SERVER['REQUEST_METHOD'] === 'GET') {
$pconfig = array(); $pconfig = array();
$std_copy_fieldnames = array( $std_copy_fieldnames = array(
"if", "descr", "dhcphostname", "alias-address", "alias-subnet", "dhcprejectfrom", "ipaddr", "subnet", "gateway", "if", "descr", "dhcphostname", "alias-address", "alias-subnet", "dhcprejectfrom", "ipaddr", "subnet", "gateway",
"ipaddrv6", "ipaddrv6", "media", "mediaopt",
"adv_dhcp_pt_timeout", "adv_dhcp_pt_retry", "adv_dhcp_pt_select_timeout", "adv_dhcp_pt_reboot", "adv_dhcp_pt_timeout", "adv_dhcp_pt_retry", "adv_dhcp_pt_select_timeout", "adv_dhcp_pt_reboot",
"adv_dhcp_pt_backoff_cutoff", "adv_dhcp_pt_initial_interval", "adv_dhcp_pt_values", "adv_dhcp_pt_backoff_cutoff", "adv_dhcp_pt_initial_interval", "adv_dhcp_pt_values",
"adv_dhcp_send_options", "adv_dhcp_request_options", "adv_dhcp_required_options", "adv_dhcp_option_modifiers", "adv_dhcp_send_options", "adv_dhcp_request_options", "adv_dhcp_required_options", "adv_dhcp_option_modifiers",
...@@ -1095,7 +1095,7 @@ if ($_SERVER['REQUEST_METHOD'] === 'GET') { ...@@ -1095,7 +1095,7 @@ if ($_SERVER['REQUEST_METHOD'] === 'GET') {
if (!empty($pconfig['dhcp6-ia-pd-send-hint'])) { if (!empty($pconfig['dhcp6-ia-pd-send-hint'])) {
$new_config['dhcp6-ia-pd-send-hint'] = true; $new_config['dhcp6-ia-pd-send-hint'] = true;
} }
if (!empty($new_config['dhcp6prefixonly'])) { if (!empty($pconfig['dhcp6prefixonly'])) {
$new_config['dhcp6prefixonly'] = true; $new_config['dhcp6prefixonly'] = true;
} }
if (!empty($pconfig['dhcp6usev4iface'])) { if (!empty($pconfig['dhcp6usev4iface'])) {
...@@ -1645,18 +1645,21 @@ include("head.inc"); ...@@ -1645,18 +1645,21 @@ include("head.inc");
} }
?> ?>
<section class="col-xs-12"> <section class="col-xs-12">
<div class="content-box">
<div class="content-box-main">
<form method="post" name="iform" id="iform"> <form method="post" name="iform" id="iform">
<div class="tab-content content-box col-xs-12 __mb">
<div class="table-responsive"> <div class="table-responsive">
<table class="table table-striped"> <table class="table table-striped">
<thead>
<tr> <tr>
<td width="22%"><strong><?=gettext("General configuration"); ?></strong></td> <td width="22%"><strong><?=gettext("General configuration"); ?></strong></td>
<td width="78%" align="right"> <td width="78%" align="right">
<small><?=gettext("full help"); ?> </small> <small><?=gettext("full help"); ?> </small>
<i class="fa fa-toggle-off text-danger" style="cursor: pointer;" id="show_all_help_page" type="button"></i></a> <i class="fa fa-toggle-off text-danger" style="cursor: pointer;" id="show_all_help_page" type="button"></i></a>
&nbsp;
</td> </td>
</tr> </tr>
</thead>
<tbody>
<tr> <tr>
<td><i class="fa fa-info-circle text-muted"></i> <?=gettext("Enable"); ?></td> <td><i class="fa fa-info-circle text-muted"></i> <?=gettext("Enable"); ?></td>
<td> <td>
...@@ -1664,12 +1667,21 @@ include("head.inc"); ...@@ -1664,12 +1667,21 @@ include("head.inc");
<strong><?=gettext("Enable Interface"); ?></strong> <strong><?=gettext("Enable Interface"); ?></strong>
</td> </td>
</tr> </tr>
</tbody>
</table> </table>
</div> </div>
<div class="table-responsive"> </div>
<div id="allcfg"> <div id="allcfg">
<div class="tab-content content-box col-xs-12 __mb">
<div class="table-responsive">
<!-- Section : All --> <!-- Section : All -->
<table class="table table-striped"> <table class="table table-striped">
<thead>
<tr>
<th colspan="2"><?=gettext("General configuration"); ?></th>
</tr>
</thead>
<tbody>
<tr> <tr>
<td width="22%"><a id="help_for_descr" href="#" class="showhelp"><i class="fa fa-info-circle"></i></a> <?=gettext("Description"); ?></td> <td width="22%"><a id="help_for_descr" href="#" class="showhelp"><i class="fa fa-info-circle"></i></a> <?=gettext("Description"); ?></td>
<td width="78%"> <td width="78%">
...@@ -1757,7 +1769,7 @@ include("head.inc"); ...@@ -1757,7 +1769,7 @@ include("head.inc");
<option value=""><?=gettext('Default (no preference, typically autoselect)');?></option> <option value=""><?=gettext('Default (no preference, typically autoselect)');?></option>
<?php <?php
foreach($mediaopts_list as $mediaopt):?> foreach($mediaopts_list as $mediaopt):?>
<option value="<?=$mediaopt;?>" <?=$mediaopt == $pconfig['mediaopt'] ? "selected=\"selected\"" : "";?> > <option value="<?=$mediaopt;?>" <?=$mediaopt == trim($pconfig['media'] . " ". $pconfig['mediaopt']) ? "selected=\"selected\"" : "";?> >
<?=$mediaopt;?> <?=$mediaopt;?>
</option> </option>
<?php <?php
...@@ -1770,9 +1782,14 @@ include("head.inc"); ...@@ -1770,9 +1782,14 @@ include("head.inc");
</tr> </tr>
<?php <?php
endif;?> endif;?>
</tbody>
</table> </table>
</div>
</div>
<!-- static IPv4 --> <!-- static IPv4 -->
<table id="staticv4" class="table table-striped"> <div class="tab-content content-box col-xs-12 __mb" id="staticv4">
<div class="table-responsive">
<table class="table table-striped">
<thead> <thead>
<tr> <tr>
<th colspan="2"><?=gettext("Static IPv4 configuration"); ?></th> <th colspan="2"><?=gettext("Static IPv4 configuration"); ?></th>
...@@ -1866,8 +1883,12 @@ include("head.inc"); ...@@ -1866,8 +1883,12 @@ include("head.inc");
</tr> </tr>
</tbody> </tbody>
</table> </table>
</div>
</div>
<!-- Section : static IPv6 --> <!-- Section : static IPv6 -->
<table id="staticv6" class="table table-striped"> <div class="tab-content content-box col-xs-12 __mb" id="staticv6">
<div class="table-responsive">
<table class="table table-striped">
<thead> <thead>
<tr> <tr>
<th colspan="2"><?=gettext("Static IPv6 configuration"); ?></th> <th colspan="2"><?=gettext("Static IPv6 configuration"); ?></th>
...@@ -1960,8 +1981,12 @@ include("head.inc"); ...@@ -1960,8 +1981,12 @@ include("head.inc");
</tr> </tr>
</tbody> </tbody>
</table> </table>
</div>
</div>
<!-- Section : dhcp v4 --> <!-- Section : dhcp v4 -->
<table class="table table-striped" id="dhcp"> <div class="tab-content content-box col-xs-12 __mb" id="dhcp">
<div class="table-responsive">
<table class="table table-striped">
<thead> <thead>
<tr> <tr>
<th colspan="2"><?=gettext("DHCP client configuration");?></th> <th colspan="2"><?=gettext("DHCP client configuration");?></th>
...@@ -2018,15 +2043,15 @@ include("head.inc"); ...@@ -2018,15 +2043,15 @@ include("head.inc");
endif; endif;
endfor;?> endfor;?>
</select> </select>
</td>
</tr>
</table>
<div class="hidden" for="help_for_alias_address"> <div class="hidden" for="help_for_alias_address">
<?=gettext("The value in this field is used as a fixed alias IPv4 address by the " . <?=gettext("The value in this field is used as a fixed alias IPv4 address by the " .
"DHCP client."); ?> "DHCP client."); ?>
</div> </div>
</td> </td>
</tr> </tr>
</table>
</td>
</tr>
<tr class="dhcp_basic"> <tr class="dhcp_basic">
<td><a id="help_for_dhcprejectfrom" href="#" class="showhelp"><i class="fa fa-info-circle"></i></a> <?=gettext("Reject Leases From"); ?></td> <td><a id="help_for_dhcprejectfrom" href="#" class="showhelp"><i class="fa fa-info-circle"></i></a> <?=gettext("Reject Leases From"); ?></td>
<td> <td>
...@@ -2124,8 +2149,12 @@ include("head.inc"); ...@@ -2124,8 +2149,12 @@ include("head.inc");
</tr> </tr>
</tbody> </tbody>
</table> </table>
</div>
</div>
<!-- Section : dhcp v6 --> <!-- Section : dhcp v6 -->
<table class="table table-striped" id="dhcp6"> <div class="tab-content content-box col-xs-12 __mb" id="dhcp6">
<div class="table-responsive">
<table class="table table-striped">
<thead> <thead>
<tr> <tr>
<th colspan="2"><?=gettext("DHCPv6 client configuration");?></th> <th colspan="2"><?=gettext("DHCPv6 client configuration");?></th>
...@@ -2144,7 +2173,7 @@ include("head.inc"); ...@@ -2144,7 +2173,7 @@ include("head.inc");
<input name="adv_dhcp6_config_advanced" type="radio" value="advanced" <?=!empty($pconfig['adv_dhcp6_config_advanced']) ? "checked=\"\"" : "";?>/> <input name="adv_dhcp6_config_advanced" type="radio" value="advanced" <?=!empty($pconfig['adv_dhcp6_config_advanced']) ? "checked=\"\"" : "";?>/>
<?=gettext("Advanced");?> <?=gettext("Advanced");?>
</label> </label>
<label class="btn btn-default <?=!empty($pconfig['adv_dhcp_config_file_override']) ? "active" : "";?>"> <label class="btn btn-default <?=!empty($pconfig['adv_dhcp6_config_file_override']) ? "active" : "";?>">
<input name="adv_dhcp6_config_file_override" type="radio" value="file" <?=!empty($pconfig['adv_dhcp6_config_file_override']) ? "checked=\"\"" : "";?> /> <input name="adv_dhcp6_config_file_override" type="radio" value="file" <?=!empty($pconfig['adv_dhcp6_config_file_override']) ? "checked=\"\"" : "";?> />
<?=gettext("Config File Override");?> <?=gettext("Config File Override");?>
</label> </label>
...@@ -2312,7 +2341,7 @@ include("head.inc"); ...@@ -2312,7 +2341,7 @@ include("head.inc");
</td> </td>
</tr> </tr>
<tr class="dhcpv6_file_override"> <tr class="dhcpv6_file_override">
<td><a id="help_for_adv_dhcp6_config_file_override_path" href="#" class="showhelp"><i class="fa fa-info-circle"></i> <?=gettext("Configuration File Override");?></a></td> <td><a id="help_for_adv_dhcp6_config_file_override_path" href="#" class="showhelp"><i class="fa fa-info-circle"></i></a> <?=gettext("Configuration File Override");?></td>
<td> <td>
<input name="adv_dhcp6_config_file_override_path" type="text" id="adv_dhcp6_config_file_override_path" value="<?=$pconfig['adv_dhcp6_config_file_override_path'];?>" /> <input name="adv_dhcp6_config_file_override_path" type="text" id="adv_dhcp6_config_file_override_path" value="<?=$pconfig['adv_dhcp6_config_file_override_path'];?>" />
<div class="hidden" for="help_for_adv_dhcp6_config_file_override_path"> <div class="hidden" for="help_for_adv_dhcp6_config_file_override_path">
...@@ -2325,8 +2354,12 @@ include("head.inc"); ...@@ -2325,8 +2354,12 @@ include("head.inc");
</tr> </tr>
</tbody> </tbody>
</table> </table>
</div>
</div>
<!-- Section : 6RD--> <!-- Section : 6RD-->
<table class="table table-striped" id="6rd"> <div class="tab-content content-box col-xs-12 __mb" id="6rd">
<div class="table-responsive">
<table class="table table-striped">
<thead> <thead>
<tr> <tr>
<th colspan="2"><?=gettext("6RD Rapid Deployment"); ?></th> <th colspan="2"><?=gettext("6RD Rapid Deployment"); ?></th>
...@@ -2371,8 +2404,12 @@ include("head.inc"); ...@@ -2371,8 +2404,12 @@ include("head.inc");
</tr> </tr>
</tbody> </tbody>
</table> </table>
</div>
</div>
<!-- Section : Track 6 --> <!-- Section : Track 6 -->
<table class="table table-striped" id="track6"> <div class="tab-content content-box col-xs-12 __mb" id="track6">
<div class="table-responsive">
<table class="table table-striped">
<thead> <thead>
<tr> <tr>
<th colspan="2"><?=gettext("Track IPv6 Interface"); ?></th> <th colspan="2"><?=gettext("Track IPv6 Interface"); ?></th>
...@@ -2420,8 +2457,12 @@ include("head.inc"); ...@@ -2420,8 +2457,12 @@ include("head.inc");
</tr> </tr>
</tbody> </tbody>
</table> </table>
</div>
</div>
<!-- Section : PPP --> <!-- Section : PPP -->
<table class="table table-striped" id="ppp"> <div class="tab-content content-box col-xs-12 __mb" id="ppp">
<div class="table-responsive">
<table class="table table-striped">
<thead> <thead>
<tr> <tr>
<th colspan="2"><?=gettext("PPP configuration"); ?></th> <th colspan="2"><?=gettext("PPP configuration"); ?></th>
...@@ -2522,8 +2563,12 @@ include("head.inc"); ...@@ -2522,8 +2563,12 @@ include("head.inc");
</tr> </tr>
</tbody> </tbody>
</table> </table>
</div>
</div>
<!-- Section : PPPOE --> <!-- Section : PPPOE -->
<table class="table table-striped" id="pppoe"> <div class="tab-content content-box col-xs-12 __mb" id="pppoe">
<div class="table-responsive">
<table class="table table-striped">
<thead> <thead>
<tr> <tr>
<th colspan="2"><?=gettext("PPPoE configuration"); ?></th> <th colspan="2"><?=gettext("PPPoE configuration"); ?></th>
...@@ -2656,8 +2701,12 @@ include("head.inc"); ...@@ -2656,8 +2701,12 @@ include("head.inc");
</tr> </tr>
</tbody> </tbody>
</table> </table>
</div>
</div>
<!-- Section : PPTP / L2TP --> <!-- Section : PPTP / L2TP -->
<table class="table table-striped" id="pptp"> <div class="tab-content content-box col-xs-12 __mb" id="pptp">
<div class="table-responsive">
<table class="table table-striped">
<thead> <thead>
<tr> <tr>
<th colspan="2"><?=gettext("PPTP/L2TP configuration"); ?></th> <th colspan="2"><?=gettext("PPTP/L2TP configuration"); ?></th>
...@@ -2735,13 +2784,14 @@ include("head.inc"); ...@@ -2735,13 +2784,14 @@ include("head.inc");
</tr> </tr>
</tbody> </tbody>
</table> </table>
</div>
</div>
<?php <?php
/* Wireless interface? */ /* Wireless interface? */
if (isset($a_interfaces[$if]['wireless'])):?> if (isset($a_interfaces[$if]['wireless'])):?>
<!-- Section : Wireless --> <!-- Section : Wireless -->
<div class="tab-content content-box col-xs-12 __mb">
<div class="table-responsive">
<table class="table table-striped"> <table class="table table-striped">
<thead> <thead>
<tr> <tr>
...@@ -3249,9 +3299,13 @@ include("head.inc"); ...@@ -3249,9 +3299,13 @@ include("head.inc");
</tr> </tr>
</tbody> </tbody>
</table> </table>
</div>
</div>
<?php <?php
endif; ?> endif; ?>
<!-- Section : Private networks --> <!-- Section : Private networks -->
<div class="tab-content content-box col-xs-12 __mb">
<div class="table-responsive">
<table class="table table-striped"> <table class="table table-striped">
<thead> <thead>
<tr> <tr>
...@@ -3287,11 +3341,14 @@ include("head.inc"); ...@@ -3287,11 +3341,14 @@ include("head.inc");
</td> </td>
</tr> </tr>
</table> </table>
</div>
</div>
<!-- End "allcfg" div --> <!-- End "allcfg" div -->
</div> </div>
<div> <div class="tab-content content-box col-xs-12 __mb">
<div class="table-responsive">
<table class="table table-striped"> <table class="table table-striped">
<tr> <tr>
<td width="22%"></td> <td width="22%"></td>
...@@ -3308,7 +3365,7 @@ include("head.inc"); ...@@ -3308,7 +3365,7 @@ include("head.inc");
</td> </td>
</tr> </tr>
</table> </table>
<div> </div>
</div> </div>
</form> </form>
</div> </div>
......
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