Koha/koha-tmpl/intranet-tmpl/prog/en/modules/members
Jonathan Druart 834abff631 Bug 10861: Add a check on cardnumber length
Some libraries would like to add a check on the cardnumber length.
This patch adds the ability to restrict the cardnumber to a specific
length (strictly equal to XX, or length > XX or min < length < max).
This restriction is checked on inserting/updating a patron or on importing
patrons.

This patch adds:
- 1 new syspref CardnumberLength. 2 formats: a number or a range
  (xx,yy).

- 1 new unit test file t/Members/checkcardnumber.t for the
C4::Members::checkcardnumber routine.

Test plan:
1/ Fill the pref CardnumberLength with '5,8'
2/ Create a new patron with an invalid cardnumber (123456789)
3/ Check that you cannot save
4/ With Firebug, replace the pattern attribute value (for the cardnumber
input) with ".{5,10}"
5/ You are allowed to save but an error occurred.
6/ Try the same steps for update.
7/ Go to the import borrowers tool.
8/ Play with the import borrowers tool. We must test add/update patrons
and the "record matching" field (cardnumber or a uniq patron attribute)

Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Tested adding, updating; importing and ran unit test.
Preliminary QA comments on Bugzilla

Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Galen Charlton <gmc@esilibrary.com>
2014-03-12 02:16:18 +00:00
..
boraccount.tt Bug 2546: make description of standard fine types translatable 2013-12-05 18:44:33 +00:00
deletemem.tt Bug 2780 - Capitalize strings consistently (members) 2012-04-10 10:04:09 +02:00
files.tt Bug 6261 [Revised] Consolidate patron toolbar include files 2012-12-27 18:36:42 -05:00
guarantor_search.tt Bug 2780 - Capitalize strings consistently (members) 2012-04-10 10:04:09 +02:00
mancredit.tt Bug 11554: Capitalization fix in patron account on fines tab 2014-01-15 15:33:56 +00:00
maninvoice.tt Bug 11554: Capitalization fix in patron account on fines tab 2014-01-15 15:33:56 +00:00
member-flags.tt Bug 8061: RTL CSS overrides (staff client) 2013-04-07 12:51:54 -04:00
member-password.tt Bug 2780 - Capitalize strings consistently (members) 2012-04-10 10:04:09 +02:00
member.tt Bug 10318: Show primary email in patron search results 2014-01-13 21:33:09 +00:00
memberentrygen.tt Bug 10861: Add a check on cardnumber length 2014-03-12 02:16:18 +00:00
members-update.tt Bug 10924: fix updating contact note from OPAC 2013-09-23 18:05:46 +00:00
moremember-brief.tt Bug 9406: ensure confirmation of patron renewal is displayed 2013-03-30 21:22:00 -04:00
moremember-print.tt Bug 10592: fix display of favicon 2013-07-22 14:00:23 +00:00
moremember-receipt.tt Bug 10592: fix display of favicon 2013-07-22 14:00:23 +00:00
moremember.tt Bug 11717 - Use new DataTables include in member templates 2014-02-27 15:33:26 +00:00
notices.tt Bug 11605: fallback to default DataTables settings where possible 2014-03-10 19:05:51 +00:00
pay.tt Bug 11488: make string "Are you sure you want to write off ..." translatable 2014-01-31 15:51:12 +00:00
paycollect.tt Bug 6413 - QA Followup - Add notes for 'Pay selected' 2013-05-21 16:32:12 -07:00
printfeercpt.tt Bug 10592: fix display of favicon 2013-07-22 14:00:23 +00:00
printinvoice.tt Bug 10027: (follow-up) improve display of fine details on printed invoice 2013-09-08 06:24:39 +00:00
purchase-suggestions.tt Bug 11802 - corrects for the patron purchase suggestions page 2014-03-10 15:11:53 +00:00
readingrec.tt Bug 11717 - Use new DataTables include in member templates 2014-02-27 15:33:26 +00:00
routing-lists.tt Bug 6261 [Revised] Consolidate patron toolbar include files 2012-12-27 18:36:42 -05:00
search.tt Bug 5917 : Swapping templates over 2011-04-10 20:38:30 +12:00
statistics.tt Bug 11717 - Use new DataTables include in member templates 2014-02-27 15:33:26 +00:00
update-child.tt Bug 11717 - Use new DataTables include in member templates 2014-02-27 15:33:26 +00:00