From 22593e2e9b613bd03fd42100e60f9a1da53476d9 Mon Sep 17 00:00:00 2001 From: Galen Charlton Date: Wed, 12 Mar 2014 02:54:05 +0000 Subject: [PATCH] Bug 10861: (follow-up) use minlength/maxlength rather than pattern for client-side validation This patch replaces use of the HTML5 pattern attribute with minlength and maxlength, which is compatible with the jQuery validation plugin and which, in Chrome 33.0.1750.146 at least, works better. To test: [1] Enter a new patron record or edit an existing one. [2] Verify that the minimum and/or maximum length requirements set by the CardnumberLength syspref are validated and that form submission is prevented if the cardnumber doesn't meet the length requirements. Signed-off-by: Galen Charlton --- .../intranet-tmpl/prog/en/modules/members/memberentrygen.tt | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/members/memberentrygen.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/members/memberentrygen.tt index 0f28cef071..ffdb44b2f1 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/modules/members/memberentrygen.tt +++ b/koha-tmpl/intranet-tmpl/prog/en/modules/members/memberentrygen.tt @@ -898,9 +898,11 @@ [% END %] Card number: [% IF minlength_cardnumber == maxlength_cardnumber %] - + [% ELSIF minlength_cardnumber && maxlength_cardnumber %] - + + [% ELSIF maxlength_cardnumber %] + [% ELSE %] [% END %] -- 2.39.5