diff options
author | Stephen Beaver <sbeaver@netgate.com> | 2015-11-06 11:50:55 -0500 |
---|---|---|
committer | Stephen Beaver <sbeaver@netgate.com> | 2015-11-06 11:50:55 -0500 |
commit | c5b3bb016dbd41027fc3d916fdaeda6045241fe7 (patch) | |
tree | 12db7b7f4ed94bac12e094601ad3fbe354bc150b /src/usr/local/www/vpn_ipsec.php | |
parent | 0164e6d1338833000a0a13a314b19cce6ff98821 (diff) | |
download | pfsense-c5b3bb016dbd41027fc3d916fdaeda6045241fe7.zip pfsense-c5b3bb016dbd41027fc3d916fdaeda6045241fe7.tar.gz |
Move "Add P2" button to left side to facilitate use of smaller screens
Fix HTML indenting
Diffstat (limited to 'src/usr/local/www/vpn_ipsec.php')
-rw-r--r-- | src/usr/local/www/vpn_ipsec.php | 177 |
1 files changed, 76 insertions, 101 deletions
diff --git a/src/usr/local/www/vpn_ipsec.php b/src/usr/local/www/vpn_ipsec.php index c4c3b26..f98c769 100644 --- a/src/usr/local/www/vpn_ipsec.php +++ b/src/usr/local/www/vpn_ipsec.php @@ -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> </th> - <th> </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> </th> + <th> </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) { @@ -505,50 +505,25 @@ display_top_tabs($tab_array); } } ?> - </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> + </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 "&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; -*/ -?> + <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 "&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"> |