Merge "The minimum volume size should be pre-populated"
This commit is contained in:
commit
1dc560a9fd
@ -57,16 +57,9 @@ horizon.forms = {
|
||||
$volName.val($option.data("name"));
|
||||
}
|
||||
var $volSize = $form.find('input#id_size');
|
||||
var volSize = parseInt($volSize.val(), 10) || -1;
|
||||
var dataSize = parseInt($option.data("size"), 10) || -1;
|
||||
var minDiskSize = parseInt($option.data("min_disk"), 10) || -1;
|
||||
var defaultVolSize = dataSize;
|
||||
if (minDiskSize > defaultVolSize) {
|
||||
defaultVolSize = minDiskSize;
|
||||
}
|
||||
if (volSize < defaultVolSize) {
|
||||
$volSize.val(defaultVolSize);
|
||||
}
|
||||
var minDiskSize = parseInt($option.data("min_disk"), 10) || 1;
|
||||
$volSize.val(Math.max(minDiskSize, dataSize));
|
||||
});
|
||||
},
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user