Revision a5855731
Added by Stephen Beaver almost 10 years ago
src/usr/local/www/interfaces_vlan.php | ||
---|---|---|
158 | 158 |
<td> |
159 | 159 |
<a class="fa fa-pencil" title="<?=gettext('Edit VLAN')?>" role="button" href="interfaces_vlan_edit.php?id=<?=$i?>"></a> |
160 | 160 |
<!-- <a class="btn btn-danger btn-xs" role="button" href="interfaces_vlan.php?act=del&id=<?=$i?>"><?=gettext('Delete')?></a></td> --> |
161 |
<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>
|
|
161 |
<a class="fa fa-trash" title="<?=gettext('Delete VLAN')?>" role="button" id="del-<?=$i?>"></a> |
|
162 | 162 |
</td> |
163 | 163 |
</tr> |
164 | 164 |
<?php |
... | ... | |
177 | 177 |
events.push(function(){ |
178 | 178 |
// Select 'delete button' clicks, extract the id, set the hidden input values and submit |
179 | 179 |
$('[id^=del-]').click(function(event) { |
180 |
$('#act').val('del'); |
|
181 |
$('#id').val(this.id.replace("del-", "")); |
|
182 |
$(this).parents('form').submit(); |
|
180 |
if(confirm('<?=gettext("Are you sure you want to delete this VLAN?")?>')) { |
|
181 |
$('#act').val('del'); |
|
182 |
$('#id').val(this.id.replace("del-", "")); |
|
183 |
$(this).parents('form').submit(); |
|
184 |
} |
|
183 | 185 |
}); |
184 | 186 |
}); |
185 | 187 |
//]]> |
Also available in: Unified diff
Fix confirm on delete