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
e74969fdec
commit
9bf7d757e8
|
|
@ -782,6 +782,7 @@
|
|||
);
|
||||
|
||||
if (field.isDisabled) $input.hide();
|
||||
if (field.defaultValue) $input.val(field.defaultValue);
|
||||
});
|
||||
} else {
|
||||
var $input = $('<input>')
|
||||
|
|
@ -794,6 +795,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')
|
||||
|
|
@ -821,6 +823,8 @@
|
|||
_l(args.add.label)
|
||||
).appendTo($td);
|
||||
}
|
||||
|
||||
if (field.desc) $input.attr('title', field.desc);
|
||||
});
|
||||
|
||||
// Setup header fields
|
||||
|
|
|
|||
Loading…
Reference in New Issue