Просмотр исходного кода

change memory from text to range

andre 4 лет назад
Родитель
Сommit
681cd04d66
1 измененных файлов с 1 добавлено и 1 удалено
  1. 1 1
      app/UI/VmCreate/Sections/Qemu/GeneralSection.php

+ 1 - 1
app/UI/VmCreate/Sections/Qemu/GeneralSection.php

@@ -126,7 +126,7 @@ class GeneralSection extends HalfPageSection
             $this->addField($field);
         }
         //memory
-        $field = new Text('memory');
+        $field = new Range('memory', $this->resourceManager->memory()->getMin(), $this->resourceManager->memory()->free());
         $field->addValidator(new NumberValidator($this->resourceManager->memory()->getMin(), $this->resourceManager->memory()->free(),true));
         $field->setDefaultValue($this->configuration()->serverMemory->min);
         $field->setDescription('description');