|
|
@ -7,7 +7,22 @@ $(function () { |
|
|
|
form.method = 'post'; |
|
|
|
form.method = 'post'; |
|
|
|
form.action = $(this).attr('href-post'); |
|
|
|
form.action = $(this).attr('href-post'); |
|
|
|
form.target = '_self'; |
|
|
|
form.target = '_self'; |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
var input = document.createElement('input'); |
|
|
|
|
|
|
|
input.type = 'hidden'; |
|
|
|
|
|
|
|
input.name = '_csrf'; |
|
|
|
|
|
|
|
input.value = document.head.getAttribute('data-csrf-token'); |
|
|
|
|
|
|
|
form.appendChild(input); |
|
|
|
|
|
|
|
|
|
|
|
document.body.appendChild(form); |
|
|
|
document.body.appendChild(form); |
|
|
|
form.submit(); |
|
|
|
form.submit(); |
|
|
|
}); |
|
|
|
}); |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
$('form').each(function () { |
|
|
|
|
|
|
|
var input = document.createElement('input'); |
|
|
|
|
|
|
|
input.type = 'hidden'; |
|
|
|
|
|
|
|
input.name = '_csrf'; |
|
|
|
|
|
|
|
input.value = document.head.getAttribute('data-csrf-token'); |
|
|
|
|
|
|
|
this.appendChild(input); |
|
|
|
|
|
|
|
}); |
|
|
|
}); |
|
|
|
}); |
|
|
|