Make export form send authenticity token
This commit is contained in:
parent
9a82ae069a
commit
93631482ce
1 changed files with 9 additions and 0 deletions
|
@ -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>')
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue