From 7e80db3c8d40cd885ee8ea3a3dfd64df6f044e41 Mon Sep 17 00:00:00 2001 From: Abel Coronado Date: Fri, 2 Feb 2018 17:35:26 +0100 Subject: [PATCH] B #1706: Doesn't retrieve the capacity unit in volatile disks --- .../form-panels/create/wizard-tabs/storage/disk-tab.js | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) 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(); }