Replace the template options callback with toolkit 3.0 listener.

This commit is contained in:
David Molineus
2017-10-06 14:35:42 +02:00
parent 3828c9ce13
commit 47713e8a38
2 changed files with 12 additions and 2 deletions

View File

@@ -71,10 +71,15 @@ $GLOBALS['TL_DCA']['tl_content']['fields']['leaflet_template'] = array(
'label' => &$GLOBALS['TL_LANG']['tl_content']['leaflet_template'], 'label' => &$GLOBALS['TL_LANG']['tl_content']['leaflet_template'],
'inputType' => 'select', 'inputType' => 'select',
'exclude' => true, 'exclude' => true,
'options_callback' => \Netzmacht\Contao\Toolkit\Dca\Callback\CallbackFactory::getTemplates('leaflet_map_js'), 'options_callback' => ['netzmacht.contao_toolkit.dca.listeners.template_options', 'handleOptionsCallback'],
'eval' => array( 'eval' => array(
'tl_class' => 'w50', 'tl_class' => 'w50',
'chosen' => true, 'chosen' => true,
), ),
'toolkit' => [
'template_options' => [
'prefix' => 'leaflet_map_js'
]
],
'sql' => "varchar(64) NOT NULL default ''" 'sql' => "varchar(64) NOT NULL default ''"
); );

View File

@@ -71,10 +71,15 @@ $GLOBALS['TL_DCA']['tl_module']['fields']['leaflet_template'] = array(
'label' => &$GLOBALS['TL_LANG']['tl_module']['leaflet_template'], 'label' => &$GLOBALS['TL_LANG']['tl_module']['leaflet_template'],
'inputType' => 'select', 'inputType' => 'select',
'exclude' => true, 'exclude' => true,
'options_callback' => \Netzmacht\Contao\Toolkit\Dca\Callback\CallbackFactory::getTemplates('leaflet_map_js'), 'options_callback' => ['netzmacht.contao_toolkit.dca.listeners.template_options', 'handleOptionsCallback'],
'eval' => array( 'eval' => array(
'tl_class' => 'w50', 'tl_class' => 'w50',
'chosen' => true, 'chosen' => true,
), ),
'toolkit' => [
'template_options' => [
'prefix' => 'leaflet_map_js'
]
],
'sql' => "varchar(64) NOT NULL default ''" 'sql' => "varchar(64) NOT NULL default ''"
); );