Bug 31387

Summary: Marking othernames as required via PatronSelfRegistrationBorrowerMandatoryField does not display required label
Product: Koha Reporter: Lucas Gass (lukeg) <lucas>
Component: OPACAssignee: Lucas Gass (lukeg) <lucas>
Status: CLOSED FIXED QA Contact: Testopia <testopia>
Severity: trivial    
Priority: P5 - low CC: david, victor
Version: Main   
Hardware: All   
OS: All   
Change sponsored?: --- Patch complexity: Trivial patch
Documentation contact: Documentation submission:
Text to go in the release notes:
This fixes the patron self-registration form so that the 'Other names' (othernames) field correctly displays the text 'Required' when this is set as required (using the PatronSelfRegistrationBorrowerMandatoryField system preference). Currently, this text is not displayed (however, an error message is displayed when submitting the form).
Version(s) released in:
22.11.00,22.05.06,21.11.12
Circulation function:
Attachments: Bug 31387: Fix othernames required label
Bug 31387: Fix othernames required label
Bug 31387: Fix othernames required label

Description Lucas Gass (lukeg) 2022-08-17 17:08:43 UTC
To recreate:

1. Mark othernames as required via PatronSelfRegistrationBorrowerMandatoryField
2. Go to the self-reg form, the field is required but the span that makes it look required stays hidden. (<div class="required_label required">Required</div>)
3. Mark initials as required via PatronSelfRegistrationBorrowerMandatoryField.
4. Now the label_required field appears for othernames in the self ref form


This is because of a cut/paste error.
Comment 1 Lucas Gass (lukeg) 2022-08-17 17:11:01 UTC
Created attachment 139300 [details] [review]
Bug 31387: Fix othernames required label

1. Mark othernames as required via PatronSelfRegistrationBorrowerMandatoryField
2. Go to the self-reg form, the field is required but the span that makes it look required stays hidden. (<div class="required_label required">Required</div>)
3. Mark initials as required via PatronSelfRegistrationBorrowerMandatoryField.
4. Now the label_required field appears for othernames in the self ref form
5. Apply patch
6. Try again, the label should now properly show when othernames is marked as required
Comment 2 David Nind 2022-08-17 23:56:10 UTC
Created attachment 139306 [details] [review]
Bug 31387: Fix othernames required label

1. Mark othernames as required via PatronSelfRegistrationBorrowerMandatoryField
2. Go to the self-reg form, the field is required but the span that makes it look required stays hidden. (<div class="required_label required">Required</div>)
3. Mark initials as required via PatronSelfRegistrationBorrowerMandatoryField.
4. Now the label_required field appears for othernames in the self ref form
5. Apply patch
6. Try again, the label should now properly show when othernames is marked as required

Signed-off-by: David Nind <david@davidnind.com>
Comment 3 Fridolin Somers 2022-08-20 07:43:33 UTC
Created attachment 139534 [details] [review]
Bug 31387: Fix othernames required label

1. Mark othernames as required via PatronSelfRegistrationBorrowerMandatoryField
2. Go to the self-reg form, the field is required but the span that makes it look required stays hidden. (<div class="required_label required">Required</div>)
3. Mark initials as required via PatronSelfRegistrationBorrowerMandatoryField.
4. Now the label_required field appears for othernames in the self ref form
5. Apply patch
6. Try again, the label should now properly show when othernames is marked as required

Signed-off-by: David Nind <david@davidnind.com>
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
Comment 4 Tomás Cohen Arazi (tcohen) 2022-08-22 16:43:22 UTC
Pushed to master for 22.11.

Nice work everyone, thanks!
Comment 5 Lucas Gass (lukeg) 2022-10-14 22:07:38 UTC
Backported to 22.05.x for upcoming 22.05.06 release
Comment 6 Victor Grousset/tuxayo 2022-10-21 22:30:28 UTC
Not backported to oldoldstable (21.05.x). Feel free to ask if it's needed.

Nothing to document it seems, marking resolved.
Comment 7 Arthur Suzuki 2022-10-22 22:10:28 UTC
Thanks!

Pushed to 21.11 for 21.11.12