Commit 1ed6b998 authored by Franco Fichtner's avatar Franco Fichtner

interfaces: assorted UI tweaks and corrections

parent 331d5a8f
...@@ -162,7 +162,7 @@ $main_buttons = array( ...@@ -162,7 +162,7 @@ $main_buttons = array(
$i++; $i++;
endforeach; ?> endforeach; ?>
<tr> <tr>
<td colspan="4"> <td colspan="5">
<?= gettext("Not all drivers/NICs support 802.1Q QinQ tagging properly. On cards that do not explicitly support it, QinQ tagging will still work, but the reduced MTU may cause problems.");?> <?= gettext("Not all drivers/NICs support 802.1Q QinQ tagging properly. On cards that do not explicitly support it, QinQ tagging will still work, but the reduced MTU may cause problems.");?>
</td> </td>
</tr> </tr>
......
...@@ -40,8 +40,8 @@ if (!isset($config['qinqs']['qinqentry']) || !is_array($config['qinqs']['qinqent ...@@ -40,8 +40,8 @@ if (!isset($config['qinqs']['qinqentry']) || !is_array($config['qinqs']['qinqent
$a_qinqs = &$config['qinqs']['qinqentry']; $a_qinqs = &$config['qinqs']['qinqentry'];
if ($_SERVER['REQUEST_METHOD'] === 'GET') { if ($_SERVER['REQUEST_METHOD'] === 'GET') {
// read form data $id = 0;
if (!empty($a_qinqs[$_GET['id']])) { if (isset($_GET['id']) && !empty($a_qinqs[$_GET['id']])) {
$id = $_GET['id']; $id = $_GET['id'];
} }
$pconfig['if'] = isset($a_qinqs[$id]['if']) ? $a_qinqs[$id]['if'] : null; $pconfig['if'] = isset($a_qinqs[$id]['if']) ? $a_qinqs[$id]['if'] : null;
...@@ -50,7 +50,7 @@ if ($_SERVER['REQUEST_METHOD'] === 'GET') { ...@@ -50,7 +50,7 @@ if ($_SERVER['REQUEST_METHOD'] === 'GET') {
$pconfig['descr'] = isset($a_qinqs[$id]['descr']) ? $a_qinqs[$id]['descr'] : null; $pconfig['descr'] = isset($a_qinqs[$id]['descr']) ? $a_qinqs[$id]['descr'] : null;
} elseif ($_SERVER['REQUEST_METHOD'] === 'POST') { } elseif ($_SERVER['REQUEST_METHOD'] === 'POST') {
// validate / save form data // validate / save form data
if (!empty($a_qinqs[$_POST['id']])) { if (isset($_POST['id']) && !empty($a_qinqs[$_POST['id']])) {
$id = $_POST['id']; $id = $_POST['id'];
} }
$input_errors = array(); $input_errors = array();
...@@ -72,7 +72,7 @@ if ($_SERVER['REQUEST_METHOD'] === 'GET') { ...@@ -72,7 +72,7 @@ if ($_SERVER['REQUEST_METHOD'] === 'GET') {
$input_errors[] = gettext("QinQ level already exists for this interface, edit it!"); $input_errors[] = gettext("QinQ level already exists for this interface, edit it!");
} }
} }
if (is_array($config['vlans']['vlan'])) { if (isset($config['vlans']['vlan'])) {
foreach ($config['vlans']['vlan'] as $vlan) { foreach ($config['vlans']['vlan'] as $vlan) {
if ($vlan['tag'] == $pconfig['tag'] && $vlan['if'] == $pconfig['if']) { if ($vlan['tag'] == $pconfig['tag'] && $vlan['if'] == $pconfig['if']) {
$input_errors[] = gettext("A normal VLAN exists with this tag please remove it to use this tag for QinQ first level."); $input_errors[] = gettext("A normal VLAN exists with this tag please remove it to use this tag for QinQ first level.");
...@@ -214,7 +214,7 @@ include("head.inc"); ...@@ -214,7 +214,7 @@ include("head.inc");
<td> <td>
<input name="submit" type="submit" class="btn btn-primary" value="<?=gettext("Save");?>" /> <input name="submit" type="submit" class="btn btn-primary" value="<?=gettext("Save");?>" />
<input type="button" class="btn btn-default" value="<?=gettext("Cancel");?>" onclick="window.location.href='<?=(isset($_SERVER['HTTP_REFERER']) ? $_SERVER['HTTP_REFERER'] : '/interfaces_qinq.php');?>'" /> <input type="button" class="btn btn-default" value="<?=gettext("Cancel");?>" onclick="window.location.href='<?=(isset($_SERVER['HTTP_REFERER']) ? $_SERVER['HTTP_REFERER'] : '/interfaces_qinq.php');?>'" />
<?php if (isset($id) && $a_qinqs[$id]): ?> <?php if (isset($id) && isset($a_qinqs[$id])): ?>
<input name="id" type="hidden" value="<?=$id;?>" /> <input name="id" type="hidden" value="<?=$id;?>" />
<?php endif; ?> <?php endif; ?>
</td> </td>
......
...@@ -140,9 +140,7 @@ include("head.inc"); ...@@ -140,9 +140,7 @@ include("head.inc");
<div class="row"> <div class="row">
<?php if (isset($input_errors) && count($input_errors) > 0) print_input_errors($input_errors); ?> <?php if (isset($input_errors) && count($input_errors) > 0) print_input_errors($input_errors); ?>
<section class="col-xs-12"> <section class="col-xs-12">
<div class="content-box"> <div class="content-box tab-content">
<div class="content-box-main">
<div class="table-responsive">
<form method="post" name="iform" id="iform"> <form method="post" name="iform" id="iform">
<table class="table table-striped"> <table class="table table-striped">
<thead> <thead>
...@@ -200,8 +198,6 @@ include("head.inc"); ...@@ -200,8 +198,6 @@ include("head.inc");
</table> </table>
</form> </form>
</div> </div>
</div>
</div>
</section> </section>
</div> </div>
</div> </div>
......
...@@ -474,11 +474,11 @@ include("head.inc"); ...@@ -474,11 +474,11 @@ include("head.inc");
<table class="table table-striped"> <table class="table table-striped">
<tr> <tr>
<td> <td>
<?php printf(gettext("Using dial-on-demand will bring the connection up again if any packet ". <?= gettext("Using dial-on-demand will bring the connection up again if any packet ".
"triggers it. To substantiate this point: disconnecting manually ". "triggers it. To substantiate this point: disconnecting manually ".
"will %snot%s prevent dial-on-demand from making connections ". "will not prevent dial-on-demand from making connections ".
"to the outside! Don't use dial-on-demand if you want to make sure that the line ". "to the outside. Don't use dial-on-demand if you want to make sure that the line ".
"is kept disconnected."),'<strong>','</strong>')?> "is kept disconnected.") ?>
</td> </td>
</tr> </tr>
</table> </table>
......
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