mirror of
https://github.com/apache/cloudstack.git
synced 2025-10-26 08:42:29 +01:00
CLOUDSTACK-4102: UI > widget > extend dialog widget to have dynamic description.
This commit is contained in:
parent
922ef76224
commit
3f4ef406cf
@ -46,8 +46,14 @@
|
||||
var createLabel = _l(args.form.createLabel);
|
||||
|
||||
// Description text
|
||||
var formDesc;
|
||||
if (typeof(args.form.desc) == 'function') {
|
||||
formDesc = args.form.desc(args);
|
||||
} else { //typeof(args.form.desc) == 'string' or 'undefined'
|
||||
formDesc = args.form.desc;
|
||||
}
|
||||
$('<span>').addClass('message').prependTo($formContainer).html(
|
||||
_l(args.form.desc)
|
||||
_l(formDesc)
|
||||
);
|
||||
|
||||
// Submit button
|
||||
|
||||
@ -70,6 +70,7 @@
|
||||
action.notification : {};
|
||||
var messages = action.messages;
|
||||
var id = args.id;
|
||||
var jsonObj = args.jsonObj;
|
||||
var context = $.extend(true, {},
|
||||
args.context ? args.context : $detailView.data('view-args').context);
|
||||
var _custom = $detailView.data('_custom');
|
||||
@ -314,7 +315,8 @@
|
||||
ref: {
|
||||
id: id
|
||||
},
|
||||
context: context
|
||||
context: context,
|
||||
jsonObj: jsonObj
|
||||
});
|
||||
} else if (action.listView) {
|
||||
cloudStack.dialog.listView({
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user