From 4345eaa61b33de8b6cd14d4a0aff432238cb05ed Mon Sep 17 00:00:00 2001 From: Ingo Schommer Date: Fri, 2 Mar 2012 15:21:12 +0100 Subject: [PATCH] MINOR Sending 'ID' parameter from containing form alongside UploadField uploads, in order to set the correct context in in the controller (in the case of CMSFileAddController, that's the parent folder) --- javascript/UploadField.js | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/javascript/UploadField.js b/javascript/UploadField.js index 2a00e33c2..b5a09a460 100644 --- a/javascript/UploadField.js +++ b/javascript/UploadField.js @@ -40,7 +40,10 @@ this.fileupload($.extend(true, { formData: function(form) { - return [{name: 'SecurityID', value: $(form).find(':input[name=SecurityID]').val()}]; + return [ + {name: 'SecurityID', value: $(form).find(':input[name=SecurityID]').val()}, + {name: 'ID', value: $(form).find(':input[name=ID]').val()} + ]; }, errorMessages: { // errorMessages for all error codes suggested from the plugin author, some will be overwritten by the config comming from php