bug 14023: extend dialog widget to support textarea field.

This commit is contained in:
Jessica Wang 2012-03-07 10:04:17 -08:00
parent 65e160b7e6
commit a601ef4c11
2 changed files with 12 additions and 3 deletions

View File

@ -54,10 +54,11 @@
$dashboard.find('#update_ssl_button').click(function() {
cloudStack.dialog.createForm({
form: {
title: 'label.update.ssl',
title: 'label.update.ssl',
desc: 'message.update.ssl',
fields: {
certificate: { label: 'label.certificate' },
privatekey: { label: 'label.privatekey' },
certificate: { label: 'label.certificate', isTextarea: true },
privatekey: { label: 'label.privatekey', isTextarea: true },
domainsuffix: { label: 'label.domain.suffix' }
}
},

View File

@ -242,6 +242,14 @@
}
}
});
} else if(field.isTextarea) {
$input = $('<textarea>').attr({
name: key
}).appendTo($value);
if (field.defaultValue) {
$input.val(field.defaultValue);
}
} else {
// Text field
if (field.range) {