Skip to content

Commit

Permalink
Added support for notification center
Browse files Browse the repository at this point in the history
  • Loading branch information
aschempp committed Jan 17, 2024
1 parent affa0e8 commit 47ba88f
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 2 deletions.
1 change: 1 addition & 0 deletions composer.json
Expand Up @@ -38,6 +38,7 @@
},
"require-dev": {
"contao/manager-plugin": "^2.0",
"terminal42/notification_center": "^1 || ^2",
"terminal42/contao-build-tools": "dev-main"
},
"conflict": {
Expand Down
8 changes: 7 additions & 1 deletion contao/dca/tl_module.php
Expand Up @@ -5,11 +5,17 @@
$GLOBALS['TL_DCA']['tl_module']['palettes']['__selector__'][] = 'reg_allowLogin';
$GLOBALS['TL_DCA']['tl_module']['subpalettes']['reg_allowLogin'] = 'reg_autoActivate';

PaletteManipulator::create()
$pm = PaletteManipulator::create()
->addField('reg_activateLogin', 'reg_jumpTo', PaletteManipulator::POSITION_BEFORE)
->applyToSubpalette('reg_activate', 'tl_module')
;

if (isset($GLOBALS['TL_DCA']['tl_module']['subpalettes']['nc_registration_auto_activate'])) {
$pm->applyToSubpalette('nc_registration_auto_activate', 'tl_module');
}

unset($pm);

/*
* Fields
*/
Expand Down
2 changes: 1 addition & 1 deletion src/ContaoManager/Plugin.php
Expand Up @@ -16,7 +16,7 @@ public function getBundles(ParserInterface $parser): array
{
return [
BundleConfig::create(Terminal42AutoRegistrationBundle::class)
->setLoadAfter([ContaoCoreBundle::class])
->setLoadAfter([ContaoCoreBundle::class, 'notification_center'])
->setReplace(['autoregistration']),
];
}
Expand Down

0 comments on commit 47ba88f

Please sign in to comment.