B #1706: Doesn't retrieve the capacity unit in volatile disks

(cherry picked from commit 7e80db3c8d)
This commit is contained in:
Abel Coronado authored and Tino Vazquez committed 2018-02-08 16:05:52 +01:00
1 parent 2e25760d40
commit 950da09d2f
1 file changed
+3 -3
@@ -151,8 +151,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;
@@ -171,7 +171,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();
}