Блокировка кнопки сохранения после нажатия
This commit is contained in:
parent
17c8469686
commit
a2106e5ec3
@ -27,6 +27,7 @@
|
||||
</style>
|
||||
{% endblock %}
|
||||
{% block content %}
|
||||
|
||||
<section class="content-header">
|
||||
<div class="container-fluid">
|
||||
<div class="row mb-2">
|
||||
@ -988,8 +989,11 @@
|
||||
document.body.removeChild(a);
|
||||
}
|
||||
|
||||
document.getElementById('saveButton').addEventListener('click', function () {
|
||||
// TODO валидация формы. Вывод ошибок
|
||||
document.getElementById('saveButton').addEventListener('click', function (event) {
|
||||
event.target.insertAdjacentHTML('afterbegin', `
|
||||
<span class="spinner-border spinner-border-sm" role="status" aria-hidden="true"></span>
|
||||
`);
|
||||
event.target.disabled = true
|
||||
if (vectorLayer) {
|
||||
const features = vectorLayer.getSource().getFeatures();
|
||||
const geojson = new ol.format.GeoJSON().writeFeatures(features, {
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user