UI > dialog widget > Allow passing custom data in POST request.

This commit is contained in:
Jessica Wang 2015-01-21 12:33:16 -08:00
parent 4e569f85eb
commit eb180b131d
1 changed files with 11 additions and 0 deletions

View File

@ -701,7 +701,18 @@
});
var $file = $form.find('input[type=file]');
var $field = $file.closest('.form-item .value');
// Add additional passed data
$.map(successArgs.data, function(v, k) {
var $hidden = $('<input>').attr({
type: 'hidden',
name: k,
value: v
});
$hidden.appendTo($frameForm);
});
$uploadFrame.css({ width: $field.outerWidth(), height: $field.height() }).show();
$frameForm.append($file);
$field.append($uploadFrame);