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

Gui fixes and enhancements

parent f694e057
......@@ -168,8 +168,6 @@ include("head.inc");
<div class="content-box-main">
<form action="firewall_aliases_import.php" method="post" name="iform" id="iform">
<div class="table-responsive">
<table class="table table-striped table-sort">
<tr>
<td valign="top" class="vncellreq"><?=gettext("Alias Name"); ?></td>
......@@ -217,7 +215,6 @@ include("head.inc");
</td>
</tr>
</table>
</div>
</form>
</div>
</div>
......
......@@ -217,8 +217,6 @@ $main_buttons = array(
<form action="firewall_nat.php" method="post" name="iform" id="iform">
<input type="hidden" id="id" name="id" value="<?php echo htmlspecialchars($id); ?>" />
<div class="table-responsive">
<table class="table table-striped table-sort">
<thead>
<tr id="frheader">
......@@ -276,7 +274,7 @@ $main_buttons = array(
continue;
?>
<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">
<?php if($natent['associated-rule-id'] == "pass"): ?>
<span class="glyphicon glyphicon-play text-success"></span>
......@@ -338,11 +336,11 @@ $main_buttons = array(
<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>
<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.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>
<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;?>" 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;?>" 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>
<?php $i++; $nnats++; endforeach; ?>
<tr>
......@@ -352,15 +350,15 @@ $main_buttons = array(
<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" 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): ?>
<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: ?>
<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; ?>
<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>
</tr>
</tbody>
......@@ -378,9 +376,9 @@ $main_buttons = array(
</tfoot>
</table>
</div>
<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>
</form>
......
......@@ -174,7 +174,6 @@ $main_buttons = array(
<form action="firewall_nat_1to1.php" method="post" name="iform" id="iform">
<input type="hidden" id="id" name="id" value="<?php echo htmlspecialchars($id); ?>" />
<div class="table-responsive">
<table class="table table-striped table-sort">
<thead>
<tr id="frheader">
......@@ -206,7 +205,7 @@ $main_buttons = array(
<input type="checkbox" id="frc<?=$i;?>" name="rule[]" value="<?=$i;?>" />
</td>
<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 class="listlr" onclick="fr_toggle(<?=$i;?>)" id="frd<?=$i;?>" ondblclick="document.location='firewall_nat_1to1_edit.php?id=<?=$i;?>';">
<?php
......@@ -222,7 +221,7 @@ $main_buttons = array(
<?php
$source_net = pprint_address($natent['source']);
$source_cidr = strstr($source_net, '/');
echo $textss . $natent['external'] . $source_cidr . $textse;
echo $natent['external'] . $source_cidr;
?>
</td>
<td class="listr" id="frd<?=$i;?>" ondblclick="document.location='firewall_nat_1to1_edit.php?id=<?=$i;?>';">
......@@ -232,22 +231,22 @@ $main_buttons = array(
</td>
<td class="listr" id="frd<?=$i;?>" ondblclick="document.location='firewall_nat_1to1_edit.php?id=<?=$i;?>';">
<?php
echo pprint_address($natent['destination']) . $textse;
echo pprint_address($natent['destination']);
?>
</td>
<td class="listbg" ondblclick="document.location='firewall_nat_1to1_edit.php?id=<?=$i;?>';">
<?php
echo htmlspecialchars($natent['descr']) . '&nbsp;' . $textse;
echo htmlspecialchars($natent['descr']) . '&nbsp;';
?>
</td>
<td class="list nowrap" valign="middle">
<button name="move_<?=$i;?>_x"
title="<?=gettext("move selected rules before this rule");?>"
type="submit" class="btn btn-default btn-xs"><span class="glyphicon glyphicon-arrow-left"></span></button>
title="<?=gettext("move selected mapping before this rule");?>"
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.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_edit.php?dup=<?=$i;?>" class="btn btn-default btn-xs"><span class="glyphicon glyphicon-plus"></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;?>" 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;?>" 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>
</tr>
<?php
......@@ -265,21 +264,21 @@ $main_buttons = array(
<?php
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
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
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
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>
<?php
endif;
......@@ -301,7 +300,6 @@ $main_buttons = array(
</tr>
</tbody>
</table>
</div>
</form>
</div>
</section>
......
......@@ -225,35 +225,51 @@ include("head.inc");
switch (document.iform.srctype.selectedIndex) {
case 1: /* single */
document.iform.src.disabled = 0;
document.iform.srcmask.value = "";
document.iform.srcmask.disabled = 1;
//document.iform.srcmask.value = "";
//document.iform.srcmask.disabled = 1;
jQuery('#srcmask').selectpicker('val','');
jQuery('#srcmask').prop('disabled',true);
jQuery('#srcmask').selectpicker('refresh');
break;
case 2: /* network */
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;
default:
document.iform.src.value = "";
document.iform.src.disabled = 1;
document.iform.srcmask.value = "";
document.iform.srcmask.disabled = 1;
//document.iform.srcmask.value = "";
//document.iform.srcmask.disabled = 1;
jQuery('#srcmask').selectpicker('val','');
jQuery('#srcmask').prop('disabled',true);
jQuery('#srcmask').selectpicker('refresh');
break;
}
switch (document.iform.dsttype.selectedIndex) {
case 1: /* single */
document.iform.dst.disabled = 0;
document.iform.dstmask.value = "";
document.iform.dstmask.disabled = 1;
//document.iform.dstmask.value = "";
//document.iform.dstmask.disabled = 1;
jQuery('#dstmask').selectpicker('val','');
jQuery('#dstmask').prop('disabled',true);
jQuery('#dstmask').selectpicker('refresh');
break;
case 2: /* network */
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;
default:
document.iform.dst.value = "";
document.iform.dst.disabled = 1;
document.iform.dstmask.value = "";
document.iform.dstmask.disabled = 1;
//document.iform.dstmask.value = "";
//document.iform.dstmask.disabled = 1;
jQuery('#dstmask').selectpicker('val','');
jQuery('#dstmask').prop('disabled',true);
jQuery('#dstmask').selectpicker('refresh');
break;
}
}
......@@ -293,7 +309,7 @@ include("head.inc");
<tr>
<td width="22%" valign="top" class="vncellreq"><?=gettext("Interface"); ?></td>
<td width="78%" class="vtable">
<select name="interface" class="formselect">
<select name="interface" class="selectpicker" data-live-search="true">
<?php
foreach ($ifdisp as $if => $ifdesc)
if(have_ruleint_access($if))
......@@ -356,7 +372,7 @@ include("head.inc");
<tr>
<td><?=gettext("Type:"); ?>&nbsp;&nbsp;</td>
<td>
<select name="srctype" class="formselect" onchange="typesel_change()">
<select name="srctype" class="selectpicker" onchange="typesel_change()">
<?php
$sel = is_specialnet($pconfig['src']);
?>
......@@ -400,16 +416,24 @@ include("head.inc");
<tr>
<td><?=gettext("Address:"); ?>&nbsp;&nbsp;</td>
<td>
<input name="src" type="text" class="formfld" id="src" size="20" value="<?php if (!is_specialnet($pconfig['src'])) echo htmlspecialchars($pconfig['src']);?>" /> /
<select name="srcmask" class="formselect" id="srcmask">
<?php
for ($i = 31; $i > 0; $i--):
?>
<option value="<?=$i;?>" <?php if ($i == $pconfig['srcmask']) echo "selected=\"selected\""; ?>><?=$i;?></option>
<?php
endfor;
?>
</select>
<table>
<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
for ($i = 31; $i > 0; $i--):
?>
<option value="<?=$i;?>" <?php if ($i == $pconfig['srcmask']) echo "selected=\"selected\""; ?>><?=$i;?></option>
<?php
endfor;
?>
</select>
</td>
</tr>
</table>
</td>
</tr>
</table>
......@@ -430,7 +454,7 @@ include("head.inc");
<tr>
<td><?=gettext("Type:"); ?>&nbsp;&nbsp;</td>
<td>
<select name="dsttype" class="formselect" onchange="typesel_change()">
<select name="dsttype" class="selectpicker" onchange="typesel_change()">
<?php
$sel = is_specialnet($pconfig['dst']); ?>
<option value="any" <?php if (empty($pconfig['dst']) || $pconfig['dst'] == "any") { echo "selected=\"selected\""; } ?>><?=gettext("any"); ?></option>
......@@ -482,16 +506,23 @@ include("head.inc");
<tr>
<td><?=gettext("Address:"); ?>&nbsp;&nbsp;</td>
<td>
<input name="dst" type="text" autocomplete="off" class="formfldalias" id="dst" size="20" value="<?php if (!is_specialnet($pconfig['dst'])) echo htmlspecialchars($pconfig['dst']);?>" />
/
<select name="dstmask" class="formselect" id="dstmask">
<?php
for ($i = 31; $i > 0; $i--):
?>
<option value="<?=$i;?>" <?php if ($i == $pconfig['dstmask']) echo "selected=\"selected\""; ?>><?=$i;?></option>
<?php
endfor;
?>
<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']);?>" />
</td>
<td>
<select name="dstmask" class="selectpicker" id="dstmask" data-width="auto">
<?php
for ($i = 31; $i > 0; $i--):
?>
<option value="<?=$i;?>" <?php if ($i == $pconfig['dstmask']) echo "selected=\"selected\""; ?>><?=$i;?></option>
<?php
endfor;
?>
</td>
</tr>
</table>
</select>
</td>
</tr>
......@@ -516,7 +547,7 @@ include("head.inc");
<tr>
<td width="22%" valign="top" class="vncell"><?=gettext("NAT reflection"); ?></td>
<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\""; ?>>
<?=gettext("use system default"); ?>
</option>
......
......@@ -465,7 +465,6 @@ include("head.inc");
<form action="firewall_nat_edit.php" method="post" name="iform" id="iform">
<div class="table-responsive">
<table class="table table-striped table-sort">
......@@ -496,7 +495,7 @@ include("head.inc");
<tr>
<td width="22%" valign="top" class="vncellreq"><?=gettext("Interface"); ?></td>
<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
$iflist = get_configured_interface_with_descr(false, true);
......@@ -538,7 +537,7 @@ include("head.inc");
<tr>
<td width="22%" valign="top" class="vncellreq"><?=gettext("Protocol"); ?></td>
<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): ?>
<option value="<?=strtolower($proto);?>" <?php if (strtolower($proto) == $pconfig['proto']) echo "selected=\"selected\""; ?>><?=htmlspecialchars($proto);?></option>
<?php endforeach; ?>
......@@ -866,7 +865,7 @@ include("head.inc");
?>
<?php if ($has_created_time || $has_updated_time): ?>
<tr>
<td>&nbsp;</td>
<td colspan="2">&nbsp;</td>
</tr>
<tr>
<td colspan="2" valign="top" class="listtopic"><?=gettext("Rule Information");?></td>
......@@ -904,7 +903,6 @@ include("head.inc");
</td>
</tr>
</table>
</div>
</form>
</div>
</div>
......
......@@ -153,8 +153,6 @@ include("head.inc");
<div class="content-box">
<form action="firewall_nat_npt_edit.php" method="post" name="iform" id="iform">
<div class="table-responsive">
<table class="table table-striped table-sort">
......@@ -222,12 +220,20 @@ include("head.inc");
<tr>
<td><?=gettext("Address:"); ?>&nbsp;&nbsp;</td>
<td>
<input name="src" type="text" class="formfldalias" id="src" size="20" value="<?php if (!is_specialnet($pconfig['src'])) echo htmlspecialchars($pconfig['src']);?>" /> /
<select name="srcmask" class="formselect" id="srcmask">
<?php for ($i = 128; $i > 0; $i--): ?>
<option value="<?=$i;?>" <?php if ($i == $pconfig['srcmask']) echo "selected=\"selected\""; ?>><?=$i;?></option>
<?php endfor; ?>
</select>
<table>
<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--): ?>
<option value="<?=$i;?>" <?php if ($i == $pconfig['srcmask']) echo "selected=\"selected\""; ?>><?=$i;?></option>
<?php endfor; ?>
</select>
</td>
</tr>
</table>
</td>
</tr>
</table>
......@@ -250,14 +256,21 @@ include("head.inc");
<tr>
<td><?=gettext("Address:"); ?>&nbsp;&nbsp;</td>
<td>
<input name="dst" type="text" class="formfldalias" id="dst" size="20" value="<?php if (!is_specialnet($pconfig['dst'])) echo htmlspecialchars($pconfig['dst']);?>" />
/
<select name="dstmask" class="formselect" id="dstmask">
<?php
for ($i = 128; $i > 0; $i--): ?>
<option value="<?=$i;?>" <?php if ($i == $pconfig['dstmask']) echo "selected=\"selected\""; ?>><?=$i;?></option>
<?php endfor; ?>
</select>
<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']);?>" />
</td>
<td>
<select name="dstmask" class="selectpicker" id="dstmask" data-width="auto">
<?php
for ($i = 128; $i > 0; $i--): ?>
<option value="<?=$i;?>" <?php if ($i == $pconfig['dstmask']) echo "selected=\"selected\""; ?>><?=$i;?></option>
<?php endfor; ?>
</select>
</td>
</tr>
</table>
</td>
</tr>
</table>
......@@ -285,7 +298,6 @@ include("head.inc");
</table>
</div>
</form>
</div>
</section>
</div>
</div>
......
......@@ -231,7 +231,6 @@ include("head.inc");
<div class="tab-content content-box col-xs-12">
<div class="table-responsive">
<table class="table table-striped table-sort">
<thead>
<tr>
......@@ -288,7 +287,7 @@ include("head.inc");
</tr>
</tbody>
</table>
</div>
</div>
</section>
......@@ -296,7 +295,7 @@ include("head.inc");
<div class=" content-box ">
<div class="table-responsive">
<table class="table table-striped table-sort">
<thead>
<tr><th colspan="12"><?=gettext("Mappings:"); ?></th></tr>
......@@ -626,7 +625,7 @@ include("head.inc");
</tr>
</tbody>
</table>
</div>
</div>
</section>
</form>
......
......@@ -819,7 +819,7 @@ function select_clicked() {
<tfoot>
<tr>
<td colspan="3">
<td colspan="4">
<p>
<?=gettext("Additional authentication servers can be added here.");?>
</p>
......
......@@ -1048,14 +1048,13 @@ function internalca_change() {
<?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>
<tr>
<td width="15%" class="listhdrr"><?=gettext("Name");?></td>
<td width="15%" class="listhdrr"><?=gettext("Issuer");?></td>
<td width="40%" class="listhdrr"><?=gettext("Distinguished Name");?></td>
<td width="10%" class="listhdrr"><?=gettext("In Use");?></td>
<td width="10%" class="list"></td>
</tr>
</thead>
<tbody>
......@@ -1091,7 +1090,7 @@ function internalca_change() {
?>
<tr>
<td class="listlr">
<table border="0" cellpadding="0" cellspacing="0" summary="icon">
<table summary="icon">
<tr>
<td align="left" valign="middle">
<?=$certimg;?>
......@@ -1111,7 +1110,7 @@ function internalca_change() {
</td>
<td class="listr"><?=$caname;?>&nbsp;</td>
<td class="listr"><?=$subj;?>&nbsp;<br />
<table width="100%" summary="valid">
<table summary="valid">
<tr>
<td width="10%">&nbsp;</td>
<td width="20%"><?=gettext("Valid From")?>:</td>
......@@ -1146,43 +1145,39 @@ function internalca_change() {
<?php if (is_captiveportal_cert($cert['refid'])): ?>
Captive Portal<br />
<?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");?>">
<span class="glyphicon glyphicon-download"></span>
</a>
<a href="system_certmanager.php?act=key&amp;id=<?=$i;?>" class="btn btn-default btn-xs" data-toggle="tooltip" data-placement="left" title="<?=gettext("export key");?>">
<span class="glyphicon glyphicon-download"></span>
</a>
<a href="system_certmanager.php?act=p12&amp;id=<?=$i;?>" class="btn btn-default btn-xs" data-toggle="tooltip" data-placement="left" title="<?=gettext("export ca cert+user cert+user cert key in .p12 format");?>">
<span class="glyphicon glyphicon-download"></span>
</a>
<?php if (!cert_in_use($cert['refid'])): ?>
<a href="system_certmanager.php?act=del&amp;id=<?=$i;?>" class="btn btn-default btn-xs" onclick="return confirm('<?=gettext("Do you really want to delete this Certificate?");?>')" data-toggle="tooltip" data-placement="left" title="<?=gettext("delete cert");?>">
<span class="glyphicon glyphicon-remove"></span>
</a>
<?php endif; ?>
<?php if ($cert['csr']): ?>
<a href="system_certmanager.php?act=csr&amp;id=<?=$i;?>" data-toggle="tooltip" data-placement="left" title="<?=gettext("update csr");?>">
<span class="glyphicon glyphicon-edit"></span>
</a>
<?php endif; ?>
</tr>
</table>
</td>
</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");?>">
<span class="glyphicon glyphicon-download"></span>
</a>
<a href="system_certmanager.php?act=key&amp;id=<?=$i;?>" class="btn btn-default btn-xs" data-toggle="tooltip" data-placement="left" title="<?=gettext("export key");?>">
<span class="glyphicon glyphicon-download"></span>
</a>
<a href="system_certmanager.php?act=p12&amp;id=<?=$i;?>" class="btn btn-default btn-xs" data-toggle="tooltip" data-placement="left" title="<?=gettext("export ca cert+user cert+user cert key in .p12 format");?>">
<span class="glyphicon glyphicon-download"></span>
</a>
<?php if (!cert_in_use($cert['refid'])): ?>
<a href="system_certmanager.php?act=del&amp;id=<?=$i;?>" class="btn btn-default btn-xs" onclick="return confirm('<?=gettext("Do you really want to delete this Certificate?");?>')" data-toggle="tooltip" data-placement="left" title="<?=gettext("delete cert");?>">
<span class="glyphicon glyphicon-remove"></span>
</a>
<?php endif; ?>
<?php if ($cert['csr']): ?>
<a href="system_certmanager.php?act=csr&amp;id=<?=$i;?>" data-toggle="tooltip" data-placement="left" title="<?=gettext("update csr");?>">
<span class="glyphicon glyphicon-edit"></span>
</a>
<?php endif; ?>
</td>
</tr>
<?php $i++; endforeach; ?>
<tr>
<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>
</tbody>
</table>
......
......@@ -356,13 +356,13 @@ include("head.inc");
</table>
<table width="100%" border="0" cellpadding="6" cellspacing="0" id="internal" summary="internal" class="table table-striped">
<tbody>
<thead>
<tr>
<th colspan="2" valign="top" class="listtopic"><?=gettext("Internal Certificate Revocation List");?></th>
</tr>
</tbody>
</thead>
<thead>
<tbody>
<tr>
<td width="22%" valign="top" class="vncellreq"><?=gettext("Lifetime");?></td>
<td width="78%" class="vtable">
......@@ -379,7 +379,7 @@ include("head.inc");
<?=gettext("Default: 0");?>
</td>
</tr>
</thead>
</tbody>
</table>
<table width="100%" border="0" cellpadding="6" cellspacing="0" summary="save" class="table table-striped">
......@@ -431,44 +431,42 @@ include("head.inc");
<?php $crl = $thiscrl; ?>
<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>
<tr>
<th width="90%" class="listhdrr" colspan="3"><b><?php echo gettext("Currently Revoked Certificates for CRL") . ': ' . $crl['descr']; ?></b></th>
<th width="10%" class="list"></th>
<th colspan="4"><b><?php echo gettext("Currently Revoked Certificates for CRL") . ': ' . $crl['descr']; ?></b></th>
</tr>
<tr>
<th width="30%" class="listhdrr"><b><?php echo gettext("Certificate Name")?></b></th>
<th width="30%" class="listhdrr"><b><?php echo gettext("Revocation Reason")?></b></th>
<th width="30%" class="listhdrr"><b><?php echo gettext("Revoked At")?></b></th>
<th width="10%" class="list"></th>
<th><b><?php echo gettext("Certificate Name")?></b></th>
<th><b><?php echo gettext("Revocation Reason")?></b></th>
<th><b><?php echo gettext("Revoked At")?></b></th>
<th></th>
</tr>
</thead>
<tbody>
<?php /* List Certs on CRL */
if (!is_array($crl['cert']) || (count($crl['cert']) == 0)): ?>
<tr>
<td class="listlr" colspan="3">
&nbsp;&nbsp;&nbsp;&nbsp;<?php echo gettext("No Certificates Found for this CRL."); ?>
<td colspan="4">
<?php echo gettext("No Certificates Found for this CRL."); ?>
</td>
<td class="list">&nbsp;</td>
</tr>
<?php else:
foreach($crl['cert'] as $i => $cert):
$name = htmlspecialchars($cert['descr']);
?>
<tr>
<td class="listlr">
<td>
<?php echo $name; ?>
</td>
<td class="listlr">
<td>
<?php echo $openssl_crl_status[$cert["reason"]]; ?>
</td>
<td class="listlr">
<td>
<?php echo date("D M j G:i:s T Y", $cert["revoke_time"]); ?>
</td>
<td class="list">
<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">
<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 btn-xs">
<span class="glyphicon glyphicon-remove"></span>
</a>
</td>
......@@ -485,15 +483,22 @@ include("head.inc");
$ca_certs[] = $cert;
if (count($ca_certs) == 0): ?>
<tr>
<td class="listlr" colspan="3">
&nbsp;&nbsp;&nbsp;&nbsp;<?php echo gettext("No Certificates Found for this CA."); ?>
<td colspan="4">
<?php echo gettext("No Certificates Found for this CA."); ?>
</td>
<td class="list">&nbsp;</td>
</tr>
<?php else: ?>
<tr>
<th colspan="4">
<?=gettext("Revoke a Certificate"); ?>
</th>
</tr>
<tr>
<td class="listlr" colspan="3" align="center">
<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">
<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;
foreach($ca_certs as $cert):
$rowIndex++; ?>
......@@ -502,8 +507,14 @@ include("head.inc");
if ($rowIndex == 0)
echo "<option></option>"; ?>
</select>
</td>
</tr>
<tr>
<td>
<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;
foreach($openssl_crl_status as $code => $reason):
$rowIndex++; ?>
......@@ -512,12 +523,16 @@ include("head.inc");
if ($rowIndex == 0)
echo "<option></option>"; ?>
</select>
</td>
</tr>
<tr>
<td></td>
<td colspan="3" align="left">
<input name="act" type="hidden" value="addcert" />
<input name="crlref" 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"); ?>" />
</td>
<td class="list">&nbsp;</td>
</tr>
<?php endif; ?>
</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