Permalink
Browse files

BUGFIX: UploadField does not work on DataObjects

  • Loading branch information...
1 parent 09067cc commit b57f2bd02205dcb9d2bd0b38eab80432a637d46f @unclecheese unclecheese committed Jul 20, 2012
Showing with 5 additions and 2 deletions.
  1. +5 −2 javascript/UploadField.js
@@ -102,10 +102,13 @@
this.fileupload($.extend(true,
{
formData: function(form) {
-
+ var idVal = $(form).find(':input[name=ID]').val();
+ if(!idVal) {
+ idVal = 0;
+ }
return [
{name: 'SecurityID', value: $(form).find(':input[name=SecurityID]').val()},
- {name: 'ID', value: $(form).find(':input[name=ID]').val()}
+ {name: 'ID', value: idVal}
];
},
errorMessages: {

0 comments on commit b57f2bd

Please sign in to comment.