Commit 4b4e32b7 authored by Ad Schellevis's avatar Ad Schellevis

(legacy, ipsec) fix spacing

parent 9b5aa653
......@@ -323,8 +323,7 @@ $( document ).ready(function() {
<tbody>
<?php
$i = 0;
foreach ($pconfig['phase1'] as $ph1ent) :
?>
foreach ($pconfig['phase1'] as $ph1ent) :?>
<tr>
<td>
<input type="checkbox" name="p1entry[]" value="<?=$i;?>"/>
......@@ -340,7 +339,7 @@ foreach ($pconfig['phase1'] as $ph1ent) :
</td>
<td>
<?php
if (!empty($ph1ent['interface'])) {
if (!empty($ph1ent['interface'])) {
$iflabels = get_configured_interface_with_descr();
$carplist = get_configured_carp_interface_list();
......@@ -363,10 +362,9 @@ if (!empty($ph1ent['interface'])) {
$iflabels[$name] = "GW Group {$name}";
}
$if = $iflabels[$ph1ent['interface']];
} else {
} else {
$if = "WAN";
}
?>
}?>
<?=htmlspecialchars($if);?>
<?=!isset($ph1ent['mobile'])?
$ph1ent['remote-gateway']
......@@ -374,18 +372,19 @@ if (!empty($ph1ent['interface'])) {
"<strong>" . gettext("Mobile Client") . "</strong>";
?>
</td>
<td><?=$ph1ent['mode'];?></td>
<td>
<?=htmlspecialchars($ph1ent['mode']);?>
</td>
<td>
<?=$p1_ealgos[$ph1ent['encryption-algorithm']['name']]['name'];?>
<?php
if (!empty($ph1ent['encryption-algorithm']['keylen'])) {
if (!empty($ph1ent['encryption-algorithm']['keylen'])) {
if ($ph1ent['encryption-algorithm']['keylen']=="auto") {
echo " (" . gettext("auto") . ")";
} else {
echo " ({$ph1ent['encryption-algorithm']['keylen']} " . gettext("bits") . ")";
}
}
?>
}?>
</td>
<td>
<?=strtoupper($ph1ent['hash-algorithm']);?>
......@@ -414,22 +413,20 @@ if (!empty($ph1ent['encryption-algorithm']['keylen'])) {
title="<?=gettext("clone phase1 entry"); ?>" data-toggle="tooltip" data-placement="left">
<span class="fa fa-clone text-muted"></span>
</a>
<?php endif;
?>
<?php
endif;?>
</td>
</tr>
<tr>
<td colspan="9">
<?php
$phase2count=0;
foreach ($pconfig['phase2'] as $ph2ent) {
foreach ($pconfig['phase2'] as $ph2ent) {
if ($ph2ent['ikeid'] != $ph1ent['ikeid']) {
continue;
}
$phase2count++;
}
$fr_prefix = "frp2{$i}";
?>
}?>
<div id="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); ?>
......@@ -453,12 +450,10 @@ foreach ($pconfig['phase2'] as $ph2ent) {
<tbody>
<?php
$j = 0;
foreach ($pconfig['phase2'] as $ph2index => $ph2ent) :
foreach ($pconfig['phase2'] as $ph2index => $ph2ent) :
if ($ph2ent['ikeid'] != $ph1ent['ikeid']) {
continue;
}
?>
}?>
<tr>
<td>
<input type="checkbox" name="p2entry[]" value="<?=$ph2index;?>"/>
......@@ -472,24 +467,23 @@ foreach ($pconfig['phase2'] as $ph2index => $ph2ent) :
</td>
<td> <?=$ph2ent['mode'];?> </td>
<?php
if (($ph2ent['mode'] == "tunnel") || ($ph2ent['mode'] == "tunnel6")) :
?>
<td>
if (($ph2ent['mode'] == "tunnel") || ($ph2ent['mode'] == "tunnel6")) :?>
<td>
<?=ipsec_idinfo_to_text($ph2ent['localid']); ?>
</td>
<td>
</td>
<td>
<?=ipsec_idinfo_to_text($ph2ent['remoteid']); ?>
</td>
<?php else :
?> <td>&nbsp;</td>
</td>
<?php
else :?>
<td>&nbsp;</td>
<td>&nbsp;</td>
<?php
endif;
?>
endif;?>
<td><?=$p2_protos[$ph2ent['protocol']];?> </td>
<td>
<?php
foreach ($ph2ent['encryption-algorithm-option'] as $k => $ph2ea) {
foreach ($ph2ent['encryption-algorithm-option'] as $k => $ph2ea) {
if ($k > 0) {
echo ", ";
}
......@@ -501,20 +495,18 @@ foreach ($ph2ent['encryption-algorithm-option'] as $k => $ph2ea) {
echo " ({$ph2ea['keylen']} " . gettext("bits") . ")";
}
}
}
?>
}?>
</td>
<td>
<?php
if (!empty($ph2ent['hash-algorithm-option']) && is_array($ph2ent['hash-algorithm-option'])) {
if (!empty($ph2ent['hash-algorithm-option']) && is_array($ph2ent['hash-algorithm-option'])) {
foreach ($ph2ent['hash-algorithm-option'] as $k => $ph2ha) {
if ($k) {
echo ", ";
}
echo $p2_halgos[$ph2ha];
}
}
?>
}?>
</td>
<td>
<button data-id="<?=$j; ?>" data-act="movep2"
......@@ -543,29 +535,24 @@ if (!empty($ph2ent['hash-algorithm-option']) && is_array($ph2ent['hash-algorithm
</tr>
<?php
$j++;
endforeach;
?>
endforeach;?>
<tr>
<td colspan="8"></td>
<td>
<?php if ($j > 0) :
?>
<?php
if ($j > 0) :?>
<button data-id="<?=$j+1; ?>" data-act="movep2" type="submit"
title="<?=gettext("move selected phase 2 entries to end");?>" data-toggle="tooltip" data-placement="left"
class="act_move btn btn-default btn-xs">
<span class="glyphicon glyphicon-arrow-down"></span>
</button>
<?php endif;
?>
<?php if ($j > 0) :
?>
<button data-id="x" type="submit" title="<?=gettext("delete selected phase 2 entries");?>" data-toggle="tooltip" data-placement="left"
class="act_delete_p2 btn btn-default btn-xs">
<span class="glyphicon glyphicon-remove"></span>
</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"
title="<?=gettext("add phase 2 entry"); ?>" data-toggle="tooltip" data-placement="left">
<span alt="add" class="glyphicon glyphicon-plus"></span>
......@@ -579,8 +566,7 @@ endforeach;
</tr>
<?php
$i++;
endforeach; // $a_phase1 as $ph1ent
?>
endforeach;?>
<tr>
<td colspan="8"> </td>
<td>
......@@ -626,5 +612,4 @@ endforeach; // $a_phase1 as $ph1ent
</div>
</div>
</section>
<?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