forked from Snck3rs/contao-leaflet-maps
Replace the template options callback with toolkit 3.0 listener.
This commit is contained in:
@@ -71,10 +71,15 @@ $GLOBALS['TL_DCA']['tl_content']['fields']['leaflet_template'] = array(
|
||||
'label' => &$GLOBALS['TL_LANG']['tl_content']['leaflet_template'],
|
||||
'inputType' => 'select',
|
||||
'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(
|
||||
'tl_class' => 'w50',
|
||||
'chosen' => true,
|
||||
),
|
||||
'toolkit' => [
|
||||
'template_options' => [
|
||||
'prefix' => 'leaflet_map_js'
|
||||
]
|
||||
],
|
||||
'sql' => "varchar(64) NOT NULL default ''"
|
||||
);
|
||||
|
||||
@@ -71,10 +71,15 @@ $GLOBALS['TL_DCA']['tl_module']['fields']['leaflet_template'] = array(
|
||||
'label' => &$GLOBALS['TL_LANG']['tl_module']['leaflet_template'],
|
||||
'inputType' => 'select',
|
||||
'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(
|
||||
'tl_class' => 'w50',
|
||||
'chosen' => true,
|
||||
),
|
||||
'toolkit' => [
|
||||
'template_options' => [
|
||||
'prefix' => 'leaflet_map_js'
|
||||
]
|
||||
],
|
||||
'sql' => "varchar(64) NOT NULL default ''"
|
||||
);
|
||||
|
||||
Reference in New Issue
Block a user