If we make a patron attribute mandatory, the 'Required' flag is displayed in the OPAC, but not in red. It is also misaligned. To recreate: 1. Create a mandatory patron attribute editable in OPAC 1.1. Go to Administration > Patron attribute types > New patron attribute type 1.2. Fill out the form - Code: enter any code - Description: enter any description - Display in OPAC: check - Editable in OPAC: check - Mandatory: check 1.3. Click Save 2. Enable self-registration 2.1. Go to Administration > System preferences 2.2. Search for selfreg 2.3. Set PatronSelfRegistration to Allow 2.4. Set a category in PatronSelfRegistrationDefaultCategory 2.5. Click Save all OPAC preferences 3. View self-registration form 3.1. Go to the OPAC 3.2. Click on Don't have an account? Register here. 3.3. Go to the bottom of the form --> Note that the 'Required' flag is to the left of the field and it is not red --> You can compare with surname, firstname, or the verification field
I noticed that if the attribute is a text field, the "Required" flag is aligned on the left. But if the attribute is a drop-down, the "Required" flag is correctly aligned with the field.
Created attachment 158665 [details] [review] Bug 35144: Update style of 'Required' label for OPAC patron attributes This patch makes some changes to style and markup of the part of the OPAC patron entry form which displays patron attribute entry fields. To test, apply the patch and rebuild the OPAC CSS. - Create at least two patron attributes which have both "Display in OPAC" and "Editable in OPAC" checked: One which is linked to an authorized value, one which isn't. At least one attribute should be mandatory. At least one attribute should be repeatable. - Test the form using either patron self-registration or by logging in to the OPAC and clicking the "Personal details" link in the sidebar. - Check the appearance of required fields in the form, including the mandatory patron attributes. - Confirm that the "Clear" and "New" controls look good and work correctly, including fields cloned with the "New" button.
Is chaining "parent().parent()" better than something like "closest('.row')" ? Just curious as I tend to avoid that kind of chaining as it seems closest() is less likely to break. For example, if another HTML element is added, say around the fieldset.
Created attachment 158670 [details] [review] Bug 35144: Update style of 'Required' label for OPAC patron attributes This patch makes some changes to style and markup of the part of the OPAC patron entry form which displays patron attribute entry fields. To test, apply the patch and rebuild the OPAC CSS. - Create at least two patron attributes which have both "Display in OPAC" and "Editable in OPAC" checked: One which is linked to an authorized value, one which isn't. At least one attribute should be mandatory. At least one attribute should be repeatable. - Test the form using either patron self-registration or by logging in to the OPAC and clicking the "Personal details" link in the sidebar. - Check the appearance of required fields in the form, including the mandatory patron attributes. - Confirm that the "Clear" and "New" controls look good and work correctly, including fields cloned with the "New" button.
> Is chaining "parent().parent()" better than something like "closest('.row')" Looks like strictly speaking parent() is every so slightly faster, but not enough to outweigh the improved maintainability of the code!
Created attachment 158673 [details] [review] Bug 35144: Update style of 'Required' label for OPAC patron attributes This patch makes some changes to style and markup of the part of the OPAC patron entry form which displays patron attribute entry fields. To test, apply the patch and rebuild the OPAC CSS. - Create at least two patron attributes which have both "Display in OPAC" and "Editable in OPAC" checked: One which is linked to an authorized value, one which isn't. At least one attribute should be mandatory. At least one attribute should be repeatable. - Test the form using either patron self-registration or by logging in to the OPAC and clicking the "Personal details" link in the sidebar. - Check the appearance of required fields in the form, including the mandatory patron attributes. - Confirm that the "Clear" and "New" controls look good and work correctly, including fields cloned with the "New" button. Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
Created attachment 158797 [details] [review] Bug 35144: Update style of 'Required' label for OPAC patron attributes This patch makes some changes to style and markup of the part of the OPAC patron entry form which displays patron attribute entry fields. To test, apply the patch and rebuild the OPAC CSS. - Create at least two patron attributes which have both "Display in OPAC" and "Editable in OPAC" checked: One which is linked to an authorized value, one which isn't. At least one attribute should be mandatory. At least one attribute should be repeatable. - Test the form using either patron self-registration or by logging in to the OPAC and clicking the "Personal details" link in the sidebar. - Check the appearance of required fields in the form, including the mandatory patron attributes. - Confirm that the "Clear" and "New" controls look good and work correctly, including fields cloned with the "New" button. Signed-off-by: Lucas Gass <lucas@bywatersolutions.com> Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Pushed to master for 23.11. Nice work everyone, thanks!
Pushed to 23.05.x for 23.05.06
Nice work everyone! Pushed to 22.11.x for next release