Release: CalDAV sync bundle hardening and LMW sync
This commit is contained in:
@@ -0,0 +1,80 @@
|
||||
<?php
|
||||
|
||||
declare(strict_types=1);
|
||||
|
||||
use Contao\CoreBundle\DataContainer\PaletteManipulator;
|
||||
|
||||
foreach (array_keys($GLOBALS['TL_DCA']['tl_calendar_events']['palettes'] ?? []) as $paletteName) {
|
||||
if ('__selector__' === $paletteName) {
|
||||
continue;
|
||||
}
|
||||
|
||||
PaletteManipulator::create()
|
||||
->addLegend('caldav_legend', 'expert_legend', PaletteManipulator::POSITION_AFTER)
|
||||
->addField('caldavCalendarHref', 'caldav_legend', PaletteManipulator::POSITION_APPEND)
|
||||
->addField('caldavUid', 'caldav_legend', PaletteManipulator::POSITION_APPEND)
|
||||
->addField('caldavHref', 'caldav_legend', PaletteManipulator::POSITION_APPEND)
|
||||
->addField('caldavEtag', 'caldav_legend', PaletteManipulator::POSITION_APPEND)
|
||||
->addField('caldavSyncHash', 'caldav_legend', PaletteManipulator::POSITION_APPEND)
|
||||
->addField('caldavLastSync', 'caldav_legend', PaletteManipulator::POSITION_APPEND)
|
||||
->addField('caldavOrigin', 'caldav_legend', PaletteManipulator::POSITION_APPEND)
|
||||
->addField('caldavSyncState', 'caldav_legend', PaletteManipulator::POSITION_APPEND)
|
||||
->applyToPalette($paletteName, 'tl_calendar_events')
|
||||
;
|
||||
}
|
||||
|
||||
$GLOBALS['TL_DCA']['tl_calendar_events']['fields']['caldavCalendarHref'] = [
|
||||
'exclude' => true,
|
||||
'inputType' => 'text',
|
||||
'eval' => ['maxlength' => 2048, 'readonly' => true, 'doNotCopy' => true, 'tl_class' => 'clr'],
|
||||
'sql' => "varchar(2048) NOT NULL default ''",
|
||||
];
|
||||
|
||||
$GLOBALS['TL_DCA']['tl_calendar_events']['fields']['caldavUid'] = [
|
||||
'exclude' => true,
|
||||
'inputType' => 'text',
|
||||
'eval' => ['maxlength' => 255, 'readonly' => true, 'doNotCopy' => true, 'tl_class' => 'clr'],
|
||||
'sql' => "varchar(255) NOT NULL default ''",
|
||||
];
|
||||
|
||||
$GLOBALS['TL_DCA']['tl_calendar_events']['fields']['caldavHref'] = [
|
||||
'exclude' => true,
|
||||
'inputType' => 'text',
|
||||
'eval' => ['maxlength' => 2048, 'readonly' => true, 'doNotCopy' => true, 'tl_class' => 'clr'],
|
||||
'sql' => "varchar(2048) NOT NULL default ''",
|
||||
];
|
||||
|
||||
$GLOBALS['TL_DCA']['tl_calendar_events']['fields']['caldavEtag'] = [
|
||||
'exclude' => true,
|
||||
'inputType' => 'text',
|
||||
'eval' => ['maxlength' => 255, 'readonly' => true, 'doNotCopy' => true, 'tl_class' => 'clr'],
|
||||
'sql' => "varchar(255) NOT NULL default ''",
|
||||
];
|
||||
|
||||
$GLOBALS['TL_DCA']['tl_calendar_events']['fields']['caldavSyncHash'] = [
|
||||
'exclude' => true,
|
||||
'inputType' => 'text',
|
||||
'eval' => ['maxlength' => 64, 'readonly' => true, 'doNotCopy' => true, 'tl_class' => 'clr'],
|
||||
'sql' => "varchar(64) NOT NULL default ''",
|
||||
];
|
||||
|
||||
$GLOBALS['TL_DCA']['tl_calendar_events']['fields']['caldavLastSync'] = [
|
||||
'exclude' => true,
|
||||
'inputType' => 'text',
|
||||
'eval' => ['readonly' => true, 'doNotCopy' => true, 'tl_class' => 'w50'],
|
||||
'sql' => "int(10) unsigned NOT NULL default 0",
|
||||
];
|
||||
|
||||
$GLOBALS['TL_DCA']['tl_calendar_events']['fields']['caldavOrigin'] = [
|
||||
'exclude' => true,
|
||||
'inputType' => 'text',
|
||||
'eval' => ['maxlength' => 16, 'readonly' => true, 'doNotCopy' => true, 'tl_class' => 'w50'],
|
||||
'sql' => "varchar(16) NOT NULL default ''",
|
||||
];
|
||||
|
||||
$GLOBALS['TL_DCA']['tl_calendar_events']['fields']['caldavSyncState'] = [
|
||||
'exclude' => true,
|
||||
'inputType' => 'text',
|
||||
'eval' => ['maxlength' => 32, 'readonly' => true, 'doNotCopy' => true, 'tl_class' => 'w50'],
|
||||
'sql' => "varchar(32) NOT NULL default ''",
|
||||
];
|
||||
Reference in New Issue
Block a user