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

This commit is contained in:
Abel Coronado authored and Ruben S. Montero committed 2018-02-02 17:35:26 +01:00
1 parent 9ed250e68b
commit 7e80db3c8d
1 file changed
+3 -3
@@ -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();
}