Skip to content
This repository
Browse code

BUGFIX: UploadField does not work on DataObjects

  • Loading branch information...
commit b57f2bd02205dcb9d2bd0b38eab80432a637d46f 1 parent 09067cc
unclecheese authored July 19, 2012

Showing 1 changed file with 5 additions and 2 deletions. Show diff stats Hide diff stats

  1. 7  javascript/UploadField.js
7  javascript/UploadField.js
@@ -102,10 +102,13 @@
102 102
 				this.fileupload($.extend(true, 
103 103
 					{
104 104
 						formData: function(form) {
105  
-							
  105
+							var idVal = $(form).find(':input[name=ID]').val();
  106
+							if(!idVal) {
  107
+								idVal = 0;
  108
+							}
106 109
 							return [
107 110
 								{name: 'SecurityID', value: $(form).find(':input[name=SecurityID]').val()},
108  
-								{name: 'ID', value: $(form).find(':input[name=ID]').val()}
  111
+								{name: 'ID', value: idVal}
109 112
 							];
110 113
 						},
111 114
 						errorMessages: {

0 notes on commit b57f2bd

Please sign in to comment.
Something went wrong with that request. Please try again.