delete stations

This commit is contained in:
2022-06-17 20:05:59 +02:00
parent 0f6492ec46
commit 3bea28c125
4 changed files with 43 additions and 0 deletions

View File

@@ -15,6 +15,7 @@ function init() {
station_edit_button();
team_edit_button();
team_delete_button();
station_delete_button();
}
var selected = null;
@@ -109,4 +110,18 @@ function team_delete_button() {
}
}
}
}
function station_delete_button() {
var button = document.getElementById('delete_station');
if(button != null) {
button.onclick = function() {
var row = document.getElementsByClassName('selected')[0];
document.getElementById('s_id_delete').value = row.id;
let confirmAction = confirm("Wirklich löschen?");
if (confirmAction) {
this.form.submit();
}
}
}
}