Description:
When using the Recurring Events module with the Gin theme, the "Published" checkbox does not appear correctly in the sticky action header.
This issue occurs in the following forms:
eventseries_default_edit_formeventseries_default_add_formeventinstance_default_edit_formeventinstance_default_add_form
Steps to Reproduce:
- Enable the Recurring Events module and the Gin theme.
- Edit or add an event series or instance.
- Observe that the "Published" checkbox is not placed in the sticky action header.
Expected Behavior:
The "Published" checkbox should be placed in the Gin sticky action header, as is the case with other content types in Gin.
Proposed Solution:
I have resolved this issue in my custom module using the following hook_form_alter() implementation:
/** * Implements hook_form_alter(). * * - Move the "Published" checkbox gin sticky action header. */ function dpl_event_form_alter(array &$form, FormStateInterface $form_state, string $form_id): void { $forms = [ 'eventseries_default_edit_form', 'eventseries_default_add_form', 'eventinstance_default_edit_form', 'eventinstance_default_add_form', ]; if (!in_array($form_id, $forms)) { return; } // Move the "Published" checkbox to the gin sticky action header. if (isset($form['status'])) { $form['status']['#group'] = 'status'; } }
Request:
Would it be best to submit a patch or a pull request to fix this issue in the Recurring Events module? Let me know how you'd prefer this contribution!
Thanks!
| Comment | File | Size | Author |
|---|---|---|---|
| Skærmbillede 2025-03-11 kl. 14.55.54.png | 145.61 KB | kasperbirch |
Comments
Comment #2
kasperbirch commented