Commit 8719477b authored by Jos Schellevis's avatar Jos Schellevis

Gui fixes and enhancements

parent f694e057
...@@ -168,8 +168,6 @@ include("head.inc"); ...@@ -168,8 +168,6 @@ include("head.inc");
<div class="content-box-main"> <div class="content-box-main">
<form action="firewall_aliases_import.php" method="post" name="iform" id="iform"> <form action="firewall_aliases_import.php" method="post" name="iform" id="iform">
<div class="table-responsive">
<table class="table table-striped table-sort"> <table class="table table-striped table-sort">
<tr> <tr>
<td valign="top" class="vncellreq"><?=gettext("Alias Name"); ?></td> <td valign="top" class="vncellreq"><?=gettext("Alias Name"); ?></td>
...@@ -217,7 +215,6 @@ include("head.inc"); ...@@ -217,7 +215,6 @@ include("head.inc");
</td> </td>
</tr> </tr>
</table> </table>
</div>
</form> </form>
</div> </div>
</div> </div>
......
...@@ -217,8 +217,6 @@ $main_buttons = array( ...@@ -217,8 +217,6 @@ $main_buttons = array(
<form action="firewall_nat.php" method="post" name="iform" id="iform"> <form action="firewall_nat.php" method="post" name="iform" id="iform">
<input type="hidden" id="id" name="id" value="<?php echo htmlspecialchars($id); ?>" /> <input type="hidden" id="id" name="id" value="<?php echo htmlspecialchars($id); ?>" />
<div class="table-responsive">
<table class="table table-striped table-sort"> <table class="table table-striped table-sort">
<thead> <thead>
<tr id="frheader"> <tr id="frheader">
...@@ -276,7 +274,7 @@ $main_buttons = array( ...@@ -276,7 +274,7 @@ $main_buttons = array(
continue; continue;
?> ?>
<tr valign="top" id="fr<?=$nnats;?>"> <tr valign="top" id="fr<?=$nnats;?>">
<td class="listt"><input type="checkbox" id="frc<?=$nnats;?>" name="rule[]" value="<?=$i;?>" onClick="fr_bgcolor('<?=$nnats;?>')" style="margin: 0; padding: 0; width: 15px; height: 15px;" /></td> <td class="listt"><input type="checkbox" id="frc<?=$nnats;?>" name="rule[]" value="<?=$i;?>" style="margin: 0; padding: 0; width: 15px; height: 15px;" /></td>
<td class="listt" align="center"> <td class="listt" align="center">
<?php if($natent['associated-rule-id'] == "pass"): ?> <?php if($natent['associated-rule-id'] == "pass"): ?>
<span class="glyphicon glyphicon-play text-success"></span> <span class="glyphicon glyphicon-play text-success"></span>
...@@ -338,11 +336,11 @@ $main_buttons = array( ...@@ -338,11 +336,11 @@ $main_buttons = array(
<td valign="middle" class="list nowrap"> <td valign="middle" class="list nowrap">
<button type="submit" onmouseover="fr_insline(<?=$nnats;?>, true)" onmouseout="fr_insline(<?=$nnats;?>, false)" name="move_<?=$i;?>_x" title="<?=gettext("move selected rules before this rule");?>" class="btn btn-default btn-xs"><span class="glyphicon glyphicon-arrow-left"></span></button> <button type="submit" name="move_<?=$i;?>_x" data-toggle="tooltip" data-placement="left" title="<?=gettext("move selected rules before this rule");?>" class="btn btn-default btn-xs"><span class="glyphicon glyphicon-arrow-left"></span></button>
<a href="firewall_nat_edit.php?id=<?=$i;?>" class="btn btn-default btn-xs"><span class="glyphicon glyphicon-pencil"></span></a> <a href="firewall_nat_edit.php?id=<?=$i;?>" data-toggle="tooltip" data-placement="left" title="<?=gettext("edit this rule");?>" class="btn btn-default btn-xs"><span class="glyphicon glyphicon-pencil"></span></a>
<a href="firewall_nat.php?act=del&amp;id=<?=$i;?>" onclick="return confirm('<?=gettext("Do you really want to delete this rule?");?>')" class="btn btn-default btn-xs"><span class="glyphicon glyphicon-remove"></span></a> <a href="firewall_nat.php?act=del&amp;id=<?=$i;?>" data-toggle="tooltip" data-placement="left" title="<?=gettext("delete this rule");?>" onclick="return confirm('<?=gettext("Do you really want to delete this rule?");?>')" class="btn btn-default btn-xs"><span class="glyphicon glyphicon-remove"></span></a>
<a href="firewall_nat_edit.php?dup=<?=$i;?>" class="btn btn-default btn-xs"><span class="glyphicon glyphicon-plus"></span></a></td> <a href="firewall_nat_edit.php?dup=<?=$i;?>" class="btn btn-default btn-xs" data-toggle="tooltip" data-placement="left" title="<?=gettext("add new rule based on this one");?>"><span class="glyphicon glyphicon-plus"></span></a></td>
</tr> </tr>
<?php $i++; $nnats++; endforeach; ?> <?php $i++; $nnats++; endforeach; ?>
<tr> <tr>
...@@ -352,15 +350,15 @@ $main_buttons = array( ...@@ -352,15 +350,15 @@ $main_buttons = array(
<td>&nbsp;</td> <td>&nbsp;</td>
<td class="list nowrap" valign="middle"> <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" data-toggle="tooltip" data-placement="left" 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> <span class="btn btn-default btn-xs text-muted" data-toggle="tooltip" data-placement="left" title="<?=gettext("delete selected rules");?>"><span class="glyphicon glyphicon-remove" ></span></span>
<?php else: ?> <?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> <button name="del_<?=$i;?>_x" type="submit" data-toggle="tooltip" data-placement="left" 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; ?> <?php endif; ?>
<a href="firewall_nat_edit.php" class="btn btn-default btn-xs"><span class="glyphicon glyphicon-plus"></span></a> <a href="firewall_nat_edit.php" class="btn btn-default btn-xs" data-toggle="tooltip" data-placement="left" title="<?=gettext("add new rule");?>"><span class="glyphicon glyphicon-plus"></span></a>
</td> </td>
</tr> </tr>
</tbody> </tbody>
...@@ -378,9 +376,9 @@ $main_buttons = array( ...@@ -378,9 +376,9 @@ $main_buttons = array(
</tfoot> </tfoot>
</table> </table>
</div>
<div class="container-fluid"> <div class="container-fluid">
<input name="del" type="submit" title="<?=gettext("delete selected rules"); ?>" onclick="return confirm('<?=gettext("Do you really want to delete the selected rules?");?>')" class="btn btn-primary" value="Delete selected rules"/> <input name="del" type="submit" data-toggle="tooltip" data-placement="left" title="<?=gettext("delete selected rules"); ?>" onclick="return confirm('<?=gettext("Do you really want to delete the selected rules?");?>')" class="btn btn-primary" value="Delete selected rules"/>
</div> </div>
</form> </form>
......
...@@ -174,7 +174,6 @@ $main_buttons = array( ...@@ -174,7 +174,6 @@ $main_buttons = array(
<form action="firewall_nat_1to1.php" method="post" name="iform" id="iform"> <form action="firewall_nat_1to1.php" method="post" name="iform" id="iform">
<input type="hidden" id="id" name="id" value="<?php echo htmlspecialchars($id); ?>" /> <input type="hidden" id="id" name="id" value="<?php echo htmlspecialchars($id); ?>" />
<div class="table-responsive">
<table class="table table-striped table-sort"> <table class="table table-striped table-sort">
<thead> <thead>
<tr id="frheader"> <tr id="frheader">
...@@ -206,7 +205,7 @@ $main_buttons = array( ...@@ -206,7 +205,7 @@ $main_buttons = array(
<input type="checkbox" id="frc<?=$i;?>" name="rule[]" value="<?=$i;?>" /> <input type="checkbox" id="frc<?=$i;?>" name="rule[]" value="<?=$i;?>" />
</td> </td>
<td class="listt" align="center"> <td class="listt" align="center">
<a href="?act=toggle&amp;id=<?=$i;?>" class="glyphicon <?=$iconfn;?> <?=$textss;?>" title="<?=gettext("click to toggle enabled/disabled status");?>" ></a> <a href="?act=toggle&amp;id=<?=$i;?>" data-toggle="tooltip" data-placement="left" class="glyphicon <?=$iconfn;?> <?=$textss;?>" title="<?=gettext("click to toggle enabled/disabled status");?>" ></a>
</td> </td>
<td class="listlr" onclick="fr_toggle(<?=$i;?>)" id="frd<?=$i;?>" ondblclick="document.location='firewall_nat_1to1_edit.php?id=<?=$i;?>';"> <td class="listlr" onclick="fr_toggle(<?=$i;?>)" id="frd<?=$i;?>" ondblclick="document.location='firewall_nat_1to1_edit.php?id=<?=$i;?>';">
<?php <?php
...@@ -222,7 +221,7 @@ $main_buttons = array( ...@@ -222,7 +221,7 @@ $main_buttons = array(
<?php <?php
$source_net = pprint_address($natent['source']); $source_net = pprint_address($natent['source']);
$source_cidr = strstr($source_net, '/'); $source_cidr = strstr($source_net, '/');
echo $textss . $natent['external'] . $source_cidr . $textse; echo $natent['external'] . $source_cidr;
?> ?>
</td> </td>
<td class="listr" id="frd<?=$i;?>" ondblclick="document.location='firewall_nat_1to1_edit.php?id=<?=$i;?>';"> <td class="listr" id="frd<?=$i;?>" ondblclick="document.location='firewall_nat_1to1_edit.php?id=<?=$i;?>';">
...@@ -232,22 +231,22 @@ $main_buttons = array( ...@@ -232,22 +231,22 @@ $main_buttons = array(
</td> </td>
<td class="listr" id="frd<?=$i;?>" ondblclick="document.location='firewall_nat_1to1_edit.php?id=<?=$i;?>';"> <td class="listr" id="frd<?=$i;?>" ondblclick="document.location='firewall_nat_1to1_edit.php?id=<?=$i;?>';">
<?php <?php
echo pprint_address($natent['destination']) . $textse; echo pprint_address($natent['destination']);
?> ?>
</td> </td>
<td class="listbg" ondblclick="document.location='firewall_nat_1to1_edit.php?id=<?=$i;?>';"> <td class="listbg" ondblclick="document.location='firewall_nat_1to1_edit.php?id=<?=$i;?>';">
<?php <?php
echo htmlspecialchars($natent['descr']) . '&nbsp;' . $textse; echo htmlspecialchars($natent['descr']) . '&nbsp;';
?> ?>
</td> </td>
<td class="list nowrap" valign="middle"> <td class="list nowrap" valign="middle">
<button name="move_<?=$i;?>_x" <button name="move_<?=$i;?>_x"
title="<?=gettext("move selected rules before this rule");?>" title="<?=gettext("move selected mapping before this rule");?>"
type="submit" class="btn btn-default btn-xs"><span class="glyphicon glyphicon-arrow-left"></span></button> type="submit" class="btn btn-default btn-xs" data-toggle="tooltip" data-placement="left"><span class="glyphicon glyphicon-arrow-left"></span></button>
<a href="firewall_nat_1to1_edit.php?id=<?=$i;?>" class="btn btn-default btn-xs"><span class="glyphicon glyphicon-pencil"></span></a> <a href="firewall_nat_1to1_edit.php?id=<?=$i;?>" class="btn btn-default btn-xs" data-toggle="tooltip" data-placement="left" title="<?=gettext("edit this mapping");?>"><span class="glyphicon glyphicon-pencil"></span></a>
<a href="firewall_nat_1to1.php?act=del&amp;id=<?=$i;?>" onclick="return confirm('<?=gettext("Do you really want to delete this rule?");?>')" class="btn btn-default btn-xs"><span class="glyphicon glyphicon-remove"></span></a> <a href="firewall_nat_1to1.php?act=del&amp;id=<?=$i;?>" data-toggle="tooltip" data-placement="left" title="<?=gettext("delete this mapping");?>" onclick="return confirm('<?=gettext("Do you really want to delete this rule?");?>')" class="btn btn-default btn-xs"><span class="glyphicon glyphicon-remove"></span></a>
<a href="firewall_nat_1to1_edit.php?dup=<?=$i;?>" class="btn btn-default btn-xs"><span class="glyphicon glyphicon-plus"></span></a> <a href="firewall_nat_1to1_edit.php?dup=<?=$i;?>" data-toggle="tooltip" data-placement="left" title="<?=gettext("add new mapping based on this one");?>" class="btn btn-default btn-xs"><span class="glyphicon glyphicon-plus"></span></a>
</td> </td>
</tr> </tr>
<?php <?php
...@@ -265,21 +264,21 @@ $main_buttons = array( ...@@ -265,21 +264,21 @@ $main_buttons = array(
<?php <?php
else: else:
?> ?>
<button name="move_<?=$i;?>_x" type="submit" title="<?=gettext("move selected mappings to end");?>" class="btn btn-default btn-xs"><span class="glyphicon glyphicon-arrow-left"></span></button> <button name="move_<?=$i;?>_x" type="submit" data-toggle="tooltip" data-placement="left" title="<?=gettext("move selected mappings to end");?>" class="btn btn-default btn-xs"><span class="glyphicon glyphicon-arrow-left"></span></button>
<?php <?php
endif; endif;
?> ?>
<a href="firewall_nat_1to1_edit.php" class="btn btn-default btn-xs"><span class="glyphicon glyphicon-plus"></span></a> <a href="firewall_nat_1to1_edit.php" data-toggle="tooltip" data-placement="left" title="<?=gettext("add new mapping");?>" class="btn btn-default btn-xs"><span class="glyphicon glyphicon-plus"></span></a>
<?php <?php
if ($i == 0): if ($i == 0):
?> ?>
<span title="<?=gettext("delete selected rules");?>" class="btn btn-default btn-xs"><span class="glyphicon glyphicon-remove"></span></span> <span title="<?=gettext("delete selected rules");?>" data-toggle="tooltip" data-placement="left" title="<?=gettext("delete mapping");?>" class="btn btn-default btn-xs"><span class="glyphicon glyphicon-remove"></span></span>
<?php <?php
else: else:
?> ?>
<button name="del" type="submit" title="<?=gettext("delete selected mappings");?>" <button name="del" type="submit" data-toggle="tooltip" data-placement="left" title="<?=gettext("delete selected mappings");?>"
onclick="return confirm('<?=gettext("Do you really want to delete the selected mappings?");?>')" class="btn btn-default btn-xs"><span class="glyphicon glyphicon-remove"></span></button> onclick="return confirm('<?=gettext("Do you really want to delete the selected mappings?");?>')" class="btn btn-default btn-xs"><span class="glyphicon glyphicon-remove"></span></button>
<?php <?php
endif; endif;
...@@ -301,7 +300,6 @@ $main_buttons = array( ...@@ -301,7 +300,6 @@ $main_buttons = array(
</tr> </tr>
</tbody> </tbody>
</table> </table>
</div>
</form> </form>
</div> </div>
</section> </section>
......
...@@ -225,35 +225,51 @@ include("head.inc"); ...@@ -225,35 +225,51 @@ include("head.inc");
switch (document.iform.srctype.selectedIndex) { switch (document.iform.srctype.selectedIndex) {
case 1: /* single */ case 1: /* single */
document.iform.src.disabled = 0; document.iform.src.disabled = 0;
document.iform.srcmask.value = ""; //document.iform.srcmask.value = "";
document.iform.srcmask.disabled = 1; //document.iform.srcmask.disabled = 1;
jQuery('#srcmask').selectpicker('val','');
jQuery('#srcmask').prop('disabled',true);
jQuery('#srcmask').selectpicker('refresh');
break; break;
case 2: /* network */ case 2: /* network */
document.iform.src.disabled = 0; document.iform.src.disabled = 0;
document.iform.srcmask.disabled = 0; //document.iform.srcmask.disabled = 0;
jQuery('#srcmask').prop('disabled',false);
jQuery('#srcmask').selectpicker('refresh');
break; break;
default: default:
document.iform.src.value = ""; document.iform.src.value = "";
document.iform.src.disabled = 1; document.iform.src.disabled = 1;
document.iform.srcmask.value = ""; //document.iform.srcmask.value = "";
document.iform.srcmask.disabled = 1; //document.iform.srcmask.disabled = 1;
jQuery('#srcmask').selectpicker('val','');
jQuery('#srcmask').prop('disabled',true);
jQuery('#srcmask').selectpicker('refresh');
break; break;
} }
switch (document.iform.dsttype.selectedIndex) { switch (document.iform.dsttype.selectedIndex) {
case 1: /* single */ case 1: /* single */
document.iform.dst.disabled = 0; document.iform.dst.disabled = 0;
document.iform.dstmask.value = ""; //document.iform.dstmask.value = "";
document.iform.dstmask.disabled = 1; //document.iform.dstmask.disabled = 1;
jQuery('#dstmask').selectpicker('val','');
jQuery('#dstmask').prop('disabled',true);
jQuery('#dstmask').selectpicker('refresh');
break; break;
case 2: /* network */ case 2: /* network */
document.iform.dst.disabled = 0; document.iform.dst.disabled = 0;
document.iform.dstmask.disabled = 0; //document.iform.dstmask.disabled = 0;
jQuery('#dstmask').prop('disabled',false);
jQuery('#dstmask').selectpicker('refresh');
break; break;
default: default:
document.iform.dst.value = ""; document.iform.dst.value = "";
document.iform.dst.disabled = 1; document.iform.dst.disabled = 1;
document.iform.dstmask.value = ""; //document.iform.dstmask.value = "";
document.iform.dstmask.disabled = 1; //document.iform.dstmask.disabled = 1;
jQuery('#dstmask').selectpicker('val','');
jQuery('#dstmask').prop('disabled',true);
jQuery('#dstmask').selectpicker('refresh');
break; break;
} }
} }
...@@ -293,7 +309,7 @@ include("head.inc"); ...@@ -293,7 +309,7 @@ include("head.inc");
<tr> <tr>
<td width="22%" valign="top" class="vncellreq"><?=gettext("Interface"); ?></td> <td width="22%" valign="top" class="vncellreq"><?=gettext("Interface"); ?></td>
<td width="78%" class="vtable"> <td width="78%" class="vtable">
<select name="interface" class="formselect"> <select name="interface" class="selectpicker" data-live-search="true">
<?php <?php
foreach ($ifdisp as $if => $ifdesc) foreach ($ifdisp as $if => $ifdesc)
if(have_ruleint_access($if)) if(have_ruleint_access($if))
...@@ -356,7 +372,7 @@ include("head.inc"); ...@@ -356,7 +372,7 @@ include("head.inc");
<tr> <tr>
<td><?=gettext("Type:"); ?>&nbsp;&nbsp;</td> <td><?=gettext("Type:"); ?>&nbsp;&nbsp;</td>
<td> <td>
<select name="srctype" class="formselect" onchange="typesel_change()"> <select name="srctype" class="selectpicker" onchange="typesel_change()">
<?php <?php
$sel = is_specialnet($pconfig['src']); $sel = is_specialnet($pconfig['src']);
?> ?>
...@@ -400,8 +416,13 @@ include("head.inc"); ...@@ -400,8 +416,13 @@ include("head.inc");
<tr> <tr>
<td><?=gettext("Address:"); ?>&nbsp;&nbsp;</td> <td><?=gettext("Address:"); ?>&nbsp;&nbsp;</td>
<td> <td>
<input name="src" type="text" class="formfld" id="src" size="20" value="<?php if (!is_specialnet($pconfig['src'])) echo htmlspecialchars($pconfig['src']);?>" /> / <table>
<select name="srcmask" class="formselect" id="srcmask"> <tr>
<td width="348px">
<input name="src" type="text" class="formfld" id="src" size="20" value="<?php if (!is_specialnet($pconfig['src'])) echo htmlspecialchars($pconfig['src']);?>" />
</td>
<td>
<select name="srcmask" class="selectpicker" id="srcmask" data-width="auto">
<?php <?php
for ($i = 31; $i > 0; $i--): for ($i = 31; $i > 0; $i--):
?> ?>
...@@ -413,6 +434,9 @@ include("head.inc"); ...@@ -413,6 +434,9 @@ include("head.inc");
</td> </td>
</tr> </tr>
</table> </table>
</td>
</tr>
</table>
<br /> <br />
<span class="vexpl"><?=gettext("Enter the internal (LAN) subnet for the 1:1 mapping. The subnet size specified for the internal subnet will be applied to the external subnet."); ?></span> <span class="vexpl"><?=gettext("Enter the internal (LAN) subnet for the 1:1 mapping. The subnet size specified for the internal subnet will be applied to the external subnet."); ?></span>
</td> </td>
...@@ -430,7 +454,7 @@ include("head.inc"); ...@@ -430,7 +454,7 @@ include("head.inc");
<tr> <tr>
<td><?=gettext("Type:"); ?>&nbsp;&nbsp;</td> <td><?=gettext("Type:"); ?>&nbsp;&nbsp;</td>
<td> <td>
<select name="dsttype" class="formselect" onchange="typesel_change()"> <select name="dsttype" class="selectpicker" onchange="typesel_change()">
<?php <?php
$sel = is_specialnet($pconfig['dst']); ?> $sel = is_specialnet($pconfig['dst']); ?>
<option value="any" <?php if (empty($pconfig['dst']) || $pconfig['dst'] == "any") { echo "selected=\"selected\""; } ?>><?=gettext("any"); ?></option> <option value="any" <?php if (empty($pconfig['dst']) || $pconfig['dst'] == "any") { echo "selected=\"selected\""; } ?>><?=gettext("any"); ?></option>
...@@ -482,9 +506,13 @@ include("head.inc"); ...@@ -482,9 +506,13 @@ include("head.inc");
<tr> <tr>
<td><?=gettext("Address:"); ?>&nbsp;&nbsp;</td> <td><?=gettext("Address:"); ?>&nbsp;&nbsp;</td>
<td> <td>
<table>
<tr>
<td width="348px">
<input name="dst" type="text" autocomplete="off" class="formfldalias" id="dst" size="20" value="<?php if (!is_specialnet($pconfig['dst'])) echo htmlspecialchars($pconfig['dst']);?>" /> <input name="dst" type="text" autocomplete="off" class="formfldalias" id="dst" size="20" value="<?php if (!is_specialnet($pconfig['dst'])) echo htmlspecialchars($pconfig['dst']);?>" />
/ </td>
<select name="dstmask" class="formselect" id="dstmask"> <td>
<select name="dstmask" class="selectpicker" id="dstmask" data-width="auto">
<?php <?php
for ($i = 31; $i > 0; $i--): for ($i = 31; $i > 0; $i--):
?> ?>
...@@ -492,6 +520,9 @@ include("head.inc"); ...@@ -492,6 +520,9 @@ include("head.inc");
<?php <?php
endfor; endfor;
?> ?>
</td>
</tr>
</table>
</select> </select>
</td> </td>
</tr> </tr>
...@@ -516,7 +547,7 @@ include("head.inc"); ...@@ -516,7 +547,7 @@ include("head.inc");
<tr> <tr>
<td width="22%" valign="top" class="vncell"><?=gettext("NAT reflection"); ?></td> <td width="22%" valign="top" class="vncell"><?=gettext("NAT reflection"); ?></td>
<td width="78%" class="vtable"> <td width="78%" class="vtable">
<select name="natreflection" class="formselect"> <select name="natreflection" class="selectpicker">
<option value="default" <?php if ($pconfig['natreflection'] != "enable" && $pconfig['natreflection'] != "disable") echo "selected=\"selected\""; ?>> <option value="default" <?php if ($pconfig['natreflection'] != "enable" && $pconfig['natreflection'] != "disable") echo "selected=\"selected\""; ?>>
<?=gettext("use system default"); ?> <?=gettext("use system default"); ?>
</option> </option>
......
...@@ -465,7 +465,6 @@ include("head.inc"); ...@@ -465,7 +465,6 @@ include("head.inc");
<form action="firewall_nat_edit.php" method="post" name="iform" id="iform"> <form action="firewall_nat_edit.php" method="post" name="iform" id="iform">
<div class="table-responsive">
<table class="table table-striped table-sort"> <table class="table table-striped table-sort">
...@@ -496,7 +495,7 @@ include("head.inc"); ...@@ -496,7 +495,7 @@ include("head.inc");
<tr> <tr>
<td width="22%" valign="top" class="vncellreq"><?=gettext("Interface"); ?></td> <td width="22%" valign="top" class="vncellreq"><?=gettext("Interface"); ?></td>
<td width="78%" class="vtable"> <td width="78%" class="vtable">
<select name="interface" class="formselect" onchange="dst_change(this.value,iface_old,document.iform.dsttype.value);iface_old = document.iform.interface.value;typesel_change();"> <select name="interface" class="selectpicker" data-live-search="true" onchange="dst_change(this.value,iface_old,document.iform.dsttype.value);iface_old = document.iform.interface.value;typesel_change();">
<?php <?php
$iflist = get_configured_interface_with_descr(false, true); $iflist = get_configured_interface_with_descr(false, true);
...@@ -538,7 +537,7 @@ include("head.inc"); ...@@ -538,7 +537,7 @@ include("head.inc");
<tr> <tr>
<td width="22%" valign="top" class="vncellreq"><?=gettext("Protocol"); ?></td> <td width="22%" valign="top" class="vncellreq"><?=gettext("Protocol"); ?></td>
<td width="78%" class="vtable"> <td width="78%" class="vtable">
<select name="proto" class="formselect" onchange="proto_change(); check_for_aliases();"> <select name="proto" class="selectpicker" onchange="proto_change(); check_for_aliases();">
<?php $protocols = explode(" ", "TCP UDP TCP/UDP ICMP ESP AH GRE IPV6 IGMP PIM OSPF"); foreach ($protocols as $proto): ?> <?php $protocols = explode(" ", "TCP UDP TCP/UDP ICMP ESP AH GRE IPV6 IGMP PIM OSPF"); foreach ($protocols as $proto): ?>
<option value="<?=strtolower($proto);?>" <?php if (strtolower($proto) == $pconfig['proto']) echo "selected=\"selected\""; ?>><?=htmlspecialchars($proto);?></option> <option value="<?=strtolower($proto);?>" <?php if (strtolower($proto) == $pconfig['proto']) echo "selected=\"selected\""; ?>><?=htmlspecialchars($proto);?></option>
<?php endforeach; ?> <?php endforeach; ?>
...@@ -866,7 +865,7 @@ include("head.inc"); ...@@ -866,7 +865,7 @@ include("head.inc");
?> ?>
<?php if ($has_created_time || $has_updated_time): ?> <?php if ($has_created_time || $has_updated_time): ?>
<tr> <tr>
<td>&nbsp;</td> <td colspan="2">&nbsp;</td>
</tr> </tr>
<tr> <tr>
<td colspan="2" valign="top" class="listtopic"><?=gettext("Rule Information");?></td> <td colspan="2" valign="top" class="listtopic"><?=gettext("Rule Information");?></td>
...@@ -904,7 +903,6 @@ include("head.inc"); ...@@ -904,7 +903,6 @@ include("head.inc");
</td> </td>
</tr> </tr>
</table> </table>
</div>
</form> </form>
</div> </div>
</div> </div>
......
...@@ -153,8 +153,6 @@ include("head.inc"); ...@@ -153,8 +153,6 @@ include("head.inc");
<div class="content-box"> <div class="content-box">
<form action="firewall_nat_npt_edit.php" method="post" name="iform" id="iform"> <form action="firewall_nat_npt_edit.php" method="post" name="iform" id="iform">
<div class="table-responsive">
<table class="table table-striped table-sort"> <table class="table table-striped table-sort">
...@@ -222,8 +220,13 @@ include("head.inc"); ...@@ -222,8 +220,13 @@ include("head.inc");
<tr> <tr>
<td><?=gettext("Address:"); ?>&nbsp;&nbsp;</td> <td><?=gettext("Address:"); ?>&nbsp;&nbsp;</td>
<td> <td>
<input name="src" type="text" class="formfldalias" id="src" size="20" value="<?php if (!is_specialnet($pconfig['src'])) echo htmlspecialchars($pconfig['src']);?>" /> / <table>
<select name="srcmask" class="formselect" id="srcmask"> <tr>
<td width="348px">
<input name="src" type="text" class="formfldalias" id="src" size="20" value="<?php if (!is_specialnet($pconfig['src'])) echo htmlspecialchars($pconfig['src']);?>" />
</td>
<td>
<select name="srcmask" class="selectpicker" id="srcmask" data-width="auto">
<?php for ($i = 128; $i > 0; $i--): ?> <?php for ($i = 128; $i > 0; $i--): ?>
<option value="<?=$i;?>" <?php if ($i == $pconfig['srcmask']) echo "selected=\"selected\""; ?>><?=$i;?></option> <option value="<?=$i;?>" <?php if ($i == $pconfig['srcmask']) echo "selected=\"selected\""; ?>><?=$i;?></option>
<?php endfor; ?> <?php endfor; ?>
...@@ -231,6 +234,9 @@ include("head.inc"); ...@@ -231,6 +234,9 @@ include("head.inc");
</td> </td>
</tr> </tr>
</table> </table>
</td>
</tr>
</table>
<br /> <br />
<span class="vexpl"><?=gettext("Enter the internal (LAN) ULA IPv6 Prefix for the Network Prefix translation. The prefix size specified for the internal IPv6 prefix will be applied to the <span class="vexpl"><?=gettext("Enter the internal (LAN) ULA IPv6 Prefix for the Network Prefix translation. The prefix size specified for the internal IPv6 prefix will be applied to the
external prefix."); external prefix.");
...@@ -250,9 +256,13 @@ include("head.inc"); ...@@ -250,9 +256,13 @@ include("head.inc");
<tr> <tr>
<td><?=gettext("Address:"); ?>&nbsp;&nbsp;</td> <td><?=gettext("Address:"); ?>&nbsp;&nbsp;</td>
<td> <td>
<table>
<tr>
<td width="348px">
<input name="dst" type="text" class="formfldalias" id="dst" size="20" value="<?php if (!is_specialnet($pconfig['dst'])) echo htmlspecialchars($pconfig['dst']);?>" /> <input name="dst" type="text" class="formfldalias" id="dst" size="20" value="<?php if (!is_specialnet($pconfig['dst'])) echo htmlspecialchars($pconfig['dst']);?>" />
/ </td>
<select name="dstmask" class="formselect" id="dstmask"> <td>
<select name="dstmask" class="selectpicker" id="dstmask" data-width="auto">
<?php <?php
for ($i = 128; $i > 0; $i--): ?> for ($i = 128; $i > 0; $i--): ?>
<option value="<?=$i;?>" <?php if ($i == $pconfig['dstmask']) echo "selected=\"selected\""; ?>><?=$i;?></option> <option value="<?=$i;?>" <?php if ($i == $pconfig['dstmask']) echo "selected=\"selected\""; ?>><?=$i;?></option>
...@@ -261,6 +271,9 @@ include("head.inc"); ...@@ -261,6 +271,9 @@ include("head.inc");
</td> </td>
</tr> </tr>
</table> </table>
</td>
</tr>
</table>
<br /> <br />
<span class="vexpl"><?=gettext("Enter the Global Unicast routable IPv6 prefix here"); ?><br /></span> <span class="vexpl"><?=gettext("Enter the Global Unicast routable IPv6 prefix here"); ?><br /></span>
</td> </td>
...@@ -285,7 +298,6 @@ include("head.inc"); ...@@ -285,7 +298,6 @@ include("head.inc");
</table> </table>
</div> </div>
</form> </form>
</div>
</section> </section>
</div> </div>
</div> </div>
......
...@@ -231,7 +231,6 @@ include("head.inc"); ...@@ -231,7 +231,6 @@ include("head.inc");
<div class="tab-content content-box col-xs-12"> <div class="tab-content content-box col-xs-12">
<div class="table-responsive">
<table class="table table-striped table-sort"> <table class="table table-striped table-sort">
<thead> <thead>
<tr> <tr>
...@@ -288,7 +287,7 @@ include("head.inc"); ...@@ -288,7 +287,7 @@ include("head.inc");
</tr> </tr>
</tbody> </tbody>
</table> </table>
</div>
</div> </div>
</section> </section>
...@@ -296,7 +295,7 @@ include("head.inc"); ...@@ -296,7 +295,7 @@ include("head.inc");
<div class=" content-box "> <div class=" content-box ">
<div class="table-responsive">
<table class="table table-striped table-sort"> <table class="table table-striped table-sort">
<thead> <thead>
<tr><th colspan="12"><?=gettext("Mappings:"); ?></th></tr> <tr><th colspan="12"><?=gettext("Mappings:"); ?></th></tr>
...@@ -626,7 +625,7 @@ include("head.inc"); ...@@ -626,7 +625,7 @@ include("head.inc");
</tr> </tr>
</tbody> </tbody>
</table> </table>
</div>
</div> </div>
</section> </section>
</form> </form>
......
...@@ -819,7 +819,7 @@ function select_clicked() { ...@@ -819,7 +819,7 @@ function select_clicked() {
<tfoot> <tfoot>
<tr> <tr>
<td colspan="3"> <td colspan="4">
<p> <p>
<?=gettext("Additional authentication servers can be added here.");?> <?=gettext("Additional authentication servers can be added here.");?>
</p> </p>
......
...@@ -1048,14 +1048,13 @@ function internalca_change() { ...@@ -1048,14 +1048,13 @@ function internalca_change() {
<?php else:?> <?php else:?>
<table width="100%" border="0" cellpadding="0" cellspacing="0" summary="details" class="table table-striped"> <table summary="details" class="table table-striped">
<thead> <thead>
<tr> <tr>
<td width="15%" class="listhdrr"><?=gettext("Name");?></td> <td width="15%" class="listhdrr"><?=gettext("Name");?></td>
<td width="15%" class="listhdrr"><?=gettext("Issuer");?></td> <td width="15%" class="listhdrr"><?=gettext("Issuer");?></td>
<td width="40%" class="listhdrr"><?=gettext("Distinguished Name");?></td> <td width="40%" class="listhdrr"><?=gettext("Distinguished Name");?></td>
<td width="10%" class="listhdrr"><?=gettext("In Use");?></td> <td width="10%" class="listhdrr"><?=gettext("In Use");?></td>
<td width="10%" class="list"></td>
</tr> </tr>
</thead> </thead>
<tbody> <tbody>
...@@ -1091,7 +1090,7 @@ function internalca_change() { ...@@ -1091,7 +1090,7 @@ function internalca_change() {
?> ?>
<tr> <tr>
<td class="listlr"> <td class="listlr">
<table border="0" cellpadding="0" cellspacing="0" summary="icon"> <table summary="icon">
<tr> <tr>
<td align="left" valign="middle"> <td align="left" valign="middle">
<?=$certimg;?> <?=$certimg;?>
...@@ -1111,7 +1110,7 @@ function internalca_change() { ...@@ -1111,7 +1110,7 @@ function internalca_change() {
</td> </td>
<td class="listr"><?=$caname;?>&nbsp;</td> <td class="listr"><?=$caname;?>&nbsp;</td>
<td class="listr"><?=$subj;?>&nbsp;<br /> <td class="listr"><?=$subj;?>&nbsp;<br />
<table width="100%" summary="valid"> <table summary="valid">
<tr> <tr>
<td width="10%">&nbsp;</td> <td width="10%">&nbsp;</td>
<td width="20%"><?=gettext("Valid From")?>:</td> <td width="20%"><?=gettext("Valid From")?>:</td>
...@@ -1146,10 +1145,8 @@ function internalca_change() { ...@@ -1146,10 +1145,8 @@ function internalca_change() {
<?php if (is_captiveportal_cert($cert['refid'])): ?> <?php if (is_captiveportal_cert($cert['refid'])): ?>
Captive Portal<br /> Captive Portal<br />
<?php endif; ?> <?php endif; ?>
</td>
<td valign="middle" class="list nowrap">
<table border="0" cellpadding="0" cellspacing="0">
<tr>
<a href="system_certmanager.php?act=exp&amp;id=<?=$i;?>" class="btn btn-default btn-xs" data-toggle="tooltip" data-placement="left" title="<?=gettext("export ca");?>"> <a href="system_certmanager.php?act=exp&amp;id=<?=$i;?>" class="btn btn-default btn-xs" data-toggle="tooltip" data-placement="left" title="<?=gettext("export ca");?>">
<span class="glyphicon glyphicon-download"></span> <span class="glyphicon glyphicon-download"></span>
</a> </a>
...@@ -1174,15 +1171,13 @@ function internalca_change() { ...@@ -1174,15 +1171,13 @@ function internalca_change() {
<span class="glyphicon glyphicon-edit"></span> <span class="glyphicon glyphicon-edit"></span>
</a> </a>
<?php endif; ?> <?php endif; ?>
</tr>
</table>
</td> </td>
</tr> </tr>
<?php $i++; endforeach; ?> <?php $i++; endforeach; ?>
<tr> <tr>
<td>&nbsp;</td> <td>&nbsp;</td>
<td colspan="4"><?=gettext("Note: You can only delete a certificate if it is not currently in use.");?></td> <td colspan="3"><?=gettext("Note: You can only delete a certificate if it is not currently in use.");?></td>
</tr> </tr>
</tbody> </tbody>
</table> </table>
......
...@@ -356,13 +356,13 @@ include("head.inc"); ...@@ -356,13 +356,13 @@ include("head.inc");
</table> </table>
<table width="100%" border="0" cellpadding="6" cellspacing="0" id="internal" summary="internal" class="table table-striped"> <table width="100%" border="0" cellpadding="6" cellspacing="0" id="internal" summary="internal" class="table table-striped">
<tbody> <thead>
<tr> <tr>
<th colspan="2" valign="top" class="listtopic"><?=gettext("Internal Certificate Revocation List");?></th> <th colspan="2" valign="top" class="listtopic"><?=gettext("Internal Certificate Revocation List");?></th>
</tr> </tr>
</tbody> </thead>
<thead> <tbody>
<tr> <tr>
<td width="22%" valign="top" class="vncellreq"><?=gettext("Lifetime");?></td> <td width="22%" valign="top" class="vncellreq"><?=gettext("Lifetime");?></td>
<td width="78%" class="vtable"> <td width="78%" class="vtable">
...@@ -379,7 +379,7 @@ include("head.inc"); ...@@ -379,7 +379,7 @@ include("head.inc");
<?=gettext("Default: 0");?> <?=gettext("Default: 0");?>
</td> </td>
</tr> </tr>
</thead> </tbody>
</table> </table>
<table width="100%" border="0" cellpadding="6" cellspacing="0" summary="save" class="table table-striped"> <table width="100%" border="0" cellpadding="6" cellspacing="0" summary="save" class="table table-striped">
...@@ -431,44 +431,42 @@ include("head.inc"); ...@@ -431,44 +431,42 @@ include("head.inc");
<?php $crl = $thiscrl; ?> <?php $crl = $thiscrl; ?>
<form action="system_crlmanager.php" method="post" name="iform" id="iform"> <form action="system_crlmanager.php" method="post" name="iform" id="iform">
<table width="100%" border="0" cellpadding="0" cellspacing="0" summary="revoke" class="table table-striped"> <table summary="revoke" class="table table-striped">
<thead> <thead>
<tr> <tr>
<th width="90%" class="listhdrr" colspan="3"><b><?php echo gettext("Currently Revoked Certificates for CRL") . ': ' . $crl['descr']; ?></b></th> <th colspan="4"><b><?php echo gettext("Currently Revoked Certificates for CRL") . ': ' . $crl['descr']; ?></b></th>
<th width="10%" class="list"></th>
</tr> </tr>
<tr> <tr>
<th width="30%" class="listhdrr"><b><?php echo gettext("Certificate Name")?></b></th> <th><b><?php echo gettext("Certificate Name")?></b></th>
<th width="30%" class="listhdrr"><b><?php echo gettext("Revocation Reason")?></b></th> <th><b><?php echo gettext("Revocation Reason")?></b></th>
<th width="30%" class="listhdrr"><b><?php echo gettext("Revoked At")?></b></th> <th><b><?php echo gettext("Revoked At")?></b></th>
<th width="10%" class="list"></th> <th></th>
</tr> </tr>
</thead> </thead>
<tbody> <tbody>
<?php /* List Certs on CRL */ <?php /* List Certs on CRL */
if (!is_array($crl['cert']) || (count($crl['cert']) == 0)): ?> if (!is_array($crl['cert']) || (count($crl['cert']) == 0)): ?>
<tr> <tr>
<td class="listlr" colspan="3"> <td colspan="4">
&nbsp;&nbsp;&nbsp;&nbsp;<?php echo gettext("No Certificates Found for this CRL."); ?> <?php echo gettext("No Certificates Found for this CRL."); ?>
</td> </td>
<td class="list">&nbsp;</td>
</tr> </tr>
<?php else: <?php else:
foreach($crl['cert'] as $i => $cert): foreach($crl['cert'] as $i => $cert):
$name = htmlspecialchars($cert['descr']); $name = htmlspecialchars($cert['descr']);
?> ?>
<tr> <tr>
<td class="listlr"> <td>
<?php echo $name; ?> <?php echo $name; ?>
</td> </td>
<td class="listlr"> <td>
<?php echo $openssl_crl_status[$cert["reason"]]; ?> <?php echo $openssl_crl_status[$cert["reason"]]; ?>
</td> </td>
<td class="listlr"> <td>
<?php echo date("D M j G:i:s T Y", $cert["revoke_time"]); ?> <?php echo date("D M j G:i:s T Y", $cert["revoke_time"]); ?>
</td> </td>
<td class="list"> <td>
<a href="system_crlmanager.php?act=delcert&amp;id=<?php echo $crl['refid']; ?>&amp;certref=<?php echo $cert['refid']; ?>" data-toggle="tooltip" data-placement="left" title="<?=gettext("Delete this certificate from the CRL ");?>" onclick="return confirm('<?=gettext("Do you really want to delete this Certificate from the CRL?");?>')" class="btn btn-default"> <a href="system_crlmanager.php?act=delcert&amp;id=<?php echo $crl['refid']; ?>&amp;certref=<?php echo $cert['refid']; ?>" data-toggle="tooltip" data-placement="left" title="<?=gettext("Delete this certificate from the CRL ");?>" onclick="return confirm('<?=gettext("Do you really want to delete this Certificate from the CRL?");?>')" class="btn btn-default btn-xs">
<span class="glyphicon glyphicon-remove"></span> <span class="glyphicon glyphicon-remove"></span>
</a> </a>
</td> </td>
...@@ -485,15 +483,22 @@ include("head.inc"); ...@@ -485,15 +483,22 @@ include("head.inc");
$ca_certs[] = $cert; $ca_certs[] = $cert;
if (count($ca_certs) == 0): ?> if (count($ca_certs) == 0): ?>
<tr> <tr>
<td class="listlr" colspan="3"> <td colspan="4">
&nbsp;&nbsp;&nbsp;&nbsp;<?php echo gettext("No Certificates Found for this CA."); ?> <?php echo gettext("No Certificates Found for this CA."); ?>
</td> </td>
<td class="list">&nbsp;</td>
</tr> </tr>
<?php else: ?> <?php else: ?>
<tr> <tr>
<td class="listlr" colspan="3" align="center"> <th colspan="4">
<b><?php echo gettext("Choose a Certificate to Revoke"); ?></b>: <select name='certref' id='certref' class="formselect selectpicker" data-style="btn-default" data-live-search="true"> <?=gettext("Revoke a Certificate"); ?>
</th>
</tr>
<tr>
<td>
<b><?php echo gettext("Choose a Certificate to Revoke"); ?></b>:
</td>
<td colspan="3" align="left">
<select name='certref' id='certref' class="selectpicker" data-style="btn-default" data-live-search="true">
<?php $rowIndex = 0; <?php $rowIndex = 0;
foreach($ca_certs as $cert): foreach($ca_certs as $cert):
$rowIndex++; ?> $rowIndex++; ?>
...@@ -502,8 +507,14 @@ include("head.inc"); ...@@ -502,8 +507,14 @@ include("head.inc");
if ($rowIndex == 0) if ($rowIndex == 0)
echo "<option></option>"; ?> echo "<option></option>"; ?>
</select> </select>
</td>
</tr>
<tr>
<td>
<b><?php echo gettext("Reason");?></b>: <b><?php echo gettext("Reason");?></b>:
<select name='crlreason' id='crlreason' class="formselect selectpicker" data-style="btn-default"> </td>
<td colspan="3" align="left">
<select name='crlreason' id='crlreason' class="selectpicker" data-style="btn-default">
<?php $rowIndex = 0; <?php $rowIndex = 0;
foreach($openssl_crl_status as $code => $reason): foreach($openssl_crl_status as $code => $reason):
$rowIndex++; ?> $rowIndex++; ?>
...@@ -512,12 +523,16 @@ include("head.inc"); ...@@ -512,12 +523,16 @@ include("head.inc");
if ($rowIndex == 0) if ($rowIndex == 0)
echo "<option></option>"; ?> echo "<option></option>"; ?>
</select> </select>
</td>
</tr>
<tr>
<td></td>
<td colspan="3" align="left">
<input name="act" type="hidden" value="addcert" /> <input name="act" type="hidden" value="addcert" />
<input name="crlref" type="hidden" value="<?=$crl['refid'];?>" /> <input name="crlref" type="hidden" value="<?=$crl['refid'];?>" />
<input name="id" type="hidden" value="<?=$crl['refid'];?>" /> <input name="id" type="hidden" value="<?=$crl['refid'];?>" />
<input id="submit" name="add" type="submit" class="formbtn btn btn-primary" value="<?=gettext("Add"); ?>" /> <input id="submit" name="add" type="submit" class="formbtn btn btn-primary" value="<?=gettext("Add"); ?>" />
</td> </td>
<td class="list">&nbsp;</td>
</tr> </tr>
<?php endif; ?> <?php endif; ?>
</tbody> </tbody>
......
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