Refactor type handling to contao-tags and add module tag filters
This commit is contained in:
@@ -70,7 +70,7 @@ $GLOBALS['TL_DCA']['tl_organization'] = [
|
||||
],
|
||||
'palettes' => [
|
||||
'__selector__' => [],
|
||||
'default' => '{title_legend},title,alias,type,isExternal,logo;{address_legend},street,street2,postal,city,state,country;{contact_legend},phone,email,website;{geo_legend},lat,lng;{description_legend},description;{relation_legend},members;{publish_legend},published',
|
||||
'default' => '{title_legend},title,alias,tags,isExternal,logo;{address_legend},street,street2,postal,city,state,country;{contact_legend},phone,email,website;{geo_legend},lat,lng;{description_legend},description;{relation_legend},members;{publish_legend},published',
|
||||
],
|
||||
'fields' => [
|
||||
'id' => [
|
||||
@@ -211,14 +211,17 @@ $GLOBALS['TL_DCA']['tl_organization'] = [
|
||||
'eval' => ['tl_class' => 'w50'],
|
||||
'sql' => ['type' => 'string', 'length' => 1, 'fixed' => true, 'default' => ''],
|
||||
],
|
||||
'type' => [
|
||||
'label' => &$GLOBALS['TL_LANG']['tl_organization']['type'],
|
||||
'tags' => [
|
||||
'label' => &$GLOBALS['TL_LANG']['tl_organization']['tags'],
|
||||
'exclude' => true,
|
||||
'inputType' => 'select',
|
||||
'options' => ['accommodation', 'shopping', 'culture'],
|
||||
'reference' => &$GLOBALS['TL_LANG']['tl_organization']['type_options'],
|
||||
'eval' => ['multiple' => true, 'chosen' => true, 'includeBlankOption' => false, 'tl_class' => 'w50'],
|
||||
'foreignKey' => 'tl_tags.tag',
|
||||
'options_callback' => ['numero2_tags.listener.data_container.tags', 'getTagOptions'],
|
||||
'load_callback' => [['numero2_tags.listener.data_container.tags', 'loadTags']],
|
||||
'save_callback' => [['numero2_tags.listener.data_container.tags', 'saveTags']],
|
||||
'eval' => ['multiple' => true, 'size' => 8, 'tl_class' => 'w50 tags', 'chosen' => true, 'groupTagsByField' => true, 'tagGroup' => 'organization_type'],
|
||||
'sql' => ['type' => 'blob', 'notnull' => false],
|
||||
'relation' => ['type' => 'hasMany', 'load' => 'eager'],
|
||||
],
|
||||
'members' => [
|
||||
'label' => &$GLOBALS['TL_LANG']['tl_organization']['members'],
|
||||
|
||||
Reference in New Issue
Block a user