ui: hide hvm tickbox for vmware, otherwise display (#2781)

On the 'Register Template From URL' screen, when a user selects the VMware option from the Hypervisor dropdown:

It incorrectly displays the 'HVM' checkbox.
This checkbox must be hidden in the VMware context.
This checkbox must still be visible in any other hypervisor context.

To Reproduce:
Go to the 'Register Template From URL' screen by clicking the 'Templates' tab on the lefthand side.
On the 'Templates' screen click the 'Add' button to display the 'Register Template From URL' screen.
On the 'Register Template From URL' screen, select the VMware option from the Hypervisor dropdown:

Actual Behaviour:
It incorrectly displays the 'HVM' checkbox.

Expected behaviour:
This checkbox must be hidden in the VMware context.
This checkbox must still be visible in any other hypervisor context.
This commit is contained in:
ernjvr 2018-08-01 13:06:11 +02:00 committed by Rohit Yadav
parent 2be51ac18d
commit 4f49bf6770
1 changed files with 4 additions and 0 deletions

View File

@ -251,12 +251,14 @@
$form.find('.form-item[rel=xenserverToolsVersion61plus]').hide();
$form.find('.form-item[rel=rootDiskControllerTypeKVM]').hide();
$form.find('.form-item[rel=directdownload]').hide();
$form.find('.form-item[rel=requireshvm]').hide();
} else if ($(this).val() == "XenServer") {
$form.find('.form-item[rel=rootDiskControllerType]').hide();
$form.find('.form-item[rel=nicAdapterType]').hide();
$form.find('.form-item[rel=keyboardType]').hide();
$form.find('.form-item[rel=rootDiskControllerTypeKVM]').hide();
$form.find('.form-item[rel=directdownload]').hide();
$form.find('.form-item[rel=requireshvm]').css('display', 'inline-block');
if (isAdmin()) {
$form.find('.form-item[rel=xenserverToolsVersion61plus]').css('display', 'inline-block');
@ -268,6 +270,7 @@
$form.find('.form-item[rel=xenserverToolsVersion61plus]').hide();
$form.find('.form-item[rel=rootDiskControllerTypeKVM]').css('display', 'inline-block');
$('#label_root_disk_controller').prop('selectedIndex', 2);
$form.find('.form-item[rel=requireshvm]').css('display', 'inline-block');
if (isAdmin()) {
$form.find('.form-item[rel=directdownload]').css('display', 'inline-block');
}
@ -278,6 +281,7 @@
$form.find('.form-item[rel=xenserverToolsVersion61plus]').hide();
$form.find('.form-item[rel=rootDiskControllerTypeKVM]').hide();
$form.find('.form-item[rel=directdownload]').hide();
$form.find('.form-item[rel=requireshvm]').css('display', 'inline-block');
}
});