فهرست منبع

change test to slider for disk create

andre 4 سال پیش
والد
کامیت
d70cc06bfb
2فایلهای تغییر یافته به همراه8 افزوده شده و 3 حذف شده
  1. 3 3
      app/UI/Disk/Forms/UpdateForm.php
  2. 5 0
      core/UI/Widget/Forms/Fields/Range.php

+ 3 - 3
app/UI/Disk/Forms/UpdateForm.php

@@ -44,9 +44,9 @@ class UpdateForm extends BaseForm implements ClientArea
         $this->initFields();
         $this->loadDataToForm();
         $rangeField = $this->getField('additionalDiskSize');
-        $rangeField->minValue = parent::getFormData()['size'];
-        $rangeField->defaultValue = parent::getFormData()['size'];
-        $this->reloadForm();
+        $rangeField->setMinValue(parent::getFormData()['size']);
+        $rangeField->setDefaultValue(parent::getFormData()['size']);
+//        $this->reloadForm();
 
         logModuleCall(
             'proxmoxCloud',

+ 5 - 0
core/UI/Widget/Forms/Fields/Range.php

@@ -29,6 +29,11 @@ class Range extends BaseField
         return $this->minValue;
     }
 
+    public function setMinValue($minValue)
+    {
+        $this->minValue = $minValue;
+    }
+
     public function getMaxValue()
     {
         return $this->maxValue;