Disable new note submit button in click handler
This commit is contained in:
parent
c4709e2a05
commit
fa0c12cdcd
1 changed files with 1 additions and 2 deletions
|
@ -41,8 +41,6 @@ OSM.NewNote = function (map) {
|
||||||
marker.options.draggable = false;
|
marker.options.draggable = false;
|
||||||
marker.dragging.disable();
|
marker.dragging.disable();
|
||||||
|
|
||||||
$(form).find("input[type=submit]").prop("disabled", true);
|
|
||||||
|
|
||||||
$.ajax({
|
$.ajax({
|
||||||
url: url,
|
url: url,
|
||||||
type: "POST",
|
type: "POST",
|
||||||
|
@ -153,6 +151,7 @@ OSM.NewNote = function (map) {
|
||||||
|
|
||||||
content.find("input[type=submit]").on("click", function (e) {
|
content.find("input[type=submit]").on("click", function (e) {
|
||||||
e.preventDefault();
|
e.preventDefault();
|
||||||
|
$(this).prop("disabled", true);
|
||||||
createNote(newNoteMarker, e.target.form, "/api/0.6/notes.json");
|
createNote(newNoteMarker, e.target.form, "/api/0.6/notes.json");
|
||||||
});
|
});
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue