Project

General

Profile

Bug #5541

Two confirmations when deleting a VLAN

Added by Robbert Rijkse over 3 years ago. Updated over 3 years ago.

Status:
Resolved
Priority:
Normal
Category:
Web Interface
Target version:
Start date:
11/25/2015
Due date:
% Done:

100%

Estimated time:
Affected Version:
2.3
Affected Architecture:

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>

Associated revisions

History

#1 Updated by Chris Buechler over 3 years ago

  • Category changed from Interfaces to Web Interface
  • Status changed from New to Confirmed
  • Target version set to 2.3

#2 Updated by Steve Beaver over 3 years ago

  • Status changed from Confirmed to Feedback
  • Assignee set to Robbert Rijkse

The fa-trash icon automatically inserts a confirmation dialog so the specific confirm() used here is no longer required.

#3 Updated by Steve Beaver over 3 years ago

  • % Done changed from 0 to 100

#4 Updated by Robbert Rijkse over 3 years ago

Upgraded to the snapshot from 20151128-2200 and the second delete dialog is no longer there.

Thank you.

Robbert

#5 Updated by Chris Buechler over 3 years ago

  • Status changed from Feedback to Resolved

Also available in: Atom PDF