Skip to content

Commit

Permalink
fixed issues with contao 4.13
Browse files Browse the repository at this point in the history
  • Loading branch information
koertho committed May 17, 2022
1 parent 6311a41 commit 04cd41d
Show file tree
Hide file tree
Showing 4 changed files with 18 additions and 10 deletions.
4 changes: 2 additions & 2 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,8 @@

All notable changes to this project will be documented in this file.

## [Unreleased] - 2022-05-17
- Changed: small refactoring
## [1.9.1] - 2022-05-17
- Fixed: issues with contao 4.13

## [1.9.0] - 2022-05-05
- Changed: dropped contao 4.4 and symfony 3 support
Expand Down
5 changes: 5 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@ This bundle offers useful functionality concerning the entities `tl_calendar` an
- adds a dateAdded field for `tl_calendar_events`
- adds the `feature` operation to `tl_calendar_events` (and `tl_calendar_sub_events` if used) as already existing in `tl_news`
- adds some new fields (see below)
- Calendar event coordinates

## Installation

Expand All @@ -33,6 +34,10 @@ The `tl_calendar_sub_events` dca is created by copying the dca of `tl_calendar_e

A new field `parentEVent` is added to `tl_calendar_events`

### Coordinates

Can be disabled in settings.

### New fields

- dateAdded (auto-generated)
Expand Down
11 changes: 11 additions & 0 deletions src/EventListener/LoadDataContainerListener.php
Original file line number Diff line number Diff line change
Expand Up @@ -70,6 +70,17 @@ public function onLoadDataContainer(string $table): void
], 'feature'
);
}

if (!\array_key_exists('featured', $dca['fields'])) {
$dca['fields']['featured'] = [
'label' => &$GLOBALS['TL_LANG']['tl_calendar_events']['featured'],
'exclude' => true,
'filter' => true,
'inputType' => 'checkbox',
'eval' => ['tl_class' => 'w50 m12'],
'sql' => "char(1) NOT NULL default ''",
];
}
}
}
}
8 changes: 0 additions & 8 deletions src/Resources/contao/dca/tl_calendar_events.php
Original file line number Diff line number Diff line change
Expand Up @@ -36,14 +36,6 @@
'eval' => ['maxlength' => 255, 'tl_class' => 'w50'],
'sql' => "varchar(255) NOT NULL default ''",
],
'featured' => [
'label' => &$GLOBALS['TL_LANG']['tl_calendar_events']['featured'],
'exclude' => true,
'filter' => true,
'inputType' => 'checkbox',
'eval' => ['tl_class' => 'w50 m12'],
'sql' => "char(1) NOT NULL default ''",
],
'shortTitle' => [
'label' => &$GLOBALS['TL_LANG']['tl_calendar_events']['shortTitle'],
'inputType' => 'text',
Expand Down

0 comments on commit 04cd41d

Please sign in to comment.