mirror of
https://github.com/apache/cloudstack.git
synced 2025-11-02 20:02:29 +01:00
bug 13675
Hide unused text fields for ICMP vs TCP selection
This commit is contained in:
parent
d41ad93f0f
commit
9d954fa815
@ -1473,11 +1473,18 @@
|
||||
});
|
||||
|
||||
if ($(this).val() == 'icmp') {
|
||||
$icmpFields.show();
|
||||
$icmpFields.attr('disabled', false);
|
||||
$otherFields.attr('disabled', 'disabled');
|
||||
$otherFields.hide();
|
||||
$otherFields.parent().find('label.error').hide();
|
||||
} else {
|
||||
$otherFields.show();
|
||||
$otherFields.parent().find('label.error').hide();
|
||||
$otherFields.attr('disabled', false);
|
||||
$icmpFields.attr('disabled', 'disabled');
|
||||
$icmpFields.hide();
|
||||
$icmpFields.parent().find('label.error').hide();
|
||||
}
|
||||
});
|
||||
|
||||
|
||||
@ -670,7 +670,7 @@
|
||||
var $range = $('<div>').addClass('range').appendTo($td);
|
||||
|
||||
$(field.range).each(function() {
|
||||
$('<input>')
|
||||
var $input = $('<input>')
|
||||
.attr({
|
||||
name: this,
|
||||
type: 'text'
|
||||
@ -680,9 +680,11 @@
|
||||
.appendTo(
|
||||
$('<div>').addClass('range-item').appendTo($range)
|
||||
);
|
||||
|
||||
if (field.isDisabled) $input.hide();
|
||||
});
|
||||
} else {
|
||||
$('<input>')
|
||||
var $input = $('<input>')
|
||||
.attr({
|
||||
name: fieldName,
|
||||
type: field.isPassword ? 'password' : 'text'
|
||||
@ -690,6 +692,8 @@
|
||||
.addClass(!field.isOptional ? 'required' : null)
|
||||
.attr('disabled', field.isDisabled ? 'disabled' : false)
|
||||
.appendTo($td);
|
||||
|
||||
if (field.isDisabled) $input.hide();
|
||||
}
|
||||
} else if (field.custom) {
|
||||
$('<div>').addClass('button add-vm custom-action')
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user