X-Git-Url: https://git.openstreetmap.org./rails.git/blobdiff_plain/783b5e3729228908d7404ae7404af1023501a906..4af54ce93bd01a4094a4657cf9e54860a7e16bb2:/app/assets/javascripts/index/changeset.js diff --git a/app/assets/javascripts/index/changeset.js b/app/assets/javascripts/index/changeset.js index 9e38917af..a6213b9c4 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, xhr_status, http_status) { + $(form).find("#comment-error").text(http_status); + $(form).find("#comment-error").prop("hidden", false); + $(form).find("input[type=submit]").prop("disabled", false); } }); }