Initial survey bundle import
This commit is contained in:
@@ -0,0 +1,70 @@
|
||||
<?php
|
||||
|
||||
declare(strict_types=1);
|
||||
|
||||
use Contao\DC_Table;
|
||||
|
||||
$GLOBALS['TL_DCA']['tl_survey_category'] = [
|
||||
'config' => [
|
||||
'dataContainer' => DC_Table::class,
|
||||
'enableVersioning' => true,
|
||||
'sql' => [
|
||||
'keys' => [
|
||||
'id' => 'primary',
|
||||
'alias' => 'index',
|
||||
'sorting' => 'index',
|
||||
],
|
||||
],
|
||||
],
|
||||
'list' => [
|
||||
'sorting' => [
|
||||
'mode' => 1,
|
||||
'fields' => ['sorting'],
|
||||
'panelLayout' => 'sort,search,limit',
|
||||
],
|
||||
'label' => [
|
||||
'fields' => ['title', 'alias'],
|
||||
'showColumns' => true,
|
||||
],
|
||||
'operations' => [
|
||||
'edit' => [
|
||||
'href' => 'act=edit',
|
||||
'icon' => 'edit.svg',
|
||||
],
|
||||
'delete' => [
|
||||
'href' => 'act=delete',
|
||||
'icon' => 'delete.svg',
|
||||
'attributes' => 'onclick="if(!confirm(\'Eintrag wirklich loeschen?\'))return false;Backend.getScrollOffset()"',
|
||||
],
|
||||
'show' => [
|
||||
'href' => 'act=show',
|
||||
'icon' => 'show.svg',
|
||||
],
|
||||
],
|
||||
],
|
||||
'palettes' => [
|
||||
'default' => '{title_legend},title,alias,sorting',
|
||||
],
|
||||
'fields' => [
|
||||
'id' => ['sql' => 'int(10) unsigned NOT NULL auto_increment'],
|
||||
'tstamp' => ['sql' => 'int(10) unsigned NOT NULL default 0'],
|
||||
'title' => [
|
||||
'label' => &$GLOBALS['TL_LANG']['tl_survey_category']['title'],
|
||||
'inputType' => 'text',
|
||||
'eval' => ['mandatory' => true, 'maxlength' => 255, 'tl_class' => 'w50'],
|
||||
'sql' => "varchar(255) NOT NULL default ''",
|
||||
],
|
||||
'alias' => [
|
||||
'label' => &$GLOBALS['TL_LANG']['tl_survey_category']['alias'],
|
||||
'inputType' => 'text',
|
||||
'eval' => ['maxlength' => 128, 'tl_class' => 'w50'],
|
||||
'sql' => "varchar(128) NOT NULL default ''",
|
||||
],
|
||||
'sorting' => [
|
||||
'label' => &$GLOBALS['TL_LANG']['tl_survey_category']['sorting'],
|
||||
'inputType' => 'text',
|
||||
'eval' => ['rgxp' => 'natural', 'tl_class' => 'w50'],
|
||||
'sql' => 'int(10) unsigned NOT NULL default 0',
|
||||
],
|
||||
],
|
||||
];
|
||||
Reference in New Issue
Block a user