Make export form send authenticity token

This commit is contained in:
Tom Hughes 2017-01-02 22:50:59 +00:00
parent 9a82ae069a
commit 93631482ce

View file

@ -213,6 +213,15 @@ L.OSM.share = function (options) {
.attr('type', 'hidden') .attr('type', 'hidden')
.appendTo($form); .appendTo($form);
var csrf_param = $("meta[name=csrf-param]").attr("content"),
csrf_token = $("meta[name=csrf-token]").attr("content");
$('<input>')
.attr('name', csrf_param)
.attr('value', csrf_token)
.attr('type', 'hidden')
.appendTo($form);
$('<p>') $('<p>')
.attr('class', 'deemphasize') .attr('class', 'deemphasize')
.html(I18n.t('javascripts.share.image_size') + ' <span id="mapnik_image_width"></span> x <span id="mapnik_image_height"></span>') .html(I18n.t('javascripts.share.image_size') + ' <span id="mapnik_image_width"></span> x <span id="mapnik_image_height"></span>')