mirror of
https://github.com/silverstripe/silverstripe-framework
synced 2024-10-22 14:05:37 +02:00
BUG Fix regression in gridfield get actions
This commit is contained in:
parent
1fe7d029db
commit
3dc0d0ee89
@ -254,11 +254,17 @@
|
|||||||
$('.ss-gridfield .action.no-ajax').entwine({
|
$('.ss-gridfield .action.no-ajax').entwine({
|
||||||
onclick: function(e){
|
onclick: function(e){
|
||||||
var self = this, btn = this.closest(':button'), grid = this.getGridField(),
|
var self = this, btn = this.closest(':button'), grid = this.getGridField(),
|
||||||
form = this.closest('form'), data = form.find(':input.gridstate').serialize();
|
form = this.closest('form'), data = form.find(':input.gridstate').serialize(),
|
||||||
|
csrf = form.find('input[name="SecurityID"]').val();
|
||||||
|
|
||||||
// Add current button
|
// Add current button
|
||||||
data += "&" + encodeURIComponent(btn.attr('name')) + '=' + encodeURIComponent(btn.val());
|
data += "&" + encodeURIComponent(btn.attr('name')) + '=' + encodeURIComponent(btn.val());
|
||||||
|
|
||||||
|
// Add csrf
|
||||||
|
if(csrf) {
|
||||||
|
data += "&SecurityID=" + encodeURIComponent(csrf);
|
||||||
|
}
|
||||||
|
|
||||||
// Include any GET parameters from the current URL, as the view
|
// Include any GET parameters from the current URL, as the view
|
||||||
// state might depend on it. For example, a list pre-filtered
|
// state might depend on it. For example, a list pre-filtered
|
||||||
// through external search criteria might be passed to GridField.
|
// through external search criteria might be passed to GridField.
|
||||||
|
Loading…
Reference in New Issue
Block a user