Bug #5541
closed![Author: Anonymous](/images/anonymous.png?1678052115)
Two confirmations when deleting a VLAN
100%
Description
Just a minor annoyance, when deleting a VLAN interface there are two confirmation pop ups. The second one always pops up, even if you cancel the first one. The VLAN is deleted when you select "OK" on the second popup.
#1 says: Are you sure you wish to delete vlan?
#2 says: Are you sure you want to delete this VLAN?
I think the second one is coming from this code in src/usr/local/www/interfaces_vlan.php but couldn't find where the first one is coming from.
<script>
//<![CDATA[
events.push(function(){
// Select 'delete button' clicks, extract the id, set the hidden input values and submit
$('[id^=del-]').click(function(event) {
if(confirm('Are you sure you want to delete this VLAN?')) {
$('#act').val('del');
$('#id').val(this.id.replace("del-", ""));
$(this).parents('form').submit();
}
});
});
//]]>
</script>