Bob Wicksall [Tue, 27 Jul 2021 17:42:44 +0000 (13:42 -0400)]
lp1902302 Opac. SMS and Carriers appear in Edit Holds Regardless of OU Setting.
The SMS Number field and Default Carrier field display when editing an
individual hold in the opac, regardless of the 'Enable features that send SMS text messages' setting.
This patch rectifies that behavior.
To test.
Set the 'Enable features that send SMS text messages' to False.
Place a hold for a patron.
Login to the opac as that patron and view the holds.
Edit the hold, and notice that the SMS and Carrier fields are displayed.
Apply the patch.
Refresh the edit form. The fields no longer display.
Set the 'Enable features that send SMS text messages' to True.
Refresh the edit form. The fields now display.
Bob Wicksall [Tue, 8 Jun 2021 14:20:32 +0000 (10:20 -0400)]
LP1930933 Hidden search result title
A previous security patch added html filtering to several strings.
This broke Titles and title attributes on the results page. In
particular if a title had the word hidden somewhere after the
first word.
Bob Wicksall [Wed, 14 Apr 2021 14:56:22 +0000 (10:56 -0400)]
Revert the effects of both LP1687545 and LP1914116
Revert "LP1687545: Force TT CGI plugin to use ampersands in query strings"
and "LP1914116: Apply html filter to mkurl() output"
until a fix for LP1918470 is available.
Original Author: Jason Boyer <JBoyer@EquinoxInitiative.org>
Bob Wicksall [Thu, 18 Mar 2021 19:03:14 +0000 (15:03 -0400)]
LP1914116: Apply html filter to mkurl() output
Because of the way that mkurl() generates its query parameters they're
generally escaped correctly, but nowhere do we run the output of mkurl()
through the html filter to correctly handle ampersands. Rather than adding
"|html" to every invocation of mkurl, it's just added to the macro directly.
Original Author: Jason Boyer <JBoyer@equinoxinitiative.org>
Bob Wicksall [Thu, 18 Mar 2021 18:57:01 +0000 (14:57 -0400)]
Lp 1913219: Use window.open for staff catalog edit link
To avoid the "Scripts may close only the windows that were opened by
them" console message in Chrome 88, and a similar message in Firefox
84, when clicking "Save & Exit" in the Volume/Copy editor of the
AngularJS staff client after opening it via the "edit" link in the
copy table of the TT OPAC record summary, we use an onclick handler
with window.open instead of a standard href in the edit anchor.
Original Author: Jason Stephenson <jason@sigio.com>
Bob Wicksall [Thu, 18 Mar 2021 18:53:23 +0000 (14:53 -0400)]
LP1868147-Titles in carousel run together in mobile display.
This patch uses the breakpoint option available in glide.js to limit the number of images in the carousel that display.
Files for both the tpac and the bootstrap opac have been updated.
There are two new variables based on bootstrap sizing, sm_width which defaults to 3, and xs_width which defaults to 2.
If a screen's width is set between 768-992 pixels, 3 images display in the carousel,
if the width is below 768 pixels, only 2 images display in the carousel.
The reduction of images helps with titles overlapping each other.
To test:
Apply the patch to an instance of Evergreen that displays carousels.
Reduce the screen size of the browser. Eventually the carousel will display 3 and then 2 images.
Bob Wicksall [Tue, 10 Nov 2020 16:26:37 +0000 (11:26 -0500)]
Moved the div loading UPC and ISBN into body.tt2 so it is loaded before any other numbers
that could be confused as a valid UPC/ISBN. This is so Syndetics is able to display the
correct Summary info for a record.
Bob Wicksall [Fri, 30 Oct 2020 19:13:17 +0000 (15:13 -0400)]
LP#1361270 Self-registration doesn't retain org unit on refresh
This sets the self-registration form's org unit selector to the
the current org unit request parameter if it's set and self-
registration is allowed for that org unit. This will preopulate
the org selector on refresh or error instead of resetting to the
default context.
To test:
1. Administration->Local Administration->Library Settings Editor
set Allow Patron Self-Registration to True (top context)
2. go to OPAC->Request Library Card (stock link is on bottom)
3. select a Home Library and click Submit Registration
4. note the Home Library select doesn't retain your selection
5. apply this fix and repeat steps
6. note the Home Library is retained
Refactor the code checking for curbside-available current-pickup
libraries so that it is checked for all of MyOPAC, allowing us to hide
the Curbside Pickup top-level tab when there are no holds ready at
curbside pickup enabled locations. The tab will always be at the end of
the list if it is visible.
Original Author: Mike Rylander <mrylander@gmail.com>
Bob Wicksall [Fri, 30 Oct 2020 18:57:57 +0000 (14:57 -0400)]
LP#1879983: Add curbside subtab to the My Account holds UI
This updates the public catalog My Account holds tab to add
a subtab for curbside appointments. This subtab is displayed
only when the patron has available holds on the shelf at pickup
libraries that have enabled the circ.curbside library setting.
From this subtab, patrons can:
* Set times for curbside appointments and specify notes.
* Modify and cancel appointments.
* Mark themselves has having arrived at the library.
In addition to Mike Rylander, significant contributions to this
patch were made by Galen Charlton.
Sponsored-by: PaILS
Original Author: Mike Rylander <mrylander@gmail.com>
Original Author: Galen Charlton <gmc@equinoxinitiative.org>
This commit provides new functionality for controlling and delivering print
and email bibliographic record export options.
Staff will be able to adjust existing and create new print and email formats
using the Action/Trigger infrastructure and the new Event Definition Group
capability.
Patrons will be able to choose from one of several formats, as configured by
staff, in which to receive one or more bibliographic records. Print and email
preview is made available for individual records via the existing links on the
record detail page, and for lists of records via new entry points on both the
Basket (anonymous list) and My Lists interfaces.
Original Author: Mike Rylander <mrylander@gmail.com>
Bob Wicksall [Thu, 29 Oct 2020 20:59:53 +0000 (16:59 -0400)]
lp1777677 Security tweaks
- Refactor test notification API to check if requestor
is user,and if not, then check if requestor has
permissions to view users at target user's home ou.
- Change event_def_type references to "hook"
- Separate out sendTestEmail and sendTestSMS functions
in frontend to prevent potential misuse of functionality.
Original Author: Kyle Huckins <khuckins@catalyte.io>
Bob Wicksall [Thu, 29 Oct 2020 20:50:33 +0000 (16:50 -0400)]
lp1777677 Test Notification OPAC success prompt
- Didn't Move OPAC success prompt higher up to ensure message is
seen. Revisit if this is an issue.
- Ensure OPAC SMS test notification doesn't send email.
Original Author: Kyle Huckins <khuckins@catalyte.io>
Bob Wicksall [Thu, 29 Oct 2020 20:45:14 +0000 (16:45 -0400)]
lp1777677 Test Notification Method
- Create fire_test_notification subroutine to create, fire, and
return event
- Add Test Notification UI buttons to preferences and patron edit screen.
- Add Toast to inform of success or failure of sending test notification
- Add Strings to patron interface to handle ngToast notifications
- Add Test Notification to OPAC preferences UI for email
and default sms number.
- Abort Test Notification event if no user is found.
Original Author: Kyle Huckins <khuckins@catalyte.io>
Currently, the patron's account preferences page only shows the
library name. This adds the library's address, email, phone, and
web site link as well.
Original Author: Terran McCanna <tmccanna@georgialibraries.org>
Bob Wicksall [Thu, 29 Oct 2020 19:08:45 +0000 (15:08 -0400)]
LP1774892 stripe elements
This commmit changes the OPAC to use https://js.stripe.com/v3/ instead of
https://js.stripe.com/v2/ for processing payments through Stripe.
Additionally, it disables the "internal" credit card form in the staff client
when Stripe is the payment processor (or if the processor is not set at all),
as that does not currently work.
It also does not replace Business::Stripe's use of the "Charges API" with the
newer "Payment Intents" API on the backend, but credit card details are still
not sent to the Evergreen server.
Original Author: Jason Etheridge <jason@EquinoxInitiative.org>
Bob Wicksall [Thu, 29 Oct 2020 18:53:11 +0000 (14:53 -0400)]
LP1873286: Fix Bad End Tags
Fix self-closing tags used in non-void HTML and non-empty XHTML tags.
These tags now cause errors with jQuery version 3.5.0 and were
technically wrong from the start.
Original Author: Jason Stephenson <jason@sigio.com>
Bob Wicksall [Thu, 29 Oct 2020 18:24:58 +0000 (14:24 -0400)]
LP#1570072: update hold notification methods upon preference changes
This patch adds a feature where if a patron's hold notification
preferences are changed, they are given an opportunity to have
notfication methods for their pending hold requests updated to
reflect their new prefernces.
This feature affects both the public catalog My Account interface
and the staff patron registration form. In both cases, the user
is presented with a modal (staff-side) or interstitial page (public
catalog) asking them whether to update current hold requests.
Sponsored-by: MassLNC Additional-work-by: Mike Rylander <mrylander@gmail.com> Additional-work-by: Galen Charlton <gmc@equinoxinitiative.org>
Adds a readonly record detail view to the OPAC. This is used by the
Angular catalog Patron View tab to present a version of the OPAC where
all links, buttons, and inputs are disabled.
Dynamically style the height of the embedded iframe to prevent nested
scroll bars in the Patron View.
Original Author: Bill Erickson <berickxx@gmail.com>
Bob Wicksall [Wed, 6 Nov 2019 21:39:58 +0000 (16:39 -0500)]
P#1778606 Web Client - Place Hold Requires Two Clicks on Submit
Issue: the barcode lookup runs on the input's onchange, onkeypress (Enter), &
disables the submit button until the patron loads. So, if you type a barcode,
click enter, click the submit button, mousedown fires, if focus was still the
barcode input, its onchange fires, the lookup runs again, the submit button
disables, prevents button mouseup from firing, the click event is disrupted, &
the form doesn't submit. Click again & it works.
Instead of onchange & onkeypress this branch runs the lookup when there's a
500ms pause between onkeydowns. onpaste and enter still run the lookup
immediately. The patron search triggers the input's keydown instead of change.
To test:
1. Search for any holdable item in the catalog and click Place Hold
2. Type in an existing patron barcode and click Enter
3. Before tabbing or clicking off the barcode input, click the Submit button
4. Note it doesn't submit - click again and it submits
5. Apply patch
6. Repeat steps 1-3
7. Note it submits
Bob Wicksall [Mon, 9 Sep 2019 18:57:02 +0000 (14:57 -0400)]
LP1802593: Correct formatting of language code in Angularjs, KPAC
EgWeb offers two different formats of the current locale: ctx.locale and
ctx.eg_locale. This commit configures the lang attribute in AngularJS
staff client, OPAC, and KPAC to use eg_locale, since it has the
appropriate format (e.g. en-US, fr-CA).
Also adds some tests for EgWeb's handling of language codes.
Original author: Jane Sandberg <sandbej@linnbenton.edu>
Bob Wicksall [Tue, 6 Aug 2019 19:27:05 +0000 (15:27 -0400)]
LP#1029601: Prevent duplicate holds from double clicks
Double clicking on hold submit buttons causes multiple holds to be
generated. This commits adds code to disable the Submit button(s)
after the first click, so subsequent clicks don't "work" in unintended
ways.
Bob Wicksall [Tue, 6 Aug 2019 18:42:35 +0000 (14:42 -0400)]
LP1796225: Only auto-focus search on the home page
For a11y and usability, it's better to autofocus form fields
only when they are the main purpose of a page.
To test:
1) In the public catalog, visit the search results, record view,
library details, basket, and password reset pages. Notice that
the cursor leaps to the search bar in each of these pages.
2) Apply this commit.
3) Re-visit all those pages. Notice that the cursor no longer
leaps to the search bar.
4) Visit the home page of the public catalog. Notice that the
cursor still leaps to the search bar on this page only.
Original author: Jane Sandberg <sandbej@linnbenton.edu>
Bob Wicksall [Tue, 6 Aug 2019 18:32:51 +0000 (14:32 -0400)]
LP#1715767: Allow others to use my account (privacy waiver)
Use case: Jane Doe has a hold ready for pickup but is unable to come
into the library. Her husband John Doe goes to the library to pick up
the hold on her behalf. His name is listed on Jane's account, so
library staff know it's okay to check out the book on Jane's account and
give it to John.
This commit adds a new table which lists the names of people who are
allowed to place holds, pick up holds, check out items, or view
borrowing history for a user account. Staff can add, edit, or remove
entries via the patron editor in the web client; patrons can do so in My
Account. The entries are not linked to other user accounts and they do
not add any extra functionality. They are essentially special patron
notes for circulation staff.
Original author: Jeff Davis <jdavis@sitka.bclibraries.ca>
Bob Wicksall [Tue, 6 Aug 2019 17:27:07 +0000 (13:27 -0400)]
LP#1783440: adding UPC to numeric search types in advanced search
To test
-------
[1] Go the Advanced Search page in the public catalog, then to the
Numeric Search tab.
[2] Search on a UPC value (e.g., in Concerto, "883929159529").
[3] Verify that a hit is retrieved.
Original author: Rogan Hamby <rhamby@equinoxinitiative.org>
Bob Wicksall [Tue, 6 Aug 2019 17:20:08 +0000 (13:20 -0400)]
LP#1783602: Remove copy counts from mr search results page
The copy counts on the mr search results page can be wrong if a limiter was
applied to the metarecord search. Rather than supply inaccurate information to
the user, let's remove the counts from that page until a long-term solution can
be developed.
Original author: Kathy Lussier <klussier@masslnc.org>
Adds a new row to the patron account preferences page for Preferred
Name. The field only displays when a preferred first, middle, or last
value is present and follows the same display logic as preferred names
in the staff client, where first and last fall-through to the primary
name.
Original Author: Bill Erickson <berickxx@gmail.com>
Adds a new set of patron preferred name fields for prefix, first,
middle, last, and suffix allowing patrons to provide preferred name
information. Preferred names are optional and each acts as an overlay
to the analogous primary name field, making it possible to provide
preferred name values for individual fields.
For example, a patron named William Erickson may have a preferred first
name (pref_first_given_name) of Bill, in which case the preferred name
would be Bill Erickson. Note a preferred last name is not required in
this case as the code uses primary name values as defaults when not
replaced with a preferred version.
* Patrons will see primary names displayed in the catalog when set.
* Staff will see both primary name and preferred name in the patron
summary side bar.
* Patron searches for any given name field will search both the primary
and preferred name data.
* Preferred name fields are available in Action/Trigger templates and
are present in various patron-focused print templates.
Name Keywords
Adds a new field to store miscellaneous patron name search terms. These
values are only for searching and do not appear in any interfaces, apart
from the patron summary side bar and the patron edit UI.
Included is a new search field in the patron search UI which searches
keyword values and all other name fields. It's essentially a global patron
name keyword search.
Original author: Bill Erickson <berickxx@gmail.com>
We missed one instance of cart when changing everything over to baskets. Also,
I updated language for clearing a basket after placing a hold to make it a
little clearer.
Original Author: Kathy Lussier <klussier@masslnc.org>
The public catalog now displays checkboxes on the bibliographic and
metarecord constituents results pages. Selecting one or more titles
by using the checkboxes will dynamically add those title to the
temporary list, which is now renamed the basket.
Above the results lists there is now a bar with a select-all checkbox,
a link to the basket management page that also indicates the number of
of titles in the basket, and a link to remove from the basket titles that
are selected on the currently displayed results page.
The search bar now includes an icon of a basket and displays the number
of titles currently in the basket. Next to that icon is a menu of basket
actions.
The basket actions available are Place Hold, Print Title Details,
Email Title Details, Add Cart to Saved List, and Clear Cart. In the
web staff client, the basket actions also include Add Cart to Bucket.
When an action is selected from this menu, the user is given an
opportunity to confirm the action and to optionally empty the basket
when the action is complete. The action is applied to all titles
in the basket.
Clicking on the basket icon brings the user to a page listing the
titles in the basket. From there, the user can select specific records
to request, print, email, add to a list, or remove from the basket.
The list of actions on the record details page now provides separate
links for adding the title to a basket or to a permanent list.
The permanent list management page in the public catalog now also
includes batch print and email actions.
Additional information
++++++++++++++++++++++
* The checkboxes do not display on the metarecord results page, as
metarecords currently cannot be put into baskets or lists.
* The checkboxes are displayed only if Javascript is enabled. However,
users can still add items to the basket and perform batch actions on
the basket and on lists.
* A template `config.tt2` setting, `ctx.max_basket_size`, can be used to
set a soft limit on the number of titles that can be added to the
basket. If this limit is reached, checkboxes to add more records to the
basket are disabled unless existing titles in the basket are removed
first. The default value for this setting is 500.
Developer notes
+++++++++++++++
This patch adds the the public catalog two routes that return JSON
rather than HTML:
The JSON response is a hash containing a mylist key pointing to the list
of bib IDs of contents of the basket.
The record parameter can be repeated to allow adding or removing
records as an atomic operation. Note that this change also now available
to `/eg/opac/mylist/{add,delete}`
More generally, this adds a way for EGWeb context loaders to specify that
a response should be emitted as JSON rather than rendering an HTML
page using `Template::Toolkit`.
Specifically, if the context as munged by the context loader contains
a `json_response` key, the contents of that key will to provide a
JSON reponse. The `json_response_cookie` key, if present, can be used
to set a cookie as part of the response.
Template Toolkit processing is bypassed entirely when emitting a JSON
response, so the context loader would be entirely reponsible for
localization of strings in the response meant for direct human
consumption.
Original author Galen Charlton <gmc@equinoxinitiative.org>