X-Git-Url: https://git.openstreetmap.org./rails.git/blobdiff_plain/b70da7b8ea15ab48bb2f34155567cea6dffc8fc9..dc2c84f194f1ae564676964e528d5ec58657fdf0:/app/assets/javascripts/index/changeset.js?ds=inline 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); } }); }