Kaynağa Gözat

try to disable delete button on root disk

andre 4 yıl önce
ebeveyn
işleme
5c30875170

+ 0 - 11
app/UI/Disk/Buttons/DeleteButton.php

@@ -28,21 +28,10 @@ class DeleteButton extends ButtonDataTableModalAction implements ClientArea
 
     public function initContent()
     {
-        parent::initContent();
         $this->initIds('deleteDiskButton');
         $this->setDisableByColumnValue("master", true);
         $this->switchToRemoveBtn();
         $this->initLoadModalAction(new DeleteModal());
-
-        logModuleCall(
-            'proxmoxCloud',
-            __FUNCTION__,
-            parent::getData(),
-            'Debug',
-            parent::getId()
-        );
-        
-        $this->addClass('disabled');
     }
 
 }

+ 9 - 0
app/UI/Disk/Pages/DiskDataTable.php

@@ -65,6 +65,15 @@ class DiskDataTable extends DataTable implements ClientArea
         $this->addActionButton(new UpdateButton());
         //Delete
         $this->addActionButton(new DeleteButton());
+
+        logModuleCall(
+            'proxmoxCloud',
+            __FUNCTION__,
+            $this->getData() ,
+            'Debug',
+            $this->getRawTitle()
+        );
+        
     }
 
     protected function loadHtml()