Main Koha release repository https://koha-community.org
Find a file
Owen Leonard e5f1ada249 Bug 28937: Use Flatpickr on circulation and patron pages
This patch replaces the use of jQueryUI's datepicker on circulation and
patron-related pages.

The patch modifies Flatpickr's default configuration (in calendar.inc)
so that it has the following features:

 - A Flatpickr input with a "futuredate" class will require that the
   selected date be after today.
 - The Flatpickr input field will be wrapped in a container to
   facilitate better CSS styling.
 - Generic handling of paired date fields is enabled using
   ".flatpickrfrom" and ".flatpickrto" field classes. This mimics the
   same feature we have for jQueryUI datepickers using ".datepickerfrom"
   and ".datepickerto".

This patch also removes an unused function which was repeated in three
templates: validate1.

To test, apply the patch and rebuild the staff interface CSS
(https://wiki.koha-community.org/wiki/Working_with_SCSS_in_the_OPAC_and_staff_client).

- Go to Circulation and check out to a patron.
  - Open the Restrictions tab and click "Add manual restriction."
    - In the "Expiration" field, test that the Flatpickr widget works
      correctly and limits to dates after today.
  - Enable the SpecifyDueDate preference if necessary.
    - Test the behavior of the SpecifyDueDate controls: Setting a date,
      clearing a date, session persistence.
- Enable the SuspendHoldsIntranet system preference if necessary.
  - Check out to a patron with existing holds.
    - Open the Holds tab and click the "Suspend" button for one of the
      holds.
      - In the modal window which appears, check that the Flatpickr
        widget works correctly and limits to dates after today.
      - At the bottom of the table of holds, test that the "Suspend all
        holds" Flatpickr works correctly and limits to dates after
        today.
        - Perform this same test from the patron details page.
- Enable the  BatchCheckouts system preference if necessary.
  - Open a patron record and click "Batch check out" in the left-hand
    sidebar menu.
    - Test that the "Hard due date" Flatpickr works correctly as a date
      and time picker.
- Go to Circulation -> Overdues.
  - Test that the date due filters in the sidebar work correctly and
    are linked, e.g. the "to" field cannot be before the "from" field.
     - Perform the same test here: Circulation -> Holds to pull; and
       here: Circulation -> Hold ratios.
- Enable the  HouseboundModule system preference if necessary.
  - Check out to or view details of a patron.
    - Click "Housebound" in the sidebar menu.
      - Save delivery day and frequency settings for that patron.
      - Click "Add a new delivery."
      - Test that the "Date" Flatpickr widget works correctly.
- Go to Patrons -> A patron record -> Edit.
  - Test that Flatpickr widgets work on the following fields:
    - Date of birth
    - Registration date & Expiration date (linked).
    - Patron restrictions -> Add manual restriction -> Expiration.
- View a bibliographic record and start the process of placing a hold.
  - After selecting a patron, test the "Hold starts on" and "Hold
    expires on" date fields. The fields should be linked and each
    should limit to future dates.
  - Confirm that the dates are saved correctly when you submit the
    hold.
- Locate a bibliographic record with multiple holds and view the holds.
  - In the table of holds, test each date field: Date, expiration, and
    suspend-until.
- Test that Flatpickr's static "formatDate" method is working
  correctly:
  - Locate a bibliographic record's item so that there is text in both
    the "Public note" and "Non-public note" field.
  - Check that item out to a patron.
  - After the page reloads the public and non-public notes should be
    shown under the checkout title highlighted in red.
- Check for references to a "validate1" function. There should be none.

Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
2021-09-29 12:47:33 +02:00
acqui Bug 24190: (QA follow-up) record unchanged bookfund and fix typo 2021-09-21 20:22:57 +02:00
admin Bug 28510: Remove marking of closed branches as 'disable_transfer' 2021-09-28 15:12:45 +02:00
api Bug 28412: Add information about supported authentication methods 2021-09-21 20:22:57 +02:00
authorities Bug 17600: Add missing imports in authorities/ 2021-08-03 14:55:26 +02:00
basket Bug 17600: Standardize our EXPORT_OK 2021-07-16 08:58:47 +02:00
bin
C4 Bug 28826: Add FacetOrder system preference 2021-09-29 11:34:21 +02:00
catalogue Bug 28484: ES clean title in biblio detail 2021-09-29 11:34:18 +02:00
cataloguing Bug 27461: Right pad with default elements for too short 008s 2021-09-28 15:12:45 +02:00
circ Bug 28695: Add shelving location column to overdue.tt 2021-08-30 17:02:07 +02:00
clubs Bug 17600: Standardize our EXPORT_OK 2021-07-16 08:58:47 +02:00
course_reserves Bug 17600: Standardize our EXPORT_OK 2021-07-16 08:58:47 +02:00
debian Bug 28749: Restore the database name to Koha dumps 2021-07-30 15:54:05 +02:00
docs Bug 17600: Standardize our EXPORT_OK 2021-07-16 08:58:47 +02:00
errors Bug 17600: Standardize our EXPORT_OK 2021-07-16 08:58:47 +02:00
etc Bug 28830: Add cni index for 003 2021-08-30 17:02:07 +02:00
ill Bug 22614: Migrate original request 2021-09-21 20:22:57 +02:00
installer Bug 28826: DBRev 21.06.00.025 2021-09-29 12:47:33 +02:00
Koha Bug 28826: Add FacetOrder system preference 2021-09-29 11:34:21 +02:00
koha-tmpl Bug 28937: Use Flatpickr on circulation and patron pages 2021-09-29 12:47:33 +02:00
labels Bug 17600: Fix POSIX imports 2021-07-29 14:37:26 +02:00
lib/CGI/Session/Serialize Bug 17600: Standardize our EXPORT_OK 2021-07-16 08:58:47 +02:00
members Bug 28870: Move email address validation to a specific class method 2021-09-28 10:22:36 +02:00
misc Bug 29078: Resolve division by zero in touch_all scripts 2021-09-28 15:12:45 +02:00
offline_circ Bug 17600: Standardize our EXPORT_OK 2021-07-16 08:58:47 +02:00
opac Bug 28484: (QA follow-up) Add fix on OPAC 2021-09-29 11:34:18 +02:00
patron_lists Bug 17600: Standardize our EXPORT_OK 2021-07-16 08:58:47 +02:00
patroncards Bug 17600: Standardize our EXPORT_OK 2021-07-16 08:58:47 +02:00
plugins Bug 17600: Standardize our EXPORT_OK 2021-07-16 08:58:47 +02:00
pos Bug 17600: Standardize our EXPORT_OK 2021-07-16 08:58:47 +02:00
reports Bug 28804: (bug 25026 follow-up) Handle SQL errors in reports 2021-08-11 12:00:10 +02:00
reserve Bug 29049: Remove reference to optionloop 2021-09-28 15:12:45 +02:00
reviews Bug 17600: Standardize our EXPORT_OK 2021-07-16 08:58:47 +02:00
rotating_collections Bug 17600: Standardize our EXPORT_OK 2021-07-16 08:58:47 +02:00
serials Bug 28624: Remove Smart::Comments 2021-07-26 12:46:32 +02:00
services Bug 17600: Standardize our EXPORT_OK 2021-07-16 08:58:47 +02:00
skel
suggestion Bug 28946: (bug 23271 follow-up) Missing occurrence in add_user_search.pl 2021-09-14 18:23:28 +02:00
svc Bug 29056: Remove the demo functionality leftovers 2021-09-28 15:12:45 +02:00
t Bug 27155: Include identifier test in Biblio_and_Items_plugin_hooks.t 2021-09-29 11:34:20 +02:00
tags Bug 17600: Standardize our EXPORT_OK 2021-07-16 08:58:47 +02:00
tmp/modified_authorities
tools Bug 29019: Restore eval call 2021-09-28 15:12:45 +02:00
virtualshelves Bug 12561: Change prototype of XSLTParse4Display 2021-08-16 09:57:05 +02:00
xt Bug 17600: Standardize our EXPORT_OK 2021-07-16 08:58:47 +02:00
.editorconfig
.eslintrc.json
.gitignore
.htaccess
.mailmap Bug 28386: Disambiguate Tomas and Blou 2021-05-26 12:30:59 +02:00
.perlcriticrc
.scss-lint.yml
about.pl Bug 28870: Move email address validation to a specific class method 2021-09-28 10:22:36 +02:00
app.psgi Bug 20582: Fix PSGI file when behind a reverse proxy 2020-10-06 12:00:04 +02:00
changelanguage.pl
cpanfile Bug 28870: Remove traces of Email::Valid 2021-09-28 10:22:35 +02:00
fix-perl-path.PL
gulpfile.js
help.pl Bug 17600: Standardize our EXPORT_OK 2021-07-16 08:58:47 +02:00
INSTALL
Koha.pm Bug 28826: DBRev 21.06.00.025 2021-09-29 12:47:33 +02:00
koha_perl_deps.pl Bug 17600: Standardize our EXPORT_OK 2021-07-16 08:58:47 +02:00
kohaversion.pl
LICENSE
mainpage.pl Bug 24387: Rename "News" with "Additional contents" 2021-08-16 11:55:55 +02:00
Makefile.PL
MANIFEST.SKIP
package.json Bug 27939: Update yarn.lock file 2021-03-16 12:04:06 +01:00
README
README.md
README.robots
rewrite-config.PL Bug 28519: Put CGI::Session::Serialize::yamlxs in lib directory 2021-06-17 10:07:36 +02:00
yarn.lock

Koha is a free software integrated library system (ILS).

Koha is distributed under the GNU GPL version 3 or later.

Note: Koha does not accept pull requests from git hosting sites.

Note: This project has its own bug tracker, to report a bug or submit a patch visit http://bugs.koha-community.org.

For guidelines on submitting patches for Koha please visit https://wiki.koha-community.org/wiki/SubmitingAPatch

The developers handbook can be found at https://wiki.koha-community.org/wiki/Developer_handbook

http://koha-community.org/

Koha Logo