OpenWebconcept / plugin-openagenda-base

This plugin adds Events and Locations to WordPress which can be retrieved via the OpenAgenda REST API.
European Union Public License 1.2
0 stars 0 forks source link

#16 fix for saving and showing the right fields for either specific dates type or complex dates type #17

Closed eyalacato closed 6 months ago

eyalacato commented 6 months ago

This fix is a 3-way fix: 1) In entering an event in the CMS, only show the specific group fields if in the field dates_types the selected value is specific. And only show the complex group fields if complex is selected. 2) When saving an event, the post_meta values of the NOT-selected dates_types group fields are deleted, where CMB2 automatically saves them. 3) When retrieving an event via the REST API, the dates array and the next_date value is empty when the dates_types is complex but no rows are added in the group, and the same for the specific group.