Move "Add P2" button to left side to facilitate use of smaller screens

Fix HTML indenting
This commit is contained in:
Stephen Beaver 2015-11-06 11:50:55 -05:00
parent 0164e6d133
commit c5b3bb016d

View File

@ -364,8 +364,8 @@ display_top_tabs($tab_array);
else
echo $if."<br /><strong>" . gettext("Mobile Client") . "</strong>";
?>
</td>
<td onclick="fr_toggle(<?=$i?>)" id="frd<?=$i?>">
</td>
<td onclick="fr_toggle(<?=$i?>)" id="frd<?=$i?>">
<?=$spans?>
<?php
if (empty($ph1ent['iketype']) || $ph1ent['iketype'] == "ikev1")
@ -411,8 +411,8 @@ display_top_tabs($tab_array);
else
$tdph2_visible = 0;
?>
<input type="hidden" name="tdph2-<?=$i?>-visible" id="tdph2-<?=$i?>-visible" value="<?=$tdph2_visible?>" />
<div id="shph2but-<?=$i?>" <?=($tdph2_visible == '1' ? 'style="display:none"' : '')?>>
<input type="hidden" name="tdph2-<?=$i?>-visible" id="tdph2-<?=$i?>-visible" value="<?=$tdph2_visible?>" />
<div id="shph2but-<?=$i?>" <?=($tdph2_visible == '1' ? 'style="display:none"' : '')?>>
<?php
$phase2count=0;
@ -424,24 +424,24 @@ display_top_tabs($tab_array);
$fr_prefix = "frp2{$i}";
$fr_header = $fr_prefix . "header";
?>
<input type="button" onclick="show_phase2('tdph2-<?=$i?>','shph2but-<?=$i?>')" value="+" /> - <?php printf(gettext("Show %s Phase-2 entries"), $phase2count); ?>
</div>
<div id="tdph2-<?=$i?>" <?=($tdph2_visible != '1' ? 'style="display:none"' : '')?>>
<table class="table table-striped table-hover">
<thead>
<tr>
<th>&nbsp;</th>
<th>&nbsp;</th>
<th><?=gettext("Mode"); ?></th>
<th><?=gettext("Local Subnet"); ?></th>
<th><?=gettext("Remote Subnet"); ?></th>
<th><?=gettext("P2 Protocol"); ?></th>
<th><?=gettext("P2 Transforms"); ?></th>
<th><?=gettext("P2 Auth Methods"); ?></th>
<th><?=gettext("P2 actions")?></th>
</tr>
</thead>
<tbody class="p2-entries">
<input type="button" onclick="show_phase2('tdph2-<?=$i?>','shph2but-<?=$i?>')" value="+" /> - <?php printf(gettext("Show %s Phase-2 entries"), $phase2count); ?>
</div>
<div id="tdph2-<?=$i?>" <?=($tdph2_visible != '1' ? 'style="display:none"' : '')?>>
<table class="table table-striped table-hover">
<thead>
<tr>
<th>&nbsp;</th>
<th>&nbsp;</th>
<th><?=gettext("Mode"); ?></th>
<th><?=gettext("Local Subnet"); ?></th>
<th><?=gettext("Remote Subnet"); ?></th>
<th><?=gettext("P2 Protocol"); ?></th>
<th><?=gettext("P2 Transforms"); ?></th>
<th><?=gettext("P2 Auth Methods"); ?></th>
<th><?=gettext("P2 actions")?></th>
</tr>
</thead>
<tbody class="p2-entries">
<?php $j = 0; foreach ($a_phase2 as $ph2index => $ph2ent): ?>
<?php
if ($ph2ent['ikeid'] != $ph1ent['ikeid'])
@ -457,30 +457,30 @@ display_top_tabs($tab_array);
$iconfn .= "_d";
?>
<tr id="<?=$fr_prefix . $j?>" ondblclick="document.location='vpn_ipsec_phase2.php?p2index=<?=$ph2ent['uniqid']?>'" class="<?= $entryStatus ?>">
<td>
<input type="checkbox" id="<?=$fr_c?>" name="p2entry[]" value="<?=$ph2index?>" onclick="fr_bgcolor('<?=$j?>', '<?=$fr_prefix?>')" />
</td>
<td>
<button value="togglep2_<?=$ph2index?>" name="togglep2_<?=$ph2index?>" title="<?=gettext("click to toggle enabled/disabled status")?>" class="btn btn-xs btn-default" type="submit"><?= ($entryStatus == 'disabled'? 'enable' : 'disable') ?></button>
</td>
<td id="<?=$fr_d?>" onclick="fr_toggle('<?=$j?>', '<?=$fr_prefix?>')">
<?=$ph2ent['mode']?>
</td>
<tr id="<?=$fr_prefix . $j?>" ondblclick="document.location='vpn_ipsec_phase2.php?p2index=<?=$ph2ent['uniqid']?>'" class="<?= $entryStatus ?>">
<td>
<input type="checkbox" id="<?=$fr_c?>" name="p2entry[]" value="<?=$ph2index?>" onclick="fr_bgcolor('<?=$j?>', '<?=$fr_prefix?>')" />
</td>
<td>
<button value="togglep2_<?=$ph2index?>" name="togglep2_<?=$ph2index?>" title="<?=gettext("click to toggle enabled/disabled status")?>" class="btn btn-xs btn-default" type="submit"><?= ($entryStatus == 'disabled'? 'enable' : 'disable') ?></button>
</td>
<td id="<?=$fr_d?>" onclick="fr_toggle('<?=$j?>', '<?=$fr_prefix?>')">
<?=$ph2ent['mode']?>
</td>
<?php if(($ph2ent['mode'] == "tunnel") or ($ph2ent['mode'] == "tunnel6")): ?>
<td id="<?=$fr_d?>" onclick="fr_toggle('<?=$j?>', '<?=$fr_prefix?>')">
<?=ipsec_idinfo_to_text($ph2ent['localid']); ?>
</td>
<td id="<?=$fr_d?>" onclick="fr_toggle('<?=$j?>', '<?=$fr_prefix?>')">
<?=ipsec_idinfo_to_text($ph2ent['remoteid']); ?>
</td>
<?php else: ?>
<td colspan="2"></td>
<td id="<?=$fr_d?>" onclick="fr_toggle('<?=$j?>', '<?=$fr_prefix?>')">
<?=ipsec_idinfo_to_text($ph2ent['localid']); ?>
</td>
<td id="<?=$fr_d?>" onclick="fr_toggle('<?=$j?>', '<?=$fr_prefix?>')">
<?=ipsec_idinfo_to_text($ph2ent['remoteid']); ?>
</td>
<?php else: ?>
<td colspan="2"></td>
<?php endif; ?>
<td id="<?=$fr_d?>" onclick="fr_toggle('<?=$j?>', '<?=$fr_prefix?>')">
<?=$p2_protos[$ph2ent['protocol']]; ?>
</td>
<td id="<?=$fr_d?>" onclick="fr_toggle('<?=$j?>', '<?=$fr_prefix?>')">
<td id="<?=$fr_d?>" onclick="fr_toggle('<?=$j?>', '<?=$fr_prefix?>')">
<?=$p2_protos[$ph2ent['protocol']]; ?>
</td>
<td id="<?=$fr_d?>" onclick="fr_toggle('<?=$j?>', '<?=$fr_prefix?>')">
<?php
foreach ($ph2ent['encryption-algorithm-option'] as $k => $ph2ea) {
if ($k)
@ -494,8 +494,8 @@ display_top_tabs($tab_array);
}
}
?>
</td>
<td id="<?=$fr_d?>" onclick="fr_toggle('<?=$j?>', '<?=$fr_prefix?>')">
</td>
<td id="<?=$fr_d?>" onclick="fr_toggle('<?=$j?>', '<?=$fr_prefix?>')">
<?php
if (!empty($ph2ent['hash-algorithm-option']) && is_array($ph2ent['hash-algorithm-option'])) {
foreach ($ph2ent['hash-algorithm-option'] as $k => $ph2ha) {
@ -504,51 +504,26 @@ display_top_tabs($tab_array);
echo $p2_halgos[$ph2ha];
}
}
?>
</td>
<td style="cursor: pointer;">
<!-- <button class="btn btn-xs btn-default" type="submit" name="movep2_<?=$j?>" value="movep2_<?=$j?>"><?=gettext("Move checked P2s here")?></button> -->
<a class="fa fa-pencil" href="vpn_ipsec_phase2.php?p2index=<?=$ph2ent['uniqid']?>" title="<?=gettext("Edit phase2 entry"); ?>"></a>
<a class="fa fa-clone" href="vpn_ipsec_phase2.php?dup=<?=$ph2ent['uniqid']?>" title="<?=gettext("Add a new Phase 2 based on this one"); ?>"></a>
<a class="fa fa-trash no-confirm" id="Xdelp2_<?=$i?>" title="<?=gettext('Delete phase2 entry'); ?>"></a>
<button style="display: none;" class="btn btn-xs btn-warning" type="submit" id="delp2_<?=$ph2index?>" name="delp2_<?=$ph2index?>" value="delp2_<?=$ph2index?>" title="<?=gettext('delete phase2 entry'); ?>">delete</button>
</td>
</tr>
<?php $j++; endforeach; ?>
<tr>
<td colspan="8"></td>
<td>
<?php
/*
if ($j == 0):
?>
<i class="icon icon-arrow-down" title="<?=gettext("move selected phase2 entries to end")?>" alt="move"></i>
<?php
else:
?>
<i class="icon icon-arrow-down" name="movep2_<?=$j?>" onmouseover="fr_insline(<?=$j?>, true, '<?=$fr_prefix?>')" onmouseout="fr_insline(<?=$j?>, false, '<?=$fr_prefix?>')" title="<?=gettext("move selected phase2 entries to end")?>" alt="move"></i>
<?php
endif;
*/
?>
<a class="btn btn-xs btn-success" href="vpn_ipsec_phase2.php?ikeid=<?=$ph1ent['ikeid']?><?php if (isset($ph1ent['mobile'])) echo "&amp;mobile=true"?>">
<i class="fa fa-plus icon-embed-btn"></i>
<?=gettext("Add P2")?>
</a>
<?php
/*
if ($j == 0):
?>
<i class="icon icon-remove-sign" title="<?=gettext("delete selected phase2 entries")?>" alt="delete"></i>
<?php
else:
?>
<i name="delp2" class="icon icon-remove-sign" title="<?=gettext("delete selected phase2 entries")?>" onclick="return confirm('<?=gettext("Do you really want to delete the selected phase2 entries?")?>')"></i>
<?php
endif;
*/
?>
</td>
<td style="cursor: pointer;">
<!-- <button class="btn btn-xs btn-default" type="submit" name="movep2_<?=$j?>" value="movep2_<?=$j?>"><?=gettext("Move checked P2s here")?></button> -->
<a class="fa fa-pencil" href="vpn_ipsec_phase2.php?p2index=<?=$ph2ent['uniqid']?>" title="<?=gettext("Edit phase2 entry"); ?>"></a>
<a class="fa fa-clone" href="vpn_ipsec_phase2.php?dup=<?=$ph2ent['uniqid']?>" title="<?=gettext("Add a new Phase 2 based on this one"); ?>"></a>
<a class="fa fa-trash no-confirm" id="Xdelp2_<?=$i?>" title="<?=gettext('Delete phase2 entry'); ?>"></a>
<button style="display: none;" class="btn btn-xs btn-warning" type="submit" id="delp2_<?=$ph2index?>" name="delp2_<?=$ph2index?>" value="delp2_<?=$ph2index?>" title="<?=gettext('delete phase2 entry'); ?>">delete</button>
</td>
</tr>
<?php $j++; endforeach; ?>
<tr>
<td></td>
<td>
<a class="btn btn-xs btn-success" href="vpn_ipsec_phase2.php?ikeid=<?=$ph1ent['ikeid']?><?php if (isset($ph1ent['mobile'])) echo "&amp;mobile=true"?>">
<i class="fa fa-plus icon-embed-btn"></i>
<?=gettext("Add P2")?>
</a>
</td>
<td colspan="8"></td>
</tr>
</tbody>
</table>
@ -559,12 +534,12 @@ display_top_tabs($tab_array);
$i++;
endforeach; // $a_phase1 as $ph1ent
?>
</tbody>
</table>
</tbody>
</table>
</div>
</div>
</div>
<nav class="action-buttons">
<nav class="action-buttons">
<?php
/*
if ($i !== 0): ?>
@ -572,17 +547,17 @@ display_top_tabs($tab_array);
<?php endif;
*/
?>
<a href="vpn_ipsec_phase1.php" class="btn btn-success btn-sm">
<i class="fa fa-plus icon-embed-btn"></i>
<?=gettext("Add P1")?>
</a>
<a href="vpn_ipsec_phase1.php" class="btn btn-success btn-sm">
<i class="fa fa-plus icon-embed-btn"></i>
<?=gettext("Add P1")?>
</a>
<?php if ($i !== 0): ?>
<button type="submit" name="del" class="btn btn-danger btn-sm" value="<?=gettext("Delete selected P1s")?>">
<i class="fa fa-trash icon-embed-btn"></i>
<?=gettext("Delete P1s")?>
</button>
<button type="submit" name="del" class="btn btn-danger btn-sm" value="<?=gettext("Delete selected P1s")?>">
<i class="fa fa-trash icon-embed-btn"></i>
<?=gettext("Delete P1s")?>
</button>
<?php endif; ?>
</nav>
</nav>
</form>
<div id="infoblock">