Explorar el Código

try to fix the detailed view

andre hace 4 años
padre
commit
7ca34c62ee

+ 1 - 0
app/UI/VmUpdate/Providers/VmUpdateProvider.php

@@ -52,6 +52,7 @@ class VmUpdateProvider extends VmCreateProvider
         $this->data =  $this->vmModel->toArray();
         $vm = \ModulesGarden\ProxmoxAddon\Core\Helper\sl('Vm')->getVm();
         $config = $vm->config();
+        $this->data['ciuser'] =  $this->vmModel->getCiuser();
         $this->data['password'] = $this->vmModel->getPassword();
         $this->data['description'] = html_entity_decode($config['description']);
         $this->data['searchdomain'] = $config['searchdomain'];

+ 8 - 0
app/UI/VmUpdate/Sections/Qemu/GeneralSection.php

@@ -56,6 +56,14 @@ class GeneralSection extends BaseSection
             $field->notEmpty();
             $this->addField($field);
         }
+        //user
+        if($this->configuration()->isPermissionUsername()){
+            $field = new Text('ciuser');
+            $field->addValidator(new UserValidator());
+            $field->setDefaultValue($this->configuration()->getCiuser());
+            $field->setDescription('description');
+            $this->addField($field);
+        }
         //password
         if($this->configuration()->isPermissionPassword()){
             $field = new Text('password');