Clean up obsolete survey editor and DCA code

This commit is contained in:
Jürgen Mummert
2026-06-07 22:16:37 +02:00
parent 497b4f962d
commit b7bcdd8372
10 changed files with 6 additions and 95 deletions
+1 -7
View File
@@ -5,8 +5,6 @@ declare(strict_types=1);
use Contao\DC_Table;
use Mummert\SurveyBundle\EventListener\SurveyDcaListener;
$guardCallback = [SurveyDcaListener::class, 'guardConditionSave'];
$GLOBALS['TL_DCA']['tl_survey_condition'] = [
'config' => [
'dataContainer' => DC_Table::class,
@@ -16,7 +14,6 @@ $GLOBALS['TL_DCA']['tl_survey_condition'] = [
[SurveyDcaListener::class, 'touchSurveyConditionParent'],
],
'ondelete_callback' => [
[SurveyDcaListener::class, 'guardConditionDelete'],
[SurveyDcaListener::class, 'touchSurveyConditionParent'],
],
'sql' => [
@@ -32,7 +29,7 @@ $GLOBALS['TL_DCA']['tl_survey_condition'] = [
'sorting' => [
'mode' => 4,
'fields' => ['id'],
'headerFields' => ['title', 'alias', 'published', 'isLocked'],
'headerFields' => ['title', 'alias', 'published'],
'panelLayout' => 'sort,search,limit',
],
'label' => [
@@ -71,14 +68,12 @@ $GLOBALS['TL_DCA']['tl_survey_condition'] = [
'inputType' => 'select',
'options_callback' => [SurveyDcaListener::class, 'getQuestionOptions'],
'eval' => ['mandatory' => true, 'includeBlankOption' => true, 'chosen' => true, 'tl_class' => 'w50'],
'save_callback' => [$guardCallback],
'sql' => 'int(10) unsigned NOT NULL default 0',
],
'answerValue' => [
'label' => &$GLOBALS['TL_LANG']['tl_survey_condition']['answerValue'],
'inputType' => 'text',
'eval' => ['mandatory' => true, 'maxlength' => 255, 'tl_class' => 'w50'],
'save_callback' => [$guardCallback],
'sql' => "varchar(255) NOT NULL default ''",
],
'targetQuestion' => [
@@ -86,7 +81,6 @@ $GLOBALS['TL_DCA']['tl_survey_condition'] = [
'inputType' => 'select',
'options_callback' => [SurveyDcaListener::class, 'getQuestionOptions'],
'eval' => ['mandatory' => true, 'includeBlankOption' => true, 'chosen' => true, 'tl_class' => 'clr'],
'save_callback' => [$guardCallback],
'sql' => 'int(10) unsigned NOT NULL default 0',
],
],