mirror of https://github.com/apache/cloudstack.git
multiEdit: Support default value and description
-If 'defaultValue' is specified for a text field, then put that value
into the text field on load.
-If 'desc' is specified for any field, then use it as a 'title'
attribute to show a tooltip description.
Example:
'icmptype': {
...
defaultValue: '-1',
desc: 'Please specify -1 if you want to allow all'
...
}
This commit is contained in:
parent
a82ff7b0d1
commit
f169a97096
|
|
@ -801,6 +801,7 @@
|
|||
);
|
||||
|
||||
if (field.isDisabled) $input.hide();
|
||||
if (field.defaultValue) $input.val(field.defaultValue);
|
||||
});
|
||||
} else {
|
||||
var $input = $('<input>')
|
||||
|
|
@ -813,6 +814,7 @@
|
|||
.appendTo($td);
|
||||
|
||||
if (field.isDisabled) $input.hide();
|
||||
if (field.defaultValue) $input.val(field.defaultValue);
|
||||
}
|
||||
} else if (field.custom) {
|
||||
$('<div>').addClass('button add-vm custom-action')
|
||||
|
|
@ -841,6 +843,8 @@
|
|||
_l(args.add.label)
|
||||
).appendTo($td);
|
||||
}
|
||||
|
||||
if (field.desc) $input.attr('title', field.desc);
|
||||
});
|
||||
|
||||
// Setup header fields
|
||||
|
|
|
|||
Loading…
Reference in New Issue