]> git.evergreen-ils.org Git - working/Evergreen.git/commit
lp#1016102: Solve the Problem of the UI allowing unreasonable dates from the user
authorZavier Banks <zbanks@catalyte.io>
Thu, 19 Sep 2019 16:27:08 +0000 (16:27 +0000)
committerZavier Banks <zbanks@catalyte.io>
Fri, 20 Sep 2019 19:23:02 +0000 (19:23 +0000)
commit39a97f554fbf349bd7b9890259620e85577c9959
treea83f88b676b53d0942005e67bcd06a23e2774d0b
parent10e77568568baef8b09cab6bce6b799d8211be31
lp#1016102: Solve the Problem of the UI allowing unreasonable dates from the user

I added a date limiter in the checkout.js file, that prevents the user from making unreasonable dates.

Signed-off-by: Zavier Banks <zbanks@catalyte.io>
lp#1016102: due date fields allow non-sane due dates

I added in a conditional that checks if the date is valid, and not unreasonable. Additionally,
I added a YAOUS that gives the amount of years maximum, you can check out a book. The code can be changed to
be more specific, if necessary.

Signed-off-by: Zavier Banks <zbanks@catalyte.io>
lp#1016102 due date fields allow non-sane due dates

I reconfigured the way I found and implemented the maximum due date. In the initialization of the
checkout.js document, I added a way to get the maximum date from the database, and add it to the current date.
In the t_checkout.tt2 file, I added a max_date to the date input as well.

Signed-off-by: Zavier Banks <zbanks@catalyte.io>
Open-ILS/src/sql/Pg/950.data.seed-values.sql
Open-ILS/src/sql/Pg/upgrade/XXXX.data.lp1016102-due-date-max-checkout-interval.sql [new file with mode: 0644]
Open-ILS/src/templates/staff/circ/patron/t_checkout.tt2
Open-ILS/web/js/ui/default/staff/circ/patron/checkout.js