mirror of
https://gitea.publichub.eu/oscar.krause/fastapi-dls.git
synced 2024-11-22 22:38:48 +00:00
dashboard_origins.html - implemented confirmation before deleting all origins
This commit is contained in:
parent
7eb3d7434d
commit
995e959bb1
@ -13,7 +13,7 @@
|
|||||||
<button type="button" class="btn btn-sm btn-outline-danger" onclick="deleteOrigin().finally(() => load())">
|
<button type="button" class="btn btn-sm btn-outline-danger" onclick="deleteOrigin().finally(() => load())">
|
||||||
delete origin
|
delete origin
|
||||||
</button>
|
</button>
|
||||||
<button type="button" class="btn btn-sm btn-outline-danger" onclick="deleteOrigins().finally(() => load())">
|
<button type="button" class="btn btn-sm btn-outline-danger" onclick="deleteOriginsWrapper()">
|
||||||
delete all
|
delete all
|
||||||
</button>
|
</button>
|
||||||
</div>
|
</div>
|
||||||
@ -37,5 +37,12 @@
|
|||||||
}
|
}
|
||||||
|
|
||||||
load()
|
load()
|
||||||
|
|
||||||
|
function deleteOriginsWrapper() {
|
||||||
|
const response = confirm('Are you sure you want to delete all origins and their leases?');
|
||||||
|
|
||||||
|
if (response)
|
||||||
|
deleteOrigins().finally(() => load())
|
||||||
|
}
|
||||||
</script>
|
</script>
|
||||||
{% endblock %}
|
{% endblock %}
|
||||||
|
Loading…
Reference in New Issue
Block a user