Import of W&K seminar exports with preview, booking form via form generator with event-dependent field rules, notification routing, inbox with folders and CSV export for W&K. Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
33 lines
1.3 KiB
PHP
33 lines
1.3 KiB
PHP
<?php
|
|
|
|
declare(strict_types=1);
|
|
|
|
use Contao\CoreBundle\DataContainer\PaletteManipulator;
|
|
use Mummert\ContaoWkSyncBundle\Controller\FrontendModule\BookingFormController;
|
|
use Mummert\ContaoWkSyncBundle\Controller\FrontendModule\BookingStatusController;
|
|
|
|
$dca = &$GLOBALS['TL_DCA']['tl_module'];
|
|
|
|
// Eigene Module
|
|
$dca['palettes'][BookingFormController::TYPE] = '{title_legend},name,headline,type;{config_legend},cal_calendar;{template_legend:hide},customTpl;{protected_legend:hide},protected;{expert_legend:hide},cssID';
|
|
$dca['palettes'][BookingStatusController::TYPE] = '{title_legend},name,headline,type;{config_legend},cal_calendar;{template_legend:hide},customTpl;{protected_legend:hide},protected;{expert_legend:hide},cssID';
|
|
|
|
// Kategoriefilter für die Kalender-Module des Contao-Kerns
|
|
$dca['fields']['wkCategories'] = [
|
|
'inputType' => 'checkbox',
|
|
'foreignKey' => 'tl_wk_category.title',
|
|
'eval' => ['multiple' => true, 'tl_class' => 'clr'],
|
|
'sql' => ['type' => 'blob', 'length' => 65535, 'notnull' => false],
|
|
];
|
|
|
|
foreach (['eventlist', 'eventmenu', 'eventmenucal_day', 'calendar'] as $palette) {
|
|
if (!isset($dca['palettes'][$palette])) {
|
|
continue;
|
|
}
|
|
|
|
PaletteManipulator::create()
|
|
->addField('wkCategories', 'cal_calendar', PaletteManipulator::POSITION_AFTER)
|
|
->applyToPalette($palette, 'tl_module')
|
|
;
|
|
}
|