[openstreetmap/openstreetmap-website] Show blocked api response when interacting with notes (PR #4462)
Anton Khorev
notifications at github.com
Tue Jan 16 23:19:11 UTC 2024
@AntonKhorev commented on this pull request.
> @@ -52,20 +52,17 @@ OSM.Note = function (map) {
OSM.loadSidebarContent(path, function () {
initialize(path, id, moveToNote);
});
+ },
+ error: function (xhr) {
+ $(form).find("#comment-error").text(xhr.responseText);
+ $(form).find("#comment-error").prop("hidden", false);
> Also should the success callback hide the error again
It doesn't have to because it rewrites the entire sidebar contents.
Added test to check that:
https://github.com/openstreetmap/openstreetmap-website/pull/4462/files#diff-960e6e9200fa7ea5eed049f5de24d807cf7c7a4c0434875d23139ff261ddc0feR73-R79
--
Reply to this email directly or view it on GitHub:
https://github.com/openstreetmap/openstreetmap-website/pull/4462#discussion_r1454191330
You are receiving this because you are subscribed to this thread.
Message ID: <openstreetmap/openstreetmap-website/pull/4462/review/1825664461 at github.com>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.openstreetmap.org/pipermail/rails-dev/attachments/20240116/a50b964f/attachment-0001.htm>
More information about the rails-dev
mailing list