LP1850473: manual and automated eslint fixes Automatic fixes from `npm run lint -- --fix` Signed-off-by: Jane Sandberg <js7389@princeton.edu> Signed-off-by: Terran McCanna <tmccanna@georgialibraries.org>
LP#2007877: various fixes to Server Admin Print Templates page This patch fixes a regression introduced by the switch to NgbNav as well as a number of other issues. To test ------- [1] Open the Server Administration -> Print Templates page and select a print template. Observe that the template editor is not displayed and that there are errors in the browser console. [2] Apply the patch and repeat step 1. This time, the template is displayed along with its previewed. [3] Switch to the Sample Data tab, then select another template. Observe that the template is reloaded and the active tab switched to the template editor. [4] Select a template such as "Checkin" that does not have stock sample data. Observe that the Preview and Compiled Content panes on the template editor tab are empty and that the Sample Data tab has an empty control Signed-off-by: Galen Charlton <gmc@equinoxOLI.org> Signed-off-by: Bill Erickson <berickxx@gmail.com>
LP1948693 Migrate from NgbTabset to ngbNav Updates the deprecated NgbTabset components to ngbNav and adds directive for keyboard navigation. See https://gist.github.com/stephanieleary/800b9f2b1d9c08cc66d694daaa1788b9 for a quick guide to the markup changes involved. Screens to test: 1. /staff/acq/provider, right click an existing provider to show details tabs 2. /staff/admin/local/negative-balances 3. /staff/admin/local/action/survey, edit an existing survey, test Edit Survey and Q&A tabs 4. /staff/admin/server/actor/org_unit, note that Addresses tab has a second set of tabs underneath 5. /staff/admin/server/actor/org_unit_type, note that eg-tree has also changed here 6. /staff/admin/server/permission/grp_tree, choose a group to see tabs 7. /staff/admin/server/config/print_template 8. /staff/booking/create_reservation 9. /staff/booking/manage_reservations, filter reservations section 10. /staff/booking/return 11. /staff/cat/authority/browse 12. /staff/cat/vandelay/import and all import/export tabs 13. /staff/cat/bucket/record/view 14. /staff/catalog/search 15. /staff/circ/holds/pull-list, right click a hold, choose Show Hold Details, the tabs are at the bottom of the screen Test plan: Note that you cannot navigate tabbed interfaces using the tab key on your keyboard. Apply the patch, then visit the screens listed above. You should be able to use the tab key to move sequentially through all the tabs. Pressing Enter on an inactive tab should make it active, just as clicking it would. You should not be able to click or press Enter to activate a disabled tab. You should be able to move from the last tab in the list into the first focusable element in the active tab's content panel. If you spot a tab content panel that doesn't contain a focusable element (i.e. links or inputs), let me know; we have to set its tabindex attribute manually. If a tab panel contains a second set of tabs, these should work as well. Note on ARIA and roles: Note that neither Bootstrap 5 nor ng-bootstrap are currently following the ARIA Authoring Practices Guide for tabs with manual activation (the recommended pattern for tab panels with complicated content, like form inputs or data tables), which does not recommend sequential movement: https://www.w3.org/WAI/ARIA/apg/example-index/tabs/tabs-manual.html. Therefore, we aren't following this pattern either. We can revisit this and/or take it up with Bootstrap. For now, running axe DevTools on any screen with navs will show ARIA role errors on role="tab" attributes. We are using ng-bootstrap's default ARIA roles for tabs, but they are incorrect. I am trying to get traction on a pull request to change the problem in ng-bootstrap, but in the meantime, we are not using the automatic [roles] directive. Role attributes have been set explicitly on all tabs and their containing elements. Note on eg-tree CSS: In the Org Unit Type screens, there was previously some inline CSS related to eg-tree that was causing compiler errors. I have moved this to a separate CSS file, and will revisit eg-tree styles more generally in another upcoming project. Signed-off-by: Stephanie Leary <stephanie.leary@equinoxOLI.org> Signed-off-by: Bill Erickson <berickxx@gmail.com>
LP1904036 Hold print template configs Signed-off-by: Bill Erickson <berickxx@gmail.com> Signed-off-by: Jane Sandberg <js7389@princeton.edu> Signed-off-by: Galen Charlton <gmc@equinoxOLI.org>
LP1904036 Printing patron data Signed-off-by: Bill Erickson <berickxx@gmail.com> Signed-off-by: Jane Sandberg <js7389@princeton.edu> Signed-off-by: Galen Charlton <gmc@equinoxOLI.org>
LP1904036 Payment receipts Signed-off-by: Bill Erickson <berickxx@gmail.com> Signed-off-by: Jane Sandberg <js7389@princeton.edu> Signed-off-by: Galen Charlton <gmc@equinoxOLI.org>
LP1904036 Bills, Current admin UI sample data Signed-off-by: Bill Erickson <berickxx@gmail.com> Signed-off-by: Jane Sandberg <js7389@princeton.edu> Signed-off-by: Galen Charlton <gmc@equinoxOLI.org>
LP1891550 Ang print context support; no-print contexts Adds support to the Angular server template admin page for forcing a print context for a given template. Adds support to the Angular print service for looking up the context of a print template when specified by name. Adds support to And and AngJS print settings interfaces for a "No-Print" context, which bypasses printing when used. Adds a new workstation setting for the Booking Capture server print template context. Signed-off-by: Bill Erickson <berickxx@gmail.com> Signed-off-by: Terran McCanna <tmccanna@georgialibraries.org> Signed-off-by: Galen Charlton <gmc@equinoxinitiative.org>
LP1830973 Angular 8 updates Update package.json versions and perform the angular 7 to angular 8 migration steps. Update some configs to match supported options in newer versions of typescript and tslint. Signed-off-by: Bill Erickson <berickxx@gmail.com> Signed-off-by: Galen Charlton <gmc@equinoxinitiative.org> Signed-off-by: Chris Sharp <csharp@georgialibraries.org>
LP1825851 Print template admin misc. repairs/improvements 1. When cloning a template, be sure the cloned template is available in the template selector regardless of whether it would have been given the current filters. 2. When cloning, set the 'active' flag explicitly to false so the user is forced to manually activate. This prevent unintentional activation on in-process templtes. 3. When cloning, clear the owner value so the user is forced to select an owner value. 4. Allow the template editor textaread to expand vertically as the template gets longer (i.e. adds more new lines). Signed-off-by: Bill Erickson <berickxx@gmail.com> Signed-off-by: Kyle Huckins <khuckins@catalyte.io> Signed-off-by: Galen Charlton <gmc@equinoxinitiative.org>
LP1825851 Server managed/processed print templates Adds a new database table config.print_template (and IDL class) for storing configurable, org- and locale-specific print templates. Adds a web service which accepts POSTed print data and generates a print-ready document. Includes example Apache configs. Teaches the Angular app to use the new web service for generting print output. Adds and Angular print template administration interface. Adds HTML::Defang for scrubbing unwanted HTML elements and attributes from print documents for security. Add the new ADMIN_PRINT_TEMPLATE permission to the Circ Admin group at System level as a default. Adds 2 templates, a simple patron_address tepmlate (pending Angular port of patron UIs) and a 'Holds for Bib Record' template, accessible from the Angular staff catalog Holds interface. Signed-off-by: Bill Erickson <berickxx@gmail.com> Signed-off-by: Kyle Huckins <khuckins@catalyte.io> Signed-off-by: Galen Charlton <gmc@equinoxinitiative.org>