- Issue created by @johnv
- 🇳🇱Netherlands johnv
This task is now completed.
The last (small) commit moves the Weekdays into its own wrapper, to be more consistent with other widgets for Exceptions and (to-be, future) seasons. The HTML looks the same, so I expect no backward compatibility problems.
diff --git a/src/Plugin/Field/FieldWidget/OfficeHoursExceptionsWeekWidget.php b/src/Plugin/Field/FieldWidget/OfficeHoursExceptionsWeekWidget.php index 5fab51f..4424792 100644 --- a/src/Plugin/Field/FieldWidget/OfficeHoursExceptionsWeekWidget.php +++ b/src/Plugin/Field/FieldWidget/OfficeHoursExceptionsWeekWidget.php @@ -36,7 +36,9 @@ class OfficeHoursExceptionsWeekWidget extends OfficeHoursWeekWidget { } // First, create a Week widget for the normal weekdays. - $element = parent::formElement($items, $delta, $element, $form, $form_state); + // Using the form were are in already, not by adding a new widget. + $field_type = 'office_hours'; + $element["$field_type"] = parent::formElement($items, $delta, $element, $form, $form_state); $items->filterEmptyItems(); // Then, add a List Widget for the Exception days.
Automatically closed - issue fixed for 2 weeks with no activity.
- Issue was unassigned.
- Status changed to Fixed
over 1 year ago 1:35pm 24 April 2023 - 🇳🇱Netherlands johnv
Making a final adjustment, having all 3 widgets in a separate array.
Automatically closed - issue fixed for 2 weeks with no activity.