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_form
  • eventseries_default_add_form
  • eventinstance_default_edit_form
  • eventinstance_default_add_form

Steps to Reproduce:

  1. Enable the Recurring Events module and the Gin theme.
  2. Edit or add an event series or instance.
  3. 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!

Comments

kasperbirch created an issue.

kasperbirch’s picture