B #5354: Solved bug wrong size to disk (VM temp update) (#461)

This commit is contained in:
Abel Coronado authored and Tino Vázquez committed 2017-09-07 12:46:27 +02:00
1 parent ea065409b6
commit d597cefe15
1 file changed
+7 -8
@@ -151,7 +151,6 @@ 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 type = "fs";
@@ -168,9 +167,14 @@ define(function(require) {
}
var tmpl = WizardFields.retrieve(selectedContext);
if(type){
tmpl.TYPE = type;
}
tmpl.TYPE = type;
if(tmpl.SIZE != undefined && $(".mb_input_unit", context).val() == "GB"){
tmpl.SIZE = tmpl.SIZE * 1024;
tmpl.SIZE = tmpl.SIZE.toString();
}
var formatKvm = $("#FORMAT_KVM", context).val();
var formatVcenter = $("#FORMAT_VCENTER", context).val();
@@ -180,11 +184,6 @@ define(function(require) {
tmpl.FORMAT = formatVcenter;
}
if($(".mb_input_unit", context).val() == "GB"){
tmpl.SIZE = tmpl.SIZE * 1024;
tmpl.SIZE = tmpl.SIZE.toString();
}
if($("input[name='" + this.diskTabId + "']:checked", context).val() == "image" && !tmpl["IMAGE"] && !tmpl["IMAGE_ID"]){
return {};
}