From ef4c9a3306e86377b875d479c7036f5f3ad17410 Mon Sep 17 00:00:00 2001 From: Tom Hughes Date: Thu, 2 Nov 2023 10:08:19 +0000 Subject: [PATCH] Make change set comment rate limit errors display properly Fixes #4320 --- app/assets/javascripts/index/changeset.js | 2 +- app/views/browse/changeset.html.erb | 2 +- lib/osm.rb | 4 ++++ 3 files changed, 6 insertions(+), 2 deletions(-) diff --git a/app/assets/javascripts/index/changeset.js b/app/assets/javascripts/index/changeset.js index a6213b9c4..a659feef6 100644 --- a/app/assets/javascripts/index/changeset.js +++ b/app/assets/javascripts/index/changeset.js @@ -47,7 +47,7 @@ OSM.Changeset = function (map) { 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").text(xhr.responseText); $(form).find("#comment-error").prop("hidden", false); $(form).find("input[type=submit]").prop("disabled", false); } diff --git a/app/views/browse/changeset.html.erb b/app/views/browse/changeset.html.erb index 93e0abf21..74596e529 100644 --- a/app/views/browse/changeset.html.erb +++ b/app/views/browse/changeset.html.erb @@ -78,7 +78,7 @@
-