diff --git a/src/sunstone/public/app/tabs/templates-tab/form-panels/create/wizard-tabs/storage/disk-tab.js b/src/sunstone/public/app/tabs/templates-tab/form-panels/create/wizard-tabs/storage/disk-tab.js index 430847c5f7..6627ba81d7 100644 --- a/src/sunstone/public/app/tabs/templates-tab/form-panels/create/wizard-tabs/storage/disk-tab.js +++ b/src/sunstone/public/app/tabs/templates-tab/form-panels/create/wizard-tabs/storage/disk-tab.js @@ -155,8 +155,8 @@ define(function(require) { selectedContext = $("div.image", context); } else { selectedContext = $("div.volatile", context); - var typeKvm = $("#TYPE_KVM", context).val(); - var typeVcenter = $("#TYPE_VCENTER", context).val(); + var typeKvm = $("#TYPE_KVM", selectedContext).val(); + var typeVcenter = $("#TYPE_VCENTER", selectedContext).val(); var type = "fs"; if(typeKvm != "fs"){ type = typeKvm; @@ -175,7 +175,7 @@ define(function(require) { tmpl.TYPE = type; } - if(tmpl.SIZE != undefined && $(".mb_input_unit", context).val() == "GB"){ + if(tmpl.SIZE != undefined && $(".mb_input_unit", selectedContext).val() == "GB"){ tmpl.SIZE = tmpl.SIZE * 1024; tmpl.SIZE = tmpl.SIZE.toString(); }