Skip to content

Commit 4f49bf6

Browse files
ernjvryadvr
authored andcommitted
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.
1 parent 2be51ac commit 4f49bf6

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

ui/scripts/templates.js

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -251,12 +251,14 @@
251251
$form.find('.form-item[rel=xenserverToolsVersion61plus]').hide();
252252
$form.find('.form-item[rel=rootDiskControllerTypeKVM]').hide();
253253
$form.find('.form-item[rel=directdownload]').hide();
254+
$form.find('.form-item[rel=requireshvm]').hide();
254255
} else if ($(this).val() == "XenServer") {
255256
$form.find('.form-item[rel=rootDiskControllerType]').hide();
256257
$form.find('.form-item[rel=nicAdapterType]').hide();
257258
$form.find('.form-item[rel=keyboardType]').hide();
258259
$form.find('.form-item[rel=rootDiskControllerTypeKVM]').hide();
259260
$form.find('.form-item[rel=directdownload]').hide();
261+
$form.find('.form-item[rel=requireshvm]').css('display', 'inline-block');
260262

261263
if (isAdmin()) {
262264
$form.find('.form-item[rel=xenserverToolsVersion61plus]').css('display', 'inline-block');
@@ -268,6 +270,7 @@
268270
$form.find('.form-item[rel=xenserverToolsVersion61plus]').hide();
269271
$form.find('.form-item[rel=rootDiskControllerTypeKVM]').css('display', 'inline-block');
270272
$('#label_root_disk_controller').prop('selectedIndex', 2);
273+
$form.find('.form-item[rel=requireshvm]').css('display', 'inline-block');
271274
if (isAdmin()) {
272275
$form.find('.form-item[rel=directdownload]').css('display', 'inline-block');
273276
}
@@ -278,6 +281,7 @@
278281
$form.find('.form-item[rel=xenserverToolsVersion61plus]').hide();
279282
$form.find('.form-item[rel=rootDiskControllerTypeKVM]').hide();
280283
$form.find('.form-item[rel=directdownload]').hide();
284+
$form.find('.form-item[rel=requireshvm]').css('display', 'inline-block');
281285
}
282286
});
283287

0 commit comments

Comments
 (0)