X-Git-Url: https://git.openstreetmap.org./rails.git/blobdiff_plain/359d030a5b19de5e28460d5c9b2d0e1a59ed2fd3..15b104f4ff4614aa78c01180b6a9b89dd5a1400f:/app/assets/javascripts/leaflet.share.js?ds=sidebyside diff --git a/app/assets/javascripts/leaflet.share.js b/app/assets/javascripts/leaflet.share.js index a6b10821e..7cfd50c8e 100644 --- a/app/assets/javascripts/leaflet.share.js +++ b/app/assets/javascripts/leaflet.share.js @@ -213,6 +213,15 @@ L.OSM.share = function (options) { .attr('type', 'hidden') .appendTo($form); + var csrf_param = $("meta[name=csrf-param]").attr("content"), + csrf_token = $("meta[name=csrf-token]").attr("content"); + + $('') + .attr('name', csrf_param) + .attr('value', csrf_token) + .attr('type', 'hidden') + .appendTo($form); + $('
') .attr('class', 'deemphasize') .html(I18n.t('javascripts.share.image_size') + ' x ')