Commit 9b5aa653 authored by Ad Schellevis's avatar Ad Schellevis

(legacy/ipsec) cleanup javascript, fix move/del behaviour in vpn_ipsec.php

parent 59bfac1c
...@@ -87,177 +87,86 @@ if ($_SERVER['REQUEST_METHOD'] === 'POST') { ...@@ -87,177 +87,86 @@ if ($_SERVER['REQUEST_METHOD'] === 'POST') {
clear_subsystem_dirty('ipsec'); clear_subsystem_dirty('ipsec');
} }
} }
} elseif (isset($_POST['submit'])) { } elseif (isset($_POST['save'])) {
$config['ipsec']['enable'] = !empty($_POST['enable']) ? true : false; $config['ipsec']['enable'] = !empty($_POST['enable']) ? true : false;
write_config(); write_config();
vpn_ipsec_configure(); vpn_ipsec_configure();
header("Location: vpn_ipsec.php"); header("Location: vpn_ipsec.php");
exit; exit;
} elseif (isset($_POST['del_x'])) { } elseif (!empty($_POST['act']) && $_POST['act'] == "delphase1" ) {
/* delete selected p1 entries */ $del_items = array();
if (isset($_POST['p1entry']) && count($_POST['p1entry'])) { if (isset($_POST['id']) && isset($config['ipsec']['phase1'][$_POST['id']])){
foreach ($_POST['p1entry'] as $p1entrydel) { $del_items[] = $_POST['id'];
} elseif (empty($_POST['id']) && isset($_POST['p1entry']) && count($_POST['p1entry'])) {
$del_items = $_POST['p1entry'];
}
foreach ($del_items as $p1entrydel) {
/* remove static route if interface is not WAN */
if ($a_phase1[$p1entrydel]['interface'] <> "wan") {
mwexec('/sbin/route delete -host ' . escapeshellarg($a_phase1[$p1entrydel]['remote-gateway']));
}
/* remove all phase2 entries that match the ikeid */
$ikeid = $a_phase1[$p1entrydel]['ikeid'];
foreach ($a_phase2 as $p2index => $ph2tmp) {
if ($ph2tmp['ikeid'] == $ikeid) {
unset($a_phase2[$p2index]);
}
}
unset($config['ipsec']['phase1'][$p1entrydel]); unset($config['ipsec']['phase1'][$p1entrydel]);
} }
if (write_config()) { if (write_config()) {
mark_subsystem_dirty('ipsec'); mark_subsystem_dirty('ipsec');
} }
header("Location: vpn_ipsec.php"); header("Location: vpn_ipsec.php");
exit; exit;
} elseif (!empty($_POST['act']) && $_POST['act'] == "delphase2" ) {
if (isset($_POST['id']) && isset($config['ipsec']['phase2'][$_POST['id']])){
unset($config['ipsec']['phase2'][$_POST['id']]);
} elseif (empty($_POST['id']) && isset($_POST['p2entry']) && count($_POST['p2entry'])) {
foreach ($_POST['p2entry'] as $p1entrydel) {
unset($config['ipsec']['phase2'][$p1entrydel]);
} }
} elseif (isset($_POST['delp2_x'])) {
/* delete selected p2 entries */
if (isset($_POST['p2entry']) && count($_POST['p2entry'])) {
foreach ($_POST['p2entry'] as $p2entrydel) {
unset($config['ipsec']['phase2'][$p2entrydel]);
} }
if (write_config()) { if (write_config()) {
mark_subsystem_dirty('ipsec'); mark_subsystem_dirty('ipsec');
} }
header("Location: vpn_ipsec.php"); header("Location: vpn_ipsec.php");
exit; exit;
} } elseif (!empty($_POST['act']) && $_POST['act'] == "movep1" ) {
// move phase 1 records
if (isset($_POST['p1entry']) && count($_POST['p1entry']) > 0) {
// if rule not set/found, move to end
if (!isset($_POST['id']) || !isset($a_phase1[$_POST['id']])) {
$id = count($a_phase1);
} else { } else {
// move, delete, toggle items by id. $id = $_POST['id'];
//
/* yuck - IE won't send value attributes for image buttons,
while Mozilla does - so we use .x/.y to find move button clicks instead... */
unset($delbtn, $delbtnp2, $movebtn, $movebtnp2, $togglebtn, $togglebtnp2);
foreach ($_POST as $pn => $pd) {
if (preg_match("/del_(\d+)_x/", $pn, $matches)) {
$delbtn = $matches[1];
} elseif (preg_match("/delp2_(\d+)_x/", $pn, $matches)) {
$delbtnp2 = $matches[1];
} elseif (preg_match("/move_(\d+)_x/", $pn, $matches)) {
$movebtn = $matches[1];
} elseif (preg_match("/movep2_(\d+)_x/", $pn, $matches)) {
$movebtnp2 = $matches[1];
} elseif (preg_match("/toggle_(\d+)_x/", $pn, $matches)) {
$togglebtn = $matches[1];
} elseif (preg_match("/togglep2_(\d+)_x/", $pn, $matches)) {
$togglebtnp2 = $matches[1];
}
}
$save = 1;
/* move selected p1 entries before this */
if (isset($movebtn) && isset($_POST['p1entry']) && count($_POST['p1entry'])) {
$a_phase1_new = array();
/* copy all p1 entries < $movebtn and not selected */
for ($i = 0; $i < $movebtn; $i++) {
if (!in_array($i, $_POST['p1entry'])) {
$a_phase1_new[] = $a_phase1[$i];
}
}
/* copy all selected p1 entries */
for ($i = 0; $i < count($a_phase1); $i++) {
if ($i == $movebtn) {
continue;
}
if (in_array($i, $_POST['p1entry'])) {
$a_phase1_new[] = $a_phase1[$i];
} }
$a_phase1 = legacy_move_config_list_items($a_phase1, $id, $_POST['p1entry']);
} }
if (write_config()) {
/* copy $movebtn p1 entry */ mark_subsystem_dirty('ipsec');
if ($movebtn < count($a_phase1)) {
$a_phase1_new[] = $a_phase1[$movebtn];
}
/* copy all p1 entries > $movebtn and not selected */
for ($i = $movebtn+1; $i < count($a_phase1); $i++) {
if (!in_array($i, $_POST['p1entry'])) {
$a_phase1_new[] = $a_phase1[$i];
}
}
if (count($a_phase1_new) > 0) {
$a_phase1 = $a_phase1_new;
}
} elseif (isset($movebtnp2) && isset($_POST['p2entry']) && count($_POST['p2entry'])) {
/* move selected p2 entries before this */
$a_phase2_new = array();
/* copy all p2 entries < $movebtnp2 and not selected */
for ($i = 0; $i < $movebtnp2; $i++) {
if (!in_array($i, $_POST['p2entry'])) {
$a_phase2_new[] = $a_phase2[$i];
}
}
/* copy all selected p2 entries */
for ($i = 0; $i < count($a_phase2); $i++) {
if ($i == $movebtnp2) {
continue;
}
if (in_array($i, $_POST['p2entry'])) {
$a_phase2_new[] = $a_phase2[$i];
}
}
/* copy $movebtnp2 p2 entry */
if ($movebtnp2 < count($a_phase2)) {
$a_phase2_new[] = $a_phase2[$movebtnp2];
}
/* copy all p2 entries > $movebtnp2 and not selected */
for ($i = $movebtnp2+1; $i < count($a_phase2); $i++) {
if (!in_array($i, $_POST['p2entry'])) {
$a_phase2_new[] = $a_phase2[$i];
}
}
if (count($a_phase2_new) > 0) {
$a_phase2 = $a_phase2_new;
}
} elseif (isset($togglebtn)) {
if (isset($a_phase1[$togglebtn]['disabled'])) {
unset($a_phase1[$togglebtn]['disabled']);
} else {
$a_phase1[$togglebtn]['disabled'] = true;
} }
header("Location: vpn_ipsec.php");
} elseif (isset($togglebtnp2)) { exit;
if (isset($a_phase2[$togglebtnp2]['disabled'])) { } elseif (!empty($_POST['act']) && $_POST['act'] == "movep2" ) {
unset($a_phase2[$togglebtnp2]['disabled']); // move phase 2 records
if (isset($_POST['p2entry']) && count($_POST['p2entry']) > 0) {
// if rule not set/found, move to end
if (!isset($_POST['id']) || !isset($a_phase2[$_POST['id']])) {
$id = count($a_phase2);
} else { } else {
$a_phase2[$togglebtnp2]['disabled'] = true; $id = $_POST['id'];
}
} elseif (isset($delbtn)) {
/* remove static route if interface is not WAN */
if ($a_phase1[$delbtn]['interface'] <> "wan") {
mwexec("/sbin/route delete -host {$a_phase1[$delbtn]['remote-gateway']}");
}
/* remove all phase2 entries that match the ikeid */
$ikeid = $a_phase1[$delbtn]['ikeid'];
foreach ($a_phase2 as $p2index => $ph2tmp) {
if ($ph2tmp['ikeid'] == $ikeid) {
unset($a_phase2[$p2index]);
} }
$a_phase2 = legacy_move_config_list_items($a_phase2, $id, $_POST['p2entry']);
} }
unset($a_phase1[$delbtn]);
} elseif (isset($delbtnp2)) {
unset($a_phase2[$delbtnp2]);
} else {
$save = 0;
}
if ($save === 1) {
if (write_config()) { if (write_config()) {
mark_subsystem_dirty('ipsec'); mark_subsystem_dirty('ipsec');
} }
}
header("Location: vpn_ipsec.php"); header("Location: vpn_ipsec.php");
exit; exit;
} }
} }
// form data // form data
...@@ -268,37 +177,132 @@ legacy_html_escape_form_data($pconfig); ...@@ -268,37 +177,132 @@ legacy_html_escape_form_data($pconfig);
$shortcut_section = 'ipsec'; $shortcut_section = 'ipsec';
include("head.inc"); include("head.inc");
?> ?>
<body> <body>
<?php include("fbegin.inc"); ?>
<script type="text/javascript"> <script type="text/javascript">
//<![CDATA[ $( document ).ready(function() {
function show_phase2(id, buttonid) { // link move buttons (phase 1 and phase 2)
document.getElementById(buttonid).innerHTML=''; $(".act_move").click(function(event){
document.getElementById(id).style.display = "block"; event.preventDefault();
var visible = id + '-visible'; $("#id").val($(this).data("id"));
document.getElementById(visible).value = "1"; $("#action").val($(this).data("act"));
} $("#iform").submit();
//]]> });
// link delete phase 1 buttons
$(".act_delete_p1").click(function(event){
event.preventDefault();
var id = $(this).data("id");
if (id != 'x') {
// delete single
BootstrapDialog.show({
type:BootstrapDialog.TYPE_DANGER,
title: "<?= gettext("IPSEC");?>",
message: "<?=gettext("Do you really want to delete this phase1 and all associated phase2 entries?"); ?>",
buttons: [{
label: "<?= gettext("No");?>",
action: function(dialogRef) {
dialogRef.close();
}}, {
label: "<?= gettext("Yes");?>",
action: function(dialogRef) {
$("#id").val(id);
$("#action").val("delphase1");
$("#iform").submit()
}
}]
});
} else {
// delete selected
BootstrapDialog.show({
type:BootstrapDialog.TYPE_DANGER,
title: "<?= gettext("IPSEC");?>",
message: "<?=gettext("Do you really want to delete the selected phase1 entries?");?>",
buttons: [{
label: "<?= gettext("No");?>",
action: function(dialogRef) {
dialogRef.close();
}}, {
label: "<?= gettext("Yes");?>",
action: function(dialogRef) {
$("#id").val("");
$("#action").val("delphase1");
$("#iform").submit()
}
}]
});
}
});
// link delete phase 2 buttons
$(".act_delete_p2").click(function(event){
event.preventDefault();
var id = $(this).data("id");
if (id != 'x') {
// delete single
BootstrapDialog.show({
type:BootstrapDialog.TYPE_DANGER,
title: "<?= gettext("IPSEC");?>",
message: "<?=gettext("Do you really want to delete this phase2 entry?"); ?>",
buttons: [{
label: "<?= gettext("No");?>",
action: function(dialogRef) {
dialogRef.close();
}}, {
label: "<?= gettext("Yes");?>",
action: function(dialogRef) {
$("#id").val(id);
$("#action").val("delphase2");
$("#iform").submit()
}
}]
});
} else {
// delete selected
BootstrapDialog.show({
type:BootstrapDialog.TYPE_DANGER,
title: "<?= gettext("IPSEC");?>",
message: "<?=gettext("Do you really want to delete the selected phase2 entries?");?>",
buttons: [{
label: "<?= gettext("No");?>",
action: function(dialogRef) {
dialogRef.close();
}}, {
label: "<?= gettext("Yes");?>",
action: function(dialogRef) {
$("#id").val("");
$("#action").val("delphase2");
$("#iform").submit()
}
}]
});
}
});
// show phase 2 entries
$(".act_show_p2").click(function(){
$("#tdph2-"+$(this).data("id")).show();
$("#shph2but-"+$(this).data("id")).hide();
});
});
</script> </script>
<form action="vpn_ipsec.php" method="post"> <?php include("fbegin.inc"); ?>
<section class="page-content-main"> <section class="page-content-main">
<div class="container-fluid"> <div class="container-fluid">
<div class="row"> <div class="row">
<?php <?php
if (isset($savemsg)) { if (isset($savemsg)) {
print_info_box($savemsg); print_info_box($savemsg);
} }
if ($pconfig['enable'] && is_subsystem_dirty('ipsec')) { if ($pconfig['enable'] && is_subsystem_dirty('ipsec')) {
print_info_box_apply(gettext("The IPsec tunnel configuration has been changed") . ".<br />" . gettext("You must apply the changes in order for them to take effect.")); print_info_box_apply(gettext("The IPsec tunnel configuration has been changed") . ".<br />" . gettext("You must apply the changes in order for them to take effect."));
} }?>
?>
<section class="col-xs-12"> <section class="col-xs-12">
<form method="post" name="iform" id="iform">
<input type="hidden" id="id" name="id" value="" />
<input type="hidden" id="action" name="act" value="" />
<div class="tab-content content-box col-xs-12"> <div class="tab-content content-box col-xs-12">
<div class="table-responsive"> <div class="table-responsive">
<table class="table table-striped"> <table class="table table-striped">
...@@ -321,8 +325,7 @@ function show_phase2(id, buttonid) { ...@@ -321,8 +325,7 @@ function show_phase2(id, buttonid) {
$i = 0; $i = 0;
foreach ($pconfig['phase1'] as $ph1ent) : foreach ($pconfig['phase1'] as $ph1ent) :
?> ?>
<tr id="fr<?=$i; <tr>
?>" ondblclick="document.location='vpn_ipsec_phase1.php?p1index=<?=$i;?>'">
<td> <td>
<input type="checkbox" name="p1entry[]" value="<?=$i;?>"/> <input type="checkbox" name="p1entry[]" value="<?=$i;?>"/>
</td> </td>
...@@ -391,25 +394,24 @@ if (!empty($ph1ent['encryption-algorithm']['keylen'])) { ...@@ -391,25 +394,24 @@ if (!empty($ph1ent['encryption-algorithm']['keylen'])) {
<?=$ph1ent['descr'];?>&nbsp; <?=$ph1ent['descr'];?>&nbsp;
</td> </td>
<td> <td>
<button name="move_<?=$i; ?>_x" type="submit" class="btn btn-default btn-xs" <button data-id="<?=$i; ?>" data-act="movep1" type="submit" class="act_move btn btn-default btn-xs"
title="<?=gettext("move selected entries before this");?>" data-toggle="tooltip"> title="<?=gettext("move selected entries before this");?>" data-toggle="tooltip" data-placement="left">
<span class="glyphicon glyphicon-arrow-left"></span> <span class="glyphicon glyphicon-arrow-left"></span>
</button> </button>
<a href="vpn_ipsec_phase1.php?p1index=<?=$i; ?>" class="btn btn-default btn-xs" alt="edit" <a href="vpn_ipsec_phase1.php?p1index=<?=$i; ?>" class="btn btn-default btn-xs" alt="edit"
title="<?=gettext("edit phase1 entry"); ?>" data-toggle="tooltip"> title="<?=gettext("edit phase1 entry"); ?>" data-toggle="tooltip" data-placement="left">
<span class="glyphicon glyphicon-pencil"></span> <span class="glyphicon glyphicon-pencil"></span>
</a><br/> </a><br/>
<button name="del_<?=$i;?>_x" <button data-id="<?=$i; ?>"
title="<?=gettext("delete phase1 entry");?>" data-toggle="tooltip" title="<?=gettext("delete phase1 entry");?>" data-toggle="tooltip" data-placement="left"
type="submit" type="submit"
onclick="return confirm('<?=gettext("Do you really want to delete this phase1 and all associated phase2 entries?"); ?>')" class="act_delete_p1 btn btn-default btn-xs">
class="btn btn-default btn-xs"> <span class="glyphicon glyphicon-remove"></span>
<span class="fa fa-trash text-muted"></span>
</button> </button>
<?php if (!isset($ph1ent['mobile'])) : <?php if (!isset($ph1ent['mobile'])) :
?> ?>
<a href="vpn_ipsec_phase1.php?dup=<?=$i; ?>" class="btn btn-default btn-xs" alt="add" <a href="vpn_ipsec_phase1.php?dup=<?=$i; ?>" class="btn btn-default btn-xs" alt="add"
title="<?=gettext("clone phase1 entry"); ?>" data-toggle="tooltip"> title="<?=gettext("clone phase1 entry"); ?>" data-toggle="tooltip" data-placement="left">
<span class="fa fa-clone text-muted"></span> <span class="fa fa-clone text-muted"></span>
</a> </a>
<?php endif; <?php endif;
...@@ -429,7 +431,7 @@ foreach ($pconfig['phase2'] as $ph2ent) { ...@@ -429,7 +431,7 @@ foreach ($pconfig['phase2'] as $ph2ent) {
$fr_prefix = "frp2{$i}"; $fr_prefix = "frp2{$i}";
?> ?>
<div id="shph2but-<?=$i?>"> <div id="shph2but-<?=$i?>">
<button class="btn btn-xs" type="button" onclick="show_phase2('tdph2-<?=$i?>','shph2but-<?=$i?>')"> <button class="act_show_p2 btn btn-xs" type="button" data-id="<?=$i?>">
<i class="fa fa-plus"></i> <?php printf(gettext("Show %s Phase-2 entries"), $phase2count); ?> <i class="fa fa-plus"></i> <?php printf(gettext("Show %s Phase-2 entries"), $phase2count); ?>
</button> </button>
</div> </div>
...@@ -457,8 +459,7 @@ foreach ($pconfig['phase2'] as $ph2index => $ph2ent) : ...@@ -457,8 +459,7 @@ foreach ($pconfig['phase2'] as $ph2index => $ph2ent) :
} }
?> ?>
<tr id="<?=$fr_prefix . $j; <tr>
?>" ondblclick="document.location='vpn_ipsec_phase2.php?p2index=<?=$ph2ent['uniqid'];?>'">
<td> <td>
<input type="checkbox" name="p2entry[]" value="<?=$ph2index;?>"/> <input type="checkbox" name="p2entry[]" value="<?=$ph2index;?>"/>
</td> </td>
...@@ -516,26 +517,25 @@ if (!empty($ph2ent['hash-algorithm-option']) && is_array($ph2ent['hash-algorithm ...@@ -516,26 +517,25 @@ if (!empty($ph2ent['hash-algorithm-option']) && is_array($ph2ent['hash-algorithm
?> ?>
</td> </td>
<td> <td>
<button name="movep2_<?=$j;?>_x" <button data-id="<?=$j; ?>" data-act="movep2"
title="<?=gettext("move selected entries before this");?>" data-toggle="tooltip" title="<?=gettext("move selected entries before this");?>" data-toggle="tooltip" data-placement="left"
type="submit" type="submit"
class="btn btn-default btn-xs"> class="act_move btn btn-default btn-xs">
<span class="glyphicon glyphicon-arrow-left"></span> <span class="glyphicon glyphicon-arrow-left"></span>
</button> </button>
<a href="vpn_ipsec_phase2.php?p2index=<?=$ph2ent['uniqid']; ?>" <a href="vpn_ipsec_phase2.php?p2index=<?=$ph2ent['uniqid']; ?>"
title="<?=gettext("edit phase 2 entry"); ?>" data-toggle="tooltip" title="<?=gettext("edit phase 2 entry"); ?>" data-toggle="tooltip" data-placement="left"
alt="edit" class="btn btn-default btn-xs"> alt="edit" class="btn btn-default btn-xs">
<span class="glyphicon glyphicon-pencil"></span> <span class="glyphicon glyphicon-pencil"></span>
</a> </a>
<button name="delp2_<?=$ph2index; ?>_x" <button data-id="<?=$ph2index; ?>"
title="<?=gettext("delete phase 2 entry");?>" data-toggle="tooltip" title="<?=gettext("delete phase 2 entry");?>" data-toggle="tooltip" data-placement="left"
type="submit" type="submit"
onclick="return confirm('<?=gettext("Do you really want to delete this phase2 entry?"); ?>')" class="act_delete_p2 btn btn-default btn-xs">
class="btn btn-default btn-xs"> <span class="glyphicon glyphicon-remove"></span>
<span class="fa fa-trash text-muted"><span>
</button> </button>
<a href="vpn_ipsec_phase2.php?dup=<?=$ph2ent['uniqid']; ?>" <a href="vpn_ipsec_phase2.php?dup=<?=$ph2ent['uniqid']; ?>"
title="<?=gettext("clone phase 2 entry"); ?>" data-toggle="tooltip" title="<?=gettext("clone phase 2 entry"); ?>" data-toggle="tooltip" data-placement="left"
alt="add" class="btn btn-default btn-xs"> alt="add" class="btn btn-default btn-xs">
<span class="fa fa-clone text-muted"></span> <span class="fa fa-clone text-muted"></span>
</a> </a>
...@@ -551,24 +551,23 @@ endforeach; ...@@ -551,24 +551,23 @@ endforeach;
<?php if ($j > 0) : <?php if ($j > 0) :
?> ?>
<button name="movep2_<?=$j;?>_x" type="submit" <button data-id="<?=$j+1; ?>" data-act="movep2" type="submit"
title="<?=gettext("move selected phase 2 entries to end");?>" data-toggle="tooltip" title="<?=gettext("move selected phase 2 entries to end");?>" data-toggle="tooltip" data-placement="left"
class="btn btn-default btn-xs"> class="act_move btn btn-default btn-xs">
<span class="glyphicon glyphicon-arrow-down"></span> <span class="glyphicon glyphicon-arrow-down"></span>
</button> </button>
<?php endif; <?php endif;
?> ?>
<?php if ($j > 0) : <?php if ($j > 0) :
?> ?>
<button name="delp2_x" type="submit" title="<?=gettext("delete selected phase 2 entries");?>" data-toggle="tooltip" <button data-id="x" type="submit" title="<?=gettext("delete selected phase 2 entries");?>" data-toggle="tooltip" data-placement="left"
onclick="return confirm('<?=gettext("Do you really want to delete the selected phase2 entries?");?>')" class="act_delete_p2 btn btn-default btn-xs">
class="btn btn-default btn-xs"> <span class="glyphicon glyphicon-remove"></span>
<span class="fa fa-trash text-muted"></span>
</button> </button>
<?php endif; <?php endif;
?> ?>
<a href="vpn_ipsec_phase2.php?ikeid=<?=$ph1ent['ikeid']; ?><?= isset($ph1ent['mobile'])?"&amp;mobile=true":"";?>" class="btn btn-default btn-xs" <a href="vpn_ipsec_phase2.php?ikeid=<?=$ph1ent['ikeid']; ?><?= isset($ph1ent['mobile'])?"&amp;mobile=true":"";?>" class="btn btn-default btn-xs"
title="<?=gettext("add phase 2 entry"); ?>" data-toggle="tooltip"> title="<?=gettext("add phase 2 entry"); ?>" data-toggle="tooltip" data-placement="left">
<span alt="add" class="glyphicon glyphicon-plus"></span> <span alt="add" class="glyphicon glyphicon-plus"></span>
</a> </a>
</td> </td>
...@@ -585,23 +584,23 @@ endforeach; // $a_phase1 as $ph1ent ...@@ -585,23 +584,23 @@ endforeach; // $a_phase1 as $ph1ent
<tr> <tr>
<td colspan="8"> </td> <td colspan="8"> </td>
<td> <td>
<button name="move_<?=$i;?>_x" <button
type="submit" type="submit"
data-id="<?=$i;?>"
data-act="movep1"
title="<?=gettext("move selected phase 1 entries to end");?>" title="<?=gettext("move selected phase 1 entries to end");?>"
data-toggle="tooltip" data-toggle="tooltip" data-placement="left"
class="btn btn-default btn-xs"> class="act_move btn btn-default btn-xs">
<span class="glyphicon glyphicon-arrow-down"></span> <span class="glyphicon glyphicon-arrow-down"></span>
</button> </button>
<button <button data-id=""
name="del_x"
type="submit" type="submit"
title="<?=gettext("delete selected phase 1 entries");?>" title="<?=gettext("delete selected phase 1 entries");?>"
data-toggle="tooltip" data-toggle="tooltip" data-placement="left"
onclick="return confirm('<?=gettext("Do you really want to delete the selected phase1 entries?");?>')" class="act_delete_p1 btn btn-default btn-xs">
class="btn btn-default btn-xs"> <span class="glyphicon glyphicon-remove"></span>
<span class="fa fa-trash text-muted"></span>
</button> </button>
<a href="vpn_ipsec_phase1.php" title="<?=gettext("add new phase 1 entry");?>" data-toggle="tooltip" <a href="vpn_ipsec_phase1.php" title="<?=gettext("add new phase 1 entry");?>" data-toggle="tooltip" data-placement="left"
alt="add" class="btn btn-default btn-xs"> alt="add" class="btn btn-default btn-xs">
<span class="glyphicon glyphicon-plus"></span> <span class="glyphicon glyphicon-plus"></span>
</a> </a>
...@@ -615,16 +614,17 @@ endforeach; // $a_phase1 as $ph1ent ...@@ -615,16 +614,17 @@ endforeach; // $a_phase1 as $ph1ent
</tr> </tr>
<tr> <tr>
<td colspan=9> <td colspan=9>
<input name="submit" type="submit" class="btn btn-primary" value="<?=gettext("Save"); ?>" /> <input type="submit" name="save" class="btn btn-primary" value="<?=gettext("Save"); ?>" />
</td> </td>
</tr> </tr>
</tbody> </tbody>
</table> </table>
</div> </div>
</div> </div>
</form>
</section> </section>
</div> </div>
</div> </div>
</section> </section>
</form>
<?php include("foot.inc"); <?php include("foot.inc");
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