LP1958163 Bootstrap Opac: the 'Request a Card' link.
authorGarry Collum <gcollum@gmail.com>
Mon, 17 Jan 2022 18:05:37 +0000 (13:05 -0500)
committerJane Sandberg <js7389@princeton.edu>
Thu, 7 Apr 2022 19:53:37 +0000 (12:53 -0700)
This fixes the 'Request a Card' link which displays in the bootstrap opac
 regardless of the 'Allow Patron Self-Registration' library setting in both
the login page and the login modal.

To Test:
1. Click on My Account in the Bootstrap Opac to open the login modal.
   Notice the Request a Card link.  Click Login without adding a barcode
   or pin# to see the login page with its link.
2. Set the Allow Patron Self_Registration library setting to false for the
   Consortium.
3. Repeat 1, and notice that the link still displays.
4. Apply the patch.
5. Now the link should not be visible in both forms.
6. Set the library setting to true, to verify that the link does display.

Signed-off-by: Garry Collum <gcollum@gmail.com>
Signed-off-by: Terran McCanna <tmccanna@georgialibraries.org>
Signed-off-by: Jane Sandberg <js7389@princeton.edu>
Open-ILS/src/templates-bootstrap/opac/parts/login/form.tt2
Open-ILS/src/templates-bootstrap/opac/parts/login/login_modal.tt2

index b580f9c..fcd8d87 100755 (executable)
        </div>
        <div class="row">
                <div class="col-sm w-50">
+                    [% IF ctx.get_org_setting (
+                          ctx.physical_org || ctx.aou_tree.id, 'opac.allow_pending_user') %]
                        <a href='[% mkurl(ctx.opac_root _ '/register', {}, 1) %]'>[% l('Request A Card') %]</a>
+                    [% END %]
                </div>
                <div class="col-sm w-50">
                        [% IF reset_password == 'true' %]
index d8d68fe..44c4544 100755 (executable)
                </div>
                <div class="row">
                        <div class="col-sm w-50">
+                            [% IF ctx.get_org_setting(
+                                ctx.physical_loc || ctx.aou_tree.id, 'opac.allow_pending_user') %]
                                <a href='[% mkurl(ctx.opac_root _ '/register', {}, 1) %]'>[% l('Request A Card') %]</a>
+                            [% END %]
                        </div>
                        <div class="col-sm w-50">
                                [% IF reset_password == 'true' %]
       </form>
     </div>
   </div>
-</div>
\ No newline at end of file
+</div>