Bugzilla – Attachment 116449 Details for
Bug 27618
Don't show dropdown if PatronSelfRegistrationLibraryList only has one library
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 27618: Don't show dropdown if PatronSelfRegistrationLibraryList only has one library
Bug-27618-Dont-show-dropdown-if-PatronSelfRegistra.patch (text/plain), 4.88 KB, created by
Katrin Fischer
on 2021-02-06 22:42:24 UTC
(
hide
)
Description:
Bug 27618: Don't show dropdown if PatronSelfRegistrationLibraryList only has one library
Filename:
MIME Type:
Creator:
Katrin Fischer
Created:
2021-02-06 22:42:24 UTC
Size:
4.88 KB
patch
obsolete
>From eff0eafa6a77933613dddc6f90facf5d5e49bd43 Mon Sep 17 00:00:00 2001 >From: Owen Leonard <oleonard@myacpl.org> >Date: Thu, 4 Feb 2021 12:20:27 +0000 >Subject: [PATCH] Bug 27618: Don't show dropdown if > PatronSelfRegistrationLibraryList only has one library > >This patch modifies the patron entry form in the OPAC so that if there >is only one library to choose from, the input is hidden and the single >library displays as text. > >To test, apply the patch and enable PatronSelfRegistration. > >- Modify the PatronSelfRegistrationLibraryList system preference to > include only one library. >- Go to the self-registratoin page in the OPAC. >- Under "Home library," you should see the library name. If you inspect > the source you should see the library branchcode in a hidden form. >- Confirm that the form submission includes the correct library > information. > >Signed-off-by: Lucas Gass <lucas@bywatersolutions.com> > >Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de> >--- > .../bootstrap/en/modules/opac-memberentry.tt | 32 ++++++++++++++-------- > 1 file changed, 20 insertions(+), 12 deletions(-) > >diff --git a/koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-memberentry.tt b/koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-memberentry.tt >index d9ee294706..fc46fedda5 100644 >--- a/koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-memberentry.tt >+++ b/koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-memberentry.tt >@@ -239,21 +239,29 @@ > > [% UNLESS hidden.defined('branchcode') %] > <li> >- [% IF mandatory.defined('branchcode') %] >- <label for="borrower_branchcode" class="required">Home library:</label> >- [% ELSE %] >- <label for="borrower_branchcode">Home library:</label> >- [% END %] >+ [% IF ( libraries.size > 1 ) %] >+ [% IF mandatory.defined('branchcode') %] >+ <label for="borrower_branchcode" class="required">Home library:</label> >+ [% ELSE %] >+ <label for="borrower_branchcode">Home library:</label> >+ [% END %] > >- <select id="borrower_branchcode" name="borrower_branchcode"> >- [% FOREACH l IN libraries %] >- [% IF l.branchcode == borrower.branchcode %] >- <option value="[% l.branchcode | html %]" selected="selected">[% l.branchname | html %]</option> >- [% ELSE %] >- <option value="[% l.branchcode | html %]">[% l.branchname | html %]</option> >+ <select id="borrower_branchcode" name="borrower_branchcode"> >+ [% FOREACH l IN libraries %] >+ [% IF l.branchcode == borrower.branchcode %] >+ <option value="[% l.branchcode | html %]" selected="selected">[% l.branchname | html %]</option> >+ [% ELSE %] >+ <option value="[% l.branchcode | html %]">[% l.branchname | html %]</option> >+ [% END %] > [% END %] >+ </select> >+ [% ELSE %] >+ <span class="label">Home library:</span> >+ [% FOREACH l IN libraries %] >+ [% l.branchname | html %] >+ <input type="hidden" name="borrower_branchcode" value="[% l.branchcode | html %]" /> > [% END %] >- </select> >+ [% END %] > </li> > [% END %] > >-- >2.11.0
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
|
Splinter Review
Attachments on
bug 27618
:
116314
|
116335
| 116449