From 312c79582acf5c2c385204a27e2fab56c133a550 Mon Sep 17 00:00:00 2001 From: Bill Erickson Date: Wed, 3 Jan 2018 17:29:48 -0500 Subject: [PATCH] JBAS-1925 Ecard (Quipu) data and web form * Ecard user groups, policies, and barcode generator. * TPAC-driven web form and submit API (/eg/opac/ecard/form) * TPAC-driven card verification form (/eg/opac/ecard/verify) * API / form Test script Signed-off-by: Bill Erickson --- .../openils/var/templates_kcls/opac/ecard/form.tt2 | 125 ++++ .../var/templates_kcls/opac/ecard/submit.tt2 | 1 + .../var/templates_kcls/opac/ecard/verify.tt2 | 153 +++++ .../templates_kcls/opac/parts/googalytics_new.tt2 | 10 + KCLS/openils/var/templates_kcls/opac/register.tt2 | 13 +- KCLS/sql/schema/deploy/ecard-data.sql | 210 +++++++ KCLS/sql/schema/revert/ecard-data.sql | 42 ++ KCLS/sql/schema/sqitch.plan | 1 + KCLS/sql/schema/verify/ecard-data.sql | 7 + KCLS/test-scripts/ecard/test-submit.pl | 73 +++ KCLS/utility-scripts/CRONTAB | 4 + KCLS/utility-scripts/overdue/run_holds.sh | 5 +- .../patron_activity/patron_activity.sql | 5 +- KCLS/utility-scripts/purge_ecards/purge_ecards.sh | 20 + .../src/perlmods/lib/OpenILS/WWW/EGCatLoader.pm | 5 + .../perlmods/lib/OpenILS/WWW/EGCatLoader/Ecard.pm | 672 +++++++++++++++++++++ Open-ILS/web/js/ui/default/actor/user/register.js | 2 + 17 files changed, 1334 insertions(+), 14 deletions(-) create mode 100644 KCLS/openils/var/templates_kcls/opac/ecard/form.tt2 create mode 100644 KCLS/openils/var/templates_kcls/opac/ecard/submit.tt2 create mode 100644 KCLS/openils/var/templates_kcls/opac/ecard/verify.tt2 create mode 100644 KCLS/openils/var/templates_kcls/opac/parts/googalytics_new.tt2 create mode 100644 KCLS/sql/schema/deploy/ecard-data.sql create mode 100644 KCLS/sql/schema/revert/ecard-data.sql create mode 100644 KCLS/sql/schema/verify/ecard-data.sql create mode 100755 KCLS/test-scripts/ecard/test-submit.pl create mode 100755 KCLS/utility-scripts/purge_ecards/purge_ecards.sh create mode 100644 Open-ILS/src/perlmods/lib/OpenILS/WWW/EGCatLoader/Ecard.pm diff --git a/KCLS/openils/var/templates_kcls/opac/ecard/form.tt2 b/KCLS/openils/var/templates_kcls/opac/ecard/form.tt2 new file mode 100644 index 0000000000..3ac1a846a9 --- /dev/null +++ b/KCLS/openils/var/templates_kcls/opac/ecard/form.tt2 @@ -0,0 +1,125 @@ + + + + + [% l('Get an eCard') %] + [% INCLUDE 'opac/parts/googalytics_new.tt2' %] + + + + + + + + + + + + + + [% ctx.bc_css %] + + + + + + + [% ctx.bc_screen_reader_navigation %] + + + + [% ctx.bc_header %] + + +
+
+ +
+ +

Get a KCLS eCard

+ +

+ Please fill out the application below to get immediate 24/7 + access to King County Library System’s online services + including e-books and audiobooks, movies and music, online + classes, exam prep and research databases, and magazines. +

+

+ Please apply here + if you would prefer a card with full library privileges + including check out, computer use and printing. +

+

+ If your eCard application is successful we will mail + a confirmation letter to you in order to verify your + address. You must follow the instructions in the letter so + that the account remains open. +

+

+ Want more information about the eCard and who qualifies to + use it? Read the FAQ. +

+
+ +
+ + + +
+
+
+ + + [% ctx.bc_footer %] + + + + + + + + + + + + + + + [% ctx.bc_js %] + + + + + diff --git a/KCLS/openils/var/templates_kcls/opac/ecard/submit.tt2 b/KCLS/openils/var/templates_kcls/opac/ecard/submit.tt2 new file mode 100644 index 0000000000..ed3e58d8ea --- /dev/null +++ b/KCLS/openils/var/templates_kcls/opac/ecard/submit.tt2 @@ -0,0 +1 @@ +[% ctx.response %] diff --git a/KCLS/openils/var/templates_kcls/opac/ecard/verify.tt2 b/KCLS/openils/var/templates_kcls/opac/ecard/verify.tt2 new file mode 100644 index 0000000000..ee924d3440 --- /dev/null +++ b/KCLS/openils/var/templates_kcls/opac/ecard/verify.tt2 @@ -0,0 +1,153 @@ + + + + + [% l('Confirm an eCard Account') %] + [% INCLUDE 'opac/parts/googalytics_new.tt2' %] + + + + + + + + + + [% ctx.bc_css %] + + + + + + + [% ctx.bc_screen_reader_navigation %] + + + + [% ctx.bc_header %] + + +
+
+ +
+

Verify Your KCLS eCard

+

+ Please fill out the form below to verify your eCard account. +

+ [% IF ctx.verify_failed %] +
+ +
+ [% END %] +
+ + [% IF ctx.verify_success %] +
+ +
+ [% ELSE %] +
+
+
+ + +
+
+ + +
+ +
+
+
+ [% END %] + +
+
+ + + [% ctx.bc_footer %] + + + + + + + [% ctx.bc_js %] + + + + + diff --git a/KCLS/openils/var/templates_kcls/opac/parts/googalytics_new.tt2 b/KCLS/openils/var/templates_kcls/opac/parts/googalytics_new.tt2 new file mode 100644 index 0000000000..621c6e7c7b --- /dev/null +++ b/KCLS/openils/var/templates_kcls/opac/parts/googalytics_new.tt2 @@ -0,0 +1,10 @@ + + diff --git a/KCLS/openils/var/templates_kcls/opac/register.tt2 b/KCLS/openils/var/templates_kcls/opac/register.tt2 index f9d5f60c67..7b2a810c94 100644 --- a/KCLS/openils/var/templates_kcls/opac/register.tt2 +++ b/KCLS/openils/var/templates_kcls/opac/register.tt2 @@ -1,7 +1,7 @@ [%- PROCESS "opac/parts/header.tt2"; PROCESS "opac/parts/org_selector.tt2"; PROCESS "opac/parts/state_selector.tt2"; - ctx.page_title = l("Get a Library Card"); + ctx.page_title = l("Get an All-Access Library Card"); # for privacy, reload the page after (default) 5 minutes return_to = CGI.param('return-to'); @@ -82,16 +82,7 @@ END; # input_field() [% l('[_1]', ctx.page_title) %] - [%# INCLUDE 'opac/parts/goog_analytics.tt2' %] - + [% INCLUDE 'opac/parts/googalytics_new.tt2' %]