Commit 4156a728 authored by Jos Schellevis's avatar Jos Schellevis

html updates and fixes

parent fcc15584
......@@ -179,10 +179,8 @@ $main_buttons = array(
<div class="tab-content content-box col-xs-12">
<form action="firewall_aliases.php" method="post" name="iform" id="iform">
<input type="hidden" name="tab" value="<?=htmlspecialchars($tab);?>" />
<form action="firewall_aliases.php" method="post" name="iform" id="iform">
<input type="hidden" name="tab" value="<?=htmlspecialchars($tab);?>" />
<div class="table-responsive">
<table class="table table-striped table-sort">
......@@ -190,9 +188,7 @@ $main_buttons = array(
<td width="20%" class="listhdrr"><?=gettext("Name"); ?></td>
<td width="43%" class="listhdrr"><?=gettext("Values"); ?></td>
<td width="30%" class="listhdr"><?=gettext("Description"); ?></td>
<td width="7%" class="list">
</td>
<td width="7%" class="list"></td>
</tr>
<?php
asort($a_aliases);
......@@ -268,9 +264,9 @@ $main_buttons = array(
</table>
</div>
<div class="container-fluid">
<p><span class="vexpl"><span class="text-danger"><strong><?=gettext("Note:"); ?><br /></strong></span></span></p><div style="overflow:hidden; text-align:justify;"><p><span class="vexpl"><?=gettext("Aliases act as placeholders for real hosts, networks or ports. They can be used to minimize the number of changes that have to be made if a host, network or port changes. You can enter the name of an alias instead of the host, network or port in all fields that have a red background. The alias will be resolved according to the list above. If an alias cannot be resolved (e.g. because you deleted it), the corresponding element (e.g. filter/NAT/shaper rule) will be considered invalid and skipped."); ?></span></p>
<p><span class="vexpl"><span class="text-danger"><strong><?=gettext("Note:"); ?><br /></strong></span></span></p><div style="overflow:hidden; text-align:justify;"><p><span class="vexpl"><?=gettext("Aliases act as placeholders for real hosts, networks or ports. They can be used to minimize the number of changes that have to be made if a host, network or port changes. You can enter the name of an alias instead of the host, network or port in all fields that have a red background. The alias will be resolved according to the list above. If an alias cannot be resolved (e.g. because you deleted it), the corresponding element (e.g. filter/NAT/shaper rule) will be considered invalid and skipped."); ?></span></p></div>
</div>
</form>
</form>
</div>
</section>
</div>
......
......@@ -163,31 +163,30 @@ $main_buttons = array(
?>
<script type="text/javascript" src="/themes/<?=$g['theme'];?>/assets/javascripts/jquery-sortable.js"></script>
<style type="text/css">
body.dragging, body.dragging * {
cursor: move !important;
}
<body>
.dragged {
position: absolute;
opacity: 0.5;
z-index: 2000;
}
<script type="text/javascript" src="/themes/<?=$g['theme'];?>/assets/javascripts/jquery-sortable.js"></script>
<style type="text/css">
body.dragging, body.dragging * {
cursor: move !important;
}
ol.example li.placeholder {
position: relative;
/** More li styles **/
}
ol.example li.placeholder:before {
position: absolute;
/** Define arrowhead **/
}
</style>
</head>
.dragged {
position: absolute;
opacity: 0.5;
z-index: 2000;
}
ol.example li.placeholder {
position: relative;
/** More li styles **/
}
ol.example li.placeholder:before {
position: absolute;
/** Define arrowhead **/
}
</style>
<body>
<?php include("fbegin.inc"); ?>
......@@ -345,26 +344,25 @@ $main_buttons = array(
<a href="firewall_nat_edit.php?dup=<?=$i;?>" class="btn btn-default btn-xs"><span class="glyphicon glyphicon-plus"></span></a></td>
</tr>
<?php $i++; $nnats++; endforeach; ?>
<tr>
<?php $i++; $nnats++; endforeach; ?>
<tr>
<td class="list" colspan="8"></td>
<td>&nbsp;</td>
<td>&nbsp;</td>
<td>&nbsp;</td>
<td class="list nowrap" valign="middle">
<?php if ($nnats == 0): ?><span class="btn btn-default btn-xs text-muted"><span class="glyphicon glyphicon-arrow-left"></span></span><?php else: ?><button name="move_<?=$i;?>_x" value="<?=$i;?>" type="submit" title="<?=gettext("move selected rules to end");?>" class="btn btn-default btn-xs"><span class="glyphicon glyphicon-arrow-left"></span></button><?php endif; ?>
<?php if ($nnats == 0): ?><span class="btn btn-default btn-xs text-muted"><span class="glyphicon glyphicon-arrow-left"></span></span><?php else: ?><button name="move_<?=$i;?>_x" value="<?=$i;?>" type="submit" title="<?=gettext("move selected rules to end");?>" class="btn btn-default btn-xs"><span class="glyphicon glyphicon-arrow-left"></span></button><?php endif; ?>
<?php if (count($a_nat) == 0): ?>
<?php if (count($a_nat) == 0): ?>
<span class="btn btn-default btn-xs text-muted" title="<?=gettext("delete selected rules");?>"><span class="glyphicon glyphicon-remove" ></span></span>
<?php else: ?>
<button name="del_<?=$i;?>_x" type="submit" title="<?=gettext("delete selected rules"); ?>" onclick="return confirm('<?=gettext("Do you really want to delete the selected rules?");?>')" class="btn btn-default btn-xs"><span class="glyphicon glyphicon-remove"></span></button>
<?php endif; ?>
<a href="firewall_nat_edit.php" class="btn btn-default btn-xs"><span class="glyphicon glyphicon-plus"></span></a></td>
</td>
</tr>
<span class="btn btn-default btn-xs text-muted" title="<?=gettext("delete selected rules");?>"><span class="glyphicon glyphicon-remove" ></span></span>
<?php else: ?>
<button name="del_<?=$i;?>_x" type="submit" title="<?=gettext("delete selected rules"); ?>" onclick="return confirm('<?=gettext("Do you really want to delete the selected rules?");?>')" class="btn btn-default btn-xs"><span class="glyphicon glyphicon-remove"></span></button>
<?php endif; ?>
<a href="firewall_nat_edit.php" class="btn btn-default btn-xs"><span class="glyphicon glyphicon-plus"></span></a>
</td>
</tr>
</tbody>
<tfoot>
<tr><td colspan="12">&nbsp;</td></tr>
......
......@@ -209,10 +209,13 @@ if (is_array($layer7_rules_list)) {
$tree .= "</ul>";
$output = "<table summary=\"output form\">";
$output .= $output_form;
$output .= $output_form."</table>";
$closehead = false;
include("head.inc");
?>
<body>
<link rel="stylesheet" type="text/css" media="all" href="./tree/tree.css" />
<script type="text/javascript" src="./tree/tree.js"></script>
......@@ -374,9 +377,6 @@ function removeRow(tbl,row) {
}
//]]>
</script>
</head>
<body>
<?
......@@ -403,7 +403,7 @@ include("fbegin.inc");
<section class="col-xs-12">
<?php
<?php
$tab_array = array();
$tab_array[0] = array(gettext("By Interface"), false, "firewall_shaper.php");
$tab_array[1] = array(gettext("By Queue"), false, "firewall_shaper_queues.php");
......@@ -416,173 +416,174 @@ include("fbegin.inc");
<div class="tab-content content-box col-xs-12">
<form action="firewall_shaper_layer7.php" method="post" name="iform" id="iform">
<form action="firewall_shaper_layer7.php" method="post" name="iform" id="iform">
<div class="table-responsive">
<table class="table table-striped table-sort">
<?php if (count($layer7_rules_list) > 0): ?>
<tr class="tabcont"><td width="25%" align="left">
</td><td width="75%"> </td></tr>
<?php if (count($layer7_rules_list) > 0): ?>
<tr class="tabcont">
<td width="25%" align="left"></td><td width="75%"> </td>
</tr>
<?php endif; ?>
<?php endif; ?>
<tr>
<td width="25%" valign="top" align="left">
<?php
echo $tree;
?>
</td>
<td width="75%" valign="top" align="center">
<div id="shaperarea" style="position:relative">
<?php
echo $output;
?>
<td width="25%" valign="top" align="left">
<?php
echo $tree;
?>
</td>
<td width="75%" valign="top" align="center">
<div id="shaperarea" style="position:relative">
<?php
echo $output;
?>
</td>
</tr>
<!-- Layer 7 rules form -->
<?php if($show_proto_form): ?>
<tr><td width="22%" valign="top" class="vncellreq">
<tr>
<td width="22%" valign="top" class="vncellreq">
<div id="addressnetworkport">
<?=gettext("Rule(s)"); ?>
</div>
</td>
<td width="78%" class="vtable">
<table width="236" id="maintable" summary="main table">
<tbody>
<tr>
<td colspan="4">
<div style="font-size: 8pt; padding:5px; margin-top: 16px; margin-bottom: 16px; border:1px dashed #000066;"
id="itemhelp">
<?=gettext("Add one or more rules"); ?>
</div>
</td>
</tr>
<tr>
<td>
<div style="font-size: 8pt; padding:5px;"
id="onecolumn">
<?=gettext("Protocol"); ?>
</div>
</td>
<td>
<div style="font-size: 8pt; padding:5px;"
id="twocolumn">
<?=gettext("Structure"); ?>
</div>
</td>
<td>
<div style="font-size: 8pt; padding:5px;"
id="threecolumn">
<?=gettext("Behaviour"); ?>
</div>
</td>
</tr>
<!-- PHP Code to generate the existing rules -->
<?php
if($container) {
foreach($container->rsets as $l7rule) {
?>
<tr>
<td>
<select name="protocol[]" class="formselect" style="font-size:8pt">
<?php foreach($avail_protos as $proto): ?>
<option value="<?=$proto;?>" <?php if ($proto == $l7rule->GetRProtocol()) echo "selected=\"selected\""; ?>><?=$proto;?></option>
<?php endforeach; ?>
</select>
</td>
<td>
<select name="structure[]" class="formselect" style="font-size:8pt" onchange="changeBehaviourValues(this.parentNode.parentNode);">
<?php foreach($avail_structures as $struct) {
if($struct == "queue") {
if(!empty($avail_behaviours_altq)) { ?>
<option value="<?=$struct ?>" <?php if ($struct == $l7rule->GetRStructure()) echo "selected=\"selected\""; ?>><?=$struct;?></option>
<?php }
}
else {
if($struct == "limiter") {
if(!empty($avail_behaviours_limiter)) { ?>
<option value="<?=$struct ?>" <?php if ($struct == $l7rule->GetRStructure()) echo "selected=\"selected\""; ?>><?=$struct;?></option>
<?php }
}
else {
if($struct == "action") { ?>
<option value="<?=$struct ?>" <?php if ($struct == $l7rule->GetRStructure()) echo "selected=\"selected\""; ?>><?=$struct;?></option>
<?php }
}
}
} ?>
</select>
</td>
<td>
<select name="behaviour[]" class="formselect" style="width:80px; font-size:8pt">
<?php if($l7rule->GetRStructure() == "action"): ?>
<?php foreach($avail_behaviours_action as $behaviour): ?>
<option value="<?=$behaviour ?>" <?php if ($behaviour == $l7rule->GetRBehaviour()) echo "selected=\"selected\""; ?>><?=$behaviour;?></option>
<?php endforeach; ?>
</select>
<?php endif; ?>
<?php if($l7rule->GetRStructure() == "queue"): ?>
<?php foreach($avail_behaviours_altq as $behaviour): ?>
<option value="<?=$behaviour ?>" <?php if ($behaviour == $l7rule->GetRBehaviour()) echo "selected=\"selected\""; ?>><?=$behaviour;?></option>
<?php endforeach; ?>
</select>
<?php endif; ?>
<?php if($l7rule->GetRStructure() == "limiter"): ?>
<?php foreach($avail_behaviours_limiter as $behaviour): ?>
<option value="<?=$behaviour ?>" <?php if ($behaviour == $l7rule->GetRBehaviour()) echo "selected=\"selected\""; ?>><?=$behaviour;?></option>
<?php endforeach; ?>
</select>
<?php endif; ?>
</td>
<td>
<a onclick="removeRow('maintable',this.parentNode.parentNode); return false;" href="#" class="btn btn-default btn-xs"><span class="glyphicon glyphicon-remove"></span></a>
</td>
</tr>
<?php
} //end foreach
} //end if
?>
</tbody>
</table>
<a onclick="javascript:addRow('maintable'); return false;" href="#" class="btn btn-default btn-xs"><span class="glyphicon glyphicon-plus"></span></a><br/><br/>
</td>
</td>
<td width="78%" class="vtable">
<table width="236" id="maintable" summary="main table">
<tbody>
<tr>
<td colspan="4">
<div style="font-size: 8pt; padding:5px; margin-top: 16px; margin-bottom: 16px; border:1px dashed #000066;"
id="itemhelp">
<?=gettext("Add one or more rules"); ?>
</div>
</td>
</tr>
<tr>
<td>
<div style="font-size: 8pt; padding:5px;"
id="onecolumn">
<?=gettext("Protocol"); ?>
</div>
</td>
<td>
<div style="font-size: 8pt; padding:5px;"
id="twocolumn">
<?=gettext("Structure"); ?>
</div>
</td>
<td>
<div style="font-size: 8pt; padding:5px;"
id="threecolumn">
<?=gettext("Behaviour"); ?>
</div>
</td>
<td></td>
</tr>
<!-- PHP Code to generate the existing rules -->
<?php
if($container) {
foreach($container->rsets as $l7rule) {
?>
<tr>
<td>
<select name="protocol[]" class="formselect" style="font-size:8pt">
<?php foreach($avail_protos as $proto): ?>
<option value="<?=$proto;?>" <?php if ($proto == $l7rule->GetRProtocol()) echo "selected=\"selected\""; ?>><?=$proto;?></option>
<?php endforeach; ?>
</select>
</td>
<td>
<select name="structure[]" class="formselect" style="font-size:8pt" onchange="changeBehaviourValues(this.parentNode.parentNode);">
<?php foreach($avail_structures as $struct) {
if($struct == "queue") {
if(!empty($avail_behaviours_altq)) { ?>
<option value="<?=$struct ?>" <?php if ($struct == $l7rule->GetRStructure()) echo "selected=\"selected\""; ?>><?=$struct;?></option>
<?php }
}
else {
if($struct == "limiter") {
if(!empty($avail_behaviours_limiter)) { ?>
<option value="<?=$struct ?>" <?php if ($struct == $l7rule->GetRStructure()) echo "selected=\"selected\""; ?>><?=$struct;?></option>
<?php }
}
else {
if($struct == "action") { ?>
<option value="<?=$struct ?>" <?php if ($struct == $l7rule->GetRStructure()) echo "selected=\"selected\""; ?>><?=$struct;?></option>
<?php }
}
}
} ?>
</select>
</td>
<td>
<select name="behaviour[]" class="formselect" style="width:80px; font-size:8pt">
<?php if($l7rule->GetRStructure() == "action"): ?>
<?php foreach($avail_behaviours_action as $behaviour): ?>
<option value="<?=$behaviour ?>" <?php if ($behaviour == $l7rule->GetRBehaviour()) echo "selected=\"selected\""; ?>><?=$behaviour;?></option>
<?php endforeach; ?>
</select>
<?php endif; ?>
<?php if($l7rule->GetRStructure() == "queue"): ?>
<?php foreach($avail_behaviours_altq as $behaviour): ?>
<option value="<?=$behaviour ?>" <?php if ($behaviour == $l7rule->GetRBehaviour()) echo "selected=\"selected\""; ?>><?=$behaviour;?></option>
<?php endforeach; ?>
</select>
<?php endif; ?>
<?php if($l7rule->GetRStructure() == "limiter"): ?>
<?php foreach($avail_behaviours_limiter as $behaviour): ?>
<option value="<?=$behaviour ?>" <?php if ($behaviour == $l7rule->GetRBehaviour()) echo "selected=\"selected\""; ?>><?=$behaviour;?></option>
<?php endforeach; ?>
</select>
<?php endif; ?>
</td>
<td>
<a onclick="removeRow('maintable',this.parentNode.parentNode); return false;" href="#" class="btn btn-default btn-xs"><span class="glyphicon glyphicon-remove"></span></a>
</td>
</tr>
<?php
} //end foreach
} //end if
?>
</tbody>
</table>
<a onclick="javascript:addRow('maintable'); return false;" href="#" class="btn btn-default btn-xs"><span class="glyphicon glyphicon-plus"></span></a><br/><br/>
</td>
</tr>
<tr>
<td width="22%" valign="top">
&nbsp;
</td>
<td width="78%">
<input id="submit" name="submit" type="submit" class="btn btn-primary" value="<?=gettext("Save"); ?>" />
<a href="firewall_shaper_layer7.php">
<input id="cancelbutton" name="cancelbutton" type="button" class="btn btn-default" value="<?=gettext("Cancel"); ?>" />
<?php if($container): ?>
<input id="delete" type="submit" class="formbtn" name="delete" value="<?=gettext("Delete"); ?>" />
<?php endif ?>
</a>
</td>
</tr>
<tr>
<td width="22%" valign="top">&nbsp;</td>
<td width="78%">
<input id="submit" name="submit" type="submit" class="btn btn-primary" value="<?=gettext("Save"); ?>" />
<a href="firewall_shaper_layer7.php">
<input id="cancelbutton" name="cancelbutton" type="button" class="btn btn-default" value="<?=gettext("Cancel"); ?>" />
</a>
<?php if($container): ?>
<a href="firewall_shaper_layer7.php">
<input id="delete" onclick="return confirm('Are you sure you want to delete?')" type="submit" class="btn btn-default formbtn" name="delete" value="<?=gettext("Delete"); ?>" />
</a>
<?php endif ?>
</td>
</tr>
<?php endif; ?>
<!-- End of layer7 rules form -->
</table>
</div><!-- end of div:shape area -->
</form>
</div>
</section>
</div>
</div>
</table>
</div><!-- end of div:shape area -->
</form>
</div>
</section>
</div>
</div>
</section>
<?php include("foot.inc"); ?>
......@@ -162,11 +162,12 @@ $shortcut_section = "trafficshaper";
$closehead = false;
include("head.inc");
?>
<body>
<link rel="stylesheet" type="text/css" media="all" href="./tree/tree.css" />
<script type="text/javascript" src="./tree/tree.js"></script>
</head>
<body>
<?php include("fbegin.inc"); ?>
......
......@@ -337,6 +337,9 @@ $output .= $output_form;
$closehead = false;
include("head.inc");
?>
<body>
<link rel="stylesheet" type="text/css" media="all" href="./tree/tree.css" />
<script type="text/javascript" src="./tree/tree.js"></script>
<script type="text/javascript">
......@@ -351,9 +354,6 @@ function show_source_port_range() {
}
//]]>
</script>
</head>
<body>
<?php
if ($queue)
......
......@@ -720,10 +720,15 @@ include("head.inc");
$tabscounter++;
}
if ($tabscounter == 0) {
echo "</td></tr></table></form>";
include("fend.inc");
echo "</body>";
echo "</html>";
//echo "</td></tr></table></form>";
//include("fend.inc");
//echo "</body>";
//echo "</html>";
echo "</section>";
echo "</div>";
echo "</div>";
echo "</section>";
include("foot.inc");
exit;
}
display_top_tabs($tab_array);
......@@ -1152,7 +1157,6 @@ include("head.inc");
</tbody>
</table>
<a onclick="javascript:addRowTo('maintable', 'form-controlalias'); return false;" href="#" class="btn btn-default btn-xs"><span class="glyphicon glyphicon-plus"></span></a>
</a>
<script type="text/javascript">
//<![CDATA[
field_counter_js = 3;
......
......@@ -93,6 +93,8 @@ include("head.inc");
?>
<body>
<script type="text/javascript">
//<![CDATA[
function enable_change(enable_over) {
......@@ -108,10 +110,7 @@ function enable_change(enable_over) {
}
//]]>
</script>
</head>
<body>
<?php include("fbegin.inc"); ?>
<section class="page-content-main">
......
......@@ -106,7 +106,7 @@ include("head.inc");
<form action="system_hasync.php" method="post" name="iform" id="iform">
<table class="table table-primary" width="100%" border="0" cellpadding="6" cellspacing="0" summary="main area">
<table class="table table-primary table-striped" width="100%" border="0" cellpadding="6" cellspacing="0" summary="main area">
<thead>
<tr>
<th colspan="2" class="listtopic">State Synchronization Settings (pfsync)</th>
......@@ -152,7 +152,7 @@ include("head.inc");
</tbody>
</table>
<table class="table table-primary" width="100%" border="0" cellpadding="6" cellspacing="0" summary="main area">
<table class="table table-primary table-striped" width="100%" border="0" cellpadding="6" cellspacing="0" summary="main area">
<thead>
<tr>
<th colspan="2" class="listtopic">Configuration Synchronization Settings (XMLRPC Sync)</th>
......@@ -343,9 +343,6 @@ include("head.inc");
When this option is enabled, this system will automatically sync the Captive Portal configuration to the other HA host when changes are made.
</td>
</tr>
<tr>
<td>&nbsp;</td>
</tr>
<tr>
<td width="22%" valign="top">&nbsp;</td>
<td width="78%">
......
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