X-Git-Url: https://git.openstreetmap.org./rails.git/blobdiff_plain/550c4a3a45814fde5c809334c85f1ebc47659a82..cebda5ffb9bc45171ddc6b4c4a25f14912fdad51:/app/assets/javascripts/index/changeset.js diff --git a/app/assets/javascripts/index/changeset.js b/app/assets/javascripts/index/changeset.js index 9e38917af..c6e77bc71 100644 --- a/app/assets/javascripts/index/changeset.js +++ b/app/assets/javascripts/index/changeset.js @@ -29,6 +29,7 @@ OSM.Changeset = function (map) { function updateChangeset(form, method, url, include_data) { var data; + $(form).find("#comment-error").prop("hidden", true); $(form).find("input[type=submit]").prop("disabled", true); if (include_data) { @@ -44,6 +45,11 @@ OSM.Changeset = function (map) { data: data, success: function () { OSM.loadSidebarContent(window.location.pathname, page.load); + }, + error: function (xhr) { + $(form).find("#comment-error").text(xhr.responseText); + $(form).find("#comment-error").prop("hidden", false); + $(form).find("input[type=submit]").prop("disabled", false); } }); }