mirror of
https://github.com/getgrav/grav-plugin-admin.git
synced 2026-05-07 08:46:30 +02:00
Fix page media nonce on post actions
This commit is contained in:
@@ -109,7 +109,7 @@
|
||||
this.on('removedfile', function(file) {
|
||||
if (!file.accepted || file.rejected) return;
|
||||
thisDropzone = this;
|
||||
$.post(URI + '/task{{ config.system.param_sep }}delmedia', {filename: file.name}, function(data){
|
||||
$.post(URI + '/task{{ config.system.param_sep }}delmedia', {filename: file.name, 'admin-nonce': $('#admin-nonce').val()}, function(data){
|
||||
$.proxy(modalError, thisDropzone, {
|
||||
file: file,
|
||||
data: data,
|
||||
@@ -118,6 +118,10 @@
|
||||
})();
|
||||
});
|
||||
});
|
||||
|
||||
this.on('sending', function(file, xhr, formData){
|
||||
formData.append('admin-nonce', $('#admin-nonce').val());
|
||||
});
|
||||
}
|
||||
};
|
||||
|
||||
|
||||
Reference in New Issue
Block a user