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(
$i++;
endforeach; ?>
<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.");?>
</td>
</tr>
......
......@@ -40,8 +40,8 @@ if (!isset($config['qinqs']['qinqentry']) || !is_array($config['qinqs']['qinqent
$a_qinqs = &$config['qinqs']['qinqentry'];
if ($_SERVER['REQUEST_METHOD'] === 'GET') {
// read form data
if (!empty($a_qinqs[$_GET['id']])) {
$id = 0;
if (isset($_GET['id']) && !empty($a_qinqs[$_GET['id']])) {
$id = $_GET['id'];
}
$pconfig['if'] = isset($a_qinqs[$id]['if']) ? $a_qinqs[$id]['if'] : null;
......@@ -50,7 +50,7 @@ if ($_SERVER['REQUEST_METHOD'] === 'GET') {
$pconfig['descr'] = isset($a_qinqs[$id]['descr']) ? $a_qinqs[$id]['descr'] : null;
} elseif ($_SERVER['REQUEST_METHOD'] === 'POST') {
// validate / save form data
if (!empty($a_qinqs[$_POST['id']])) {
if (isset($_POST['id']) && !empty($a_qinqs[$_POST['id']])) {
$id = $_POST['id'];
}
$input_errors = array();
......@@ -72,7 +72,7 @@ if ($_SERVER['REQUEST_METHOD'] === 'GET') {
$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) {
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.");
......@@ -214,7 +214,7 @@ include("head.inc");
<td>
<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');?>'" />
<?php if (isset($id) && $a_qinqs[$id]): ?>
<?php if (isset($id) && isset($a_qinqs[$id])): ?>
<input name="id" type="hidden" value="<?=$id;?>" />
<?php endif; ?>
</td>
......
......@@ -140,9 +140,7 @@ include("head.inc");
<div class="row">
<?php if (isset($input_errors) && count($input_errors) > 0) print_input_errors($input_errors); ?>
<section class="col-xs-12">
<div class="content-box">
<div class="content-box-main">
<div class="table-responsive">
<div class="content-box tab-content">
<form method="post" name="iform" id="iform">
<table class="table table-striped">
<thead>
......@@ -200,8 +198,6 @@ include("head.inc");
</table>
</form>
</div>
</div>
</div>
</section>
</div>
</div>
......
......@@ -474,11 +474,11 @@ include("head.inc");
<table class="table table-striped">
<tr>
<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 ".
"will %snot%s 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 ".
"is kept disconnected."),'<strong>','</strong>')?>
"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 ".
"is kept disconnected.") ?>
</td>
</tr>
</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