summaryrefslogtreecommitdiffstats
path: root/src/usr/local/www/interfaces_vlan.php
diff options
context:
space:
mode:
authorheper <heper@users.noreply.github.com>2015-11-02 16:51:11 +0100
committerheper <heper@users.noreply.github.com>2015-11-02 16:51:11 +0100
commit43444ecd21690f6bc78ce6c881658b388e7e7fc7 (patch)
tree0c117dacbe04c51c8663169c3f334f3930ff3755 /src/usr/local/www/interfaces_vlan.php
parent2acf113ad02aa4000ae59e4bb53f041aa99f1a8c (diff)
downloadpfsense-43444ecd21690f6bc78ce6c881658b388e7e7fc7.zip
pfsense-43444ecd21690f6bc78ce6c881658b388e7e7fc7.tar.gz
convert interfaces_vlan to fa
this page used $_POST instead on $_GET. no clue why. changed it to $_GET like every other page i've come across thus far. (it only seems to complicate things, without an actual benefit??)
Diffstat (limited to 'src/usr/local/www/interfaces_vlan.php')
-rw-r--r--src/usr/local/www/interfaces_vlan.php58
1 files changed, 21 insertions, 37 deletions
diff --git a/src/usr/local/www/interfaces_vlan.php b/src/usr/local/www/interfaces_vlan.php
index bdd7898..4d01bd1 100644
--- a/src/usr/local/www/interfaces_vlan.php
+++ b/src/usr/local/www/interfaces_vlan.php
@@ -88,19 +88,19 @@ function vlan_inuse($num) {
return false;
}
-if ($_POST['act'] == "del") {
- if (!isset($_POST['id'])) {
+if ($_GET['act'] == "del") {
+ if (!isset($_GET['id'])) {
$input_errors[] = gettext("Wrong parameters supplied");
- } else if (empty($a_vlans[$_POST['id']])) {
+ } else if (empty($a_vlans[$_GET['id']])) {
$input_errors[] = gettext("Wrong index supplied");
/* check if still in use */
- } else if (vlan_inuse($_POST['id'])) {
+ } else if (vlan_inuse($_GET['id'])) {
$input_errors[] = gettext("This VLAN cannot be deleted because it is still being used as an interface.");
} else {
- if (does_interface_exist($a_vlans[$_POST['id']]['vlanif'])) {
- pfSense_interface_destroy($a_vlans[$_POST['id']]['vlanif']);
+ if (does_interface_exist($a_vlans[$_GET['id']]['vlanif'])) {
+ pfSense_interface_destroy($a_vlans[$_GET['id']]['vlanif']);
}
- unset($a_vlans[$_POST['id']]);
+ unset($a_vlans[$_GET['id']]);
write_config();
@@ -134,17 +134,15 @@ print_info_box(sprintf(gettext('NOTE: Not all drivers/NICs support 802.1Q '.
'tagging will still work, but the reduced MTU may cause problems.<br />See the '.
'%s handbook for information on supported cards.'),$g['product_name']));
?>
-<form action="interfaces_vlan.php" method="post">
- <input id="act" type="hidden" name="act" value="" />
- <input id="id" type="hidden" name="id" value=""/>
-
- <div class="table-responsive">
- <table class="table table-striped table-hover table-condensed">
+<div class="table-responsive">
+ <table class="table table-striped table-hover table-condensed">
+ <thead>
<tr>
<th><?=gettext('Interface');?></th>
<th><?=gettext('VLAN tag');?></th>
<th><?=gettext('Description');?></th>
</tr>
+ </thead>
<?php
$i = 0;
foreach ($a_vlans as $vlan) {
@@ -154,33 +152,19 @@ print_info_box(sprintf(gettext('NOTE: Not all drivers/NICs support 802.1Q '.
<td><?=htmlspecialchars($vlan['tag']);?></td>
<td><?=htmlspecialchars($vlan['descr']);?></td>
<td>
- <a class="btn btn-primary btn-xs" role="button" href="interfaces_vlan_edit.php?id=<?=$i?>"><?=gettext('Edit')?></a>
-<!-- <a class="btn btn-danger btn-xs" role="button" href="interfaces_vlan.php?act=del&amp;id=<?=$i?>"><?=gettext('Delete')?></a></td> -->
- <a class="btn btn-danger btn-xs" role="button" id="del-<?=$i?>"><?=gettext('Delete')?></a></td>
+ <a class="fa fa-pencil" title="<?=gettext('Edit VLAN')?>" href="interfaces_vlan_edit.php?id=<?=$i?>"></a>
+ <a class="fa fa-trash" title="<?=gettext('Delete VLAN')?>" href="interfaces_vlan.php?act=del&amp;id=<?=$i?>" onclick="return confirm('<?=gettext("Are you sure you want to delete this VLAN?")?>')"></a>
</td>
</tr>
- <?php
- $i++;
+<?php
+ $i++;
}
?>
- </table>
- <nav class="action-buttons">
- <a class="btn btn-success" role="button" href="interfaces_vlan_edit.php"><?=gettext('Add VLAN'); ?></a>
- </nav>
- </div>
-</form>
-
-<script>
-//<![CDATA[
-events.push(function(){
- // Select 'delete button' clicks, extract the id, set the hidden input values and submit
- $('[id^=del-]').click(function(event) {
- $('#act').val('del');
- $('#id').val(this.id.replace("del-", ""));
- $(this).parents('form').submit();
- });
-});
-//]]>
-</script>
+ </table>
+ <nav class="action-buttons">
+ <a class="btn btn-success" role="button" href="interfaces_vlan_edit.php"><?=gettext('Add VLAN'); ?></a>
+ </nav>
+</div>
+
<?php
include("foot.inc");
OpenPOWER on IntegriCloud