]> _ Git - cubist_cms-back.git/commitdiff
#2783
authorVincent Vanwaelscappel <vincent@cubedesigners.com>
Tue, 21 May 2019 15:40:36 +0000 (17:40 +0200)
committerVincent Vanwaelscappel <vincent@cubedesigners.com>
Tue, 21 May 2019 15:40:36 +0000 (17:40 +0200)
src/app/Http/Controllers/CubistModelCrudController.php

index a4176424cd8e633c578d2fc41efb6f7639516ae0..ac06050cdea924c3f6069608423b656a32d0bc66 100644 (file)
@@ -33,20 +33,9 @@ class CubistModelCrudController extends CrudController
         |--------------------------------------------------------------------------
         */
 
-        // TODO: remove setFromDb() and manually define Fields and Columns
         $this->crud->addField(['type' => 'text', 'name' => 'name', 'label' => 'Template table name'], 'create');
         $this->crud->addField(['type' => 'text', 'name' => 'label', 'label' => 'Tamplate label'], 'both');
-        $this->crud->addField([   // Table
-            'name' => 'attributes',
-            'label' => 'Fields definitions',
-            'type' => 'table',
-            'entity_singular' => 'field', // used on the "Add X" button
-            'columns' => [
-                'name' => 'Name',
-                'desc' => 'Label',
-                'price' => 'Attributes'
-            ],
-        ], 'both');
+        $this->crud->addField(['type' => 'textarea', 'name' => 'attributes', 'label' => 'Fields definitions'], 'both');
 
         // add asterisk for fields that are required in ModelRequest
         $this->crud->setRequiredFields(StoreRequest::class, 'create');