X-Git-Url: https://git.openstreetmap.org./rails.git/blobdiff_plain/3fb931f9a86955faa39bec1fa4f2a731cbc74780..7599f98957334d1924550205f7ba12a726de7eb0:/app/assets/javascripts/index/notes.js.erb diff --git a/app/assets/javascripts/index/notes.js.erb b/app/assets/javascripts/index/notes.js.erb index 8b440910c..5ecaca7dd 100644 --- a/app/assets/javascripts/index/notes.js.erb +++ b/app/assets/javascripts/index/notes.js.erb @@ -20,6 +20,8 @@ $(document).ready(function () { function createNote(feature, form) { var location = unproj(feature.geometry.getBounds().getCenterLonLat()); + $(form).find("input[type=submit]").prop("disabled", true); + $.ajax($("#createnoteanchor").attr("href"), { type: "POST", data: { @@ -42,6 +44,8 @@ $(document).ready(function () { function updateNote(feature, form, close) { var url = close ? feature.attributes.close_url : feature.attributes.comment_url; + $(form).find("input[type=submit]").prop("disabled", true); + $.ajax(url, { type: "POST", data: {