When an event is defined as weekly recurring, we can choose the days of week it will repeat on. It is done with checkboxes. These checkboxes, however, have some odd properties:
- each one is named with a day of week abbreviation (e.g. the Monday checkbox is named <portlet:namespace />MO);
- they have a data-weekday attribute whose content is the localized name of the week.
This configuration is proving itself complicated to maintain:
- the labels are not localized;
- the processing of the submitted form is quite unusual, since one has to get a submitted parameter and, if it does exist, then do something.
So, it may make the code leaner to do the following:
- remove the data-weekday attribute;
- make the name of the checkboxes <portlet:namespace />weekdays;
- retrieve an array with days of week at the back-end;
- delegate any translation to the RecurrenceUtil.getSummary().