Skip to content

Commit a601ef4

Browse files
author
Jessica Wang
committed
bug 14023: extend dialog widget to support textarea field.
1 parent 65e160b commit a601ef4

2 files changed

Lines changed: 12 additions & 3 deletions

File tree

ui/scripts/ui-custom/physicalResources.js

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -54,10 +54,11 @@
5454
$dashboard.find('#update_ssl_button').click(function() {
5555
cloudStack.dialog.createForm({
5656
form: {
57-
title: 'label.update.ssl',
57+
title: 'label.update.ssl',
58+
desc: 'message.update.ssl',
5859
fields: {
59-
certificate: { label: 'label.certificate' },
60-
privatekey: { label: 'label.privatekey' },
60+
certificate: { label: 'label.certificate', isTextarea: true },
61+
privatekey: { label: 'label.privatekey', isTextarea: true },
6162
domainsuffix: { label: 'label.domain.suffix' }
6263
}
6364
},

ui/scripts/ui/dialog.js

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -242,6 +242,14 @@
242242
}
243243
}
244244
});
245+
} else if(field.isTextarea) {
246+
$input = $('<textarea>').attr({
247+
name: key
248+
}).appendTo($value);
249+
250+
if (field.defaultValue) {
251+
$input.val(field.defaultValue);
252+
}
245253
} else {
246254
// Text field
247255
if (field.range) {

0 commit comments

Comments
 (0)