mirror of
https://github.com/silverstripe/silverstripe-framework
synced 2024-10-22 12:05:37 +00:00
BUGFIX: UploadField does not work on DataObjects
This commit is contained in:
parent
09067cc8dd
commit
b57f2bd022
@ -102,10 +102,13 @@
|
|||||||
this.fileupload($.extend(true,
|
this.fileupload($.extend(true,
|
||||||
{
|
{
|
||||||
formData: function(form) {
|
formData: function(form) {
|
||||||
|
var idVal = $(form).find(':input[name=ID]').val();
|
||||||
|
if(!idVal) {
|
||||||
|
idVal = 0;
|
||||||
|
}
|
||||||
return [
|
return [
|
||||||
{name: 'SecurityID', value: $(form).find(':input[name=SecurityID]').val()},
|
{name: 'SecurityID', value: $(form).find(':input[name=SecurityID]').val()},
|
||||||
{name: 'ID', value: $(form).find(':input[name=ID]').val()}
|
{name: 'ID', value: idVal}
|
||||||
];
|
];
|
||||||
},
|
},
|
||||||
errorMessages: {
|
errorMessages: {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user