X-Git-Url: https://git.openstreetmap.org./rails.git/blobdiff_plain/945ff7911ca51dc250ffaba71f62821b5c0c0a95..7dbf8d83369cb73929080c4ba23fdd7dcd0184df:/app/assets/javascripts/leaflet.share.js diff --git a/app/assets/javascripts/leaflet.share.js b/app/assets/javascripts/leaflet.share.js index a6b10821e..044c767cf 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 ')
@@ -337,7 +346,7 @@ L.OSM.share = function (options) {
$('#embed_html').val(
'
' +
'' +
escapeHTML(I18n.t('javascripts.share.view_larger_map')) + '');