diff options
author | Stephen Beaver <sbeaver@netgate.com> | 2015-11-02 12:51:25 -0500 |
---|---|---|
committer | Stephen Beaver <sbeaver@netgate.com> | 2015-11-02 12:51:25 -0500 |
commit | a5855731c0276b72585c3a23378c85370f7ebf33 (patch) | |
tree | 9e0fcbd2dfcbf001107518fe83b34803c59d425b /src/usr | |
parent | 54c4aca27730743e2f0a067f8262d3b342b1a953 (diff) | |
download | pfsense-a5855731c0276b72585c3a23378c85370f7ebf33.zip pfsense-a5855731c0276b72585c3a23378c85370f7ebf33.tar.gz |
Fix confirm on delete
Diffstat (limited to 'src/usr')
-rw-r--r-- | src/usr/local/www/interfaces_vlan.php | 10 |
1 files changed, 6 insertions, 4 deletions
diff --git a/src/usr/local/www/interfaces_vlan.php b/src/usr/local/www/interfaces_vlan.php index 81e3b4b..703505c 100644 --- a/src/usr/local/www/interfaces_vlan.php +++ b/src/usr/local/www/interfaces_vlan.php @@ -158,7 +158,7 @@ print_info_box(sprintf(gettext('NOTE: Not all drivers/NICs support 802.1Q '. <td> <a class="fa fa-pencil" title="<?=gettext('Edit VLAN')?>" role="button" href="interfaces_vlan_edit.php?id=<?=$i?>"></a> <!-- <a class="btn btn-danger btn-xs" role="button" href="interfaces_vlan.php?act=del&id=<?=$i?>"><?=gettext('Delete')?></a></td> --> - <a class="fa fa-trash" title="<?=gettext('Delete VLAN')?>" role="button" id="del-<?=$i?>" onclick="return confirm('<?=gettext("Are you sure you want to delete this VLAN?")?>')"></a> + <a class="fa fa-trash" title="<?=gettext('Delete VLAN')?>" role="button" id="del-<?=$i?>"></a> </td> </tr> <?php @@ -177,9 +177,11 @@ print_info_box(sprintf(gettext('NOTE: Not all drivers/NICs support 802.1Q '. 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(); + if(confirm('<?=gettext("Are you sure you want to delete this VLAN?")?>')) { + $('#act').val('del'); + $('#id').val(this.id.replace("del-", "")); + $(this).parents('form').submit(); + } }); }); //]]> |