mirror of
https://github.com/apache/cloudstack.git
synced 2025-11-03 04:12:31 +01:00
CS-14017: create network offering - when Guest Type is Shared, check and disable Specify VLAN checkbox. When Guest Type is Isolated, enable Specify VLAN checkbox.
This commit is contained in:
parent
ccc737e8c0
commit
46c76b7948
@ -1201,10 +1201,11 @@
|
||||
args.$select.change(function() {
|
||||
var $form = $(this).closest("form");
|
||||
|
||||
if ($(this).val() == "Shared") {
|
||||
$form.find('.form-item[rel=specifyVlan]').hide();
|
||||
} else { //$(this).val() == "Isolated"
|
||||
$form.find('.form-item[rel=specifyVlan]').css('display', 'inline-block');
|
||||
if ($(this).val() == "Shared") {
|
||||
$form.find('.form-item[rel=specifyVlan]').find('input[type=checkbox]').attr("disabled", "disabled"); //make it read-only
|
||||
$form.find('.form-item[rel=specifyVlan]').find('input[type=checkbox]').attr('checked', true); //make it checked
|
||||
} else { //$(this).val() == "Isolated"
|
||||
$form.find('.form-item[rel=specifyVlan]').find('input[type=checkbox]').removeAttr("disabled"); //make it editable
|
||||
}
|
||||
});
|
||||
}
|
||||
@ -1488,8 +1489,8 @@
|
||||
}).join(',');
|
||||
|
||||
|
||||
if(inputData['guestIpType'] == "Shared"){ //specifyVlan checkbox is hidden
|
||||
inputData['specifyVlan'] = true;
|
||||
if(inputData['guestIpType'] == "Shared"){ //specifyVlan checkbox is disabled, so inputData won't include specifyVlan
|
||||
inputData['specifyVlan'] = true; //hardcode inputData['specifyVlan']
|
||||
inputData['specifyIpRanges'] = true;
|
||||
}
|
||||
else if (inputData['guestIpType'] == "Isolated") { //specifyVlan checkbox is shown
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user