mirror of https://github.com/apache/cloudstack.git
UI > dialog widget > Allow passing custom data in POST request.
This commit is contained in:
parent
4e569f85eb
commit
eb180b131d
|
|
@ -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);
|
||||
|
|
|
|||
Loading…
Reference in New Issue