From 276b59e5bcce0f68dfbce32f2c94e8d5178500a7 Mon Sep 17 00:00:00 2001 From: Owen Leonard Date: Thu, 28 Jan 2016 08:54:56 -0500 Subject: [PATCH] Bug 15691: Show card number minimum and maximum in visible hint when adding a patron The CardnumberLength system preference defines card number minimum and maximum allowed values when adding a patron. This information is currently hidden in a title attribute on the card number input field. This patch moves the information into a
, matching other fields in the entry form which offer details about entry guidelines. To test, apply the patch and open the new patron entry form. Test for various values of CardnumberLength, and with 'cardnumber' mandatory or not mandatory as defined in BorrowerMandatoryField. Signed-off-by: Hector Castro Works as advertised Signed-off-by: Kyle M Hall Signed-off-by: Brendan Gallagher brendan@bywatersolutions.com (cherry picked from commit 9f172a3c1bc8c7cd1664eabac81c5b66877b3952) Signed-off-by: Julian Maurice --- .../prog/en/modules/members/memberentrygen.tt | 17 ++++++++++++----- 1 file changed, 12 insertions(+), 5 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 6d1e41a893..4201bea0a6 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/modules/members/memberentrygen.tt +++ b/koha-tmpl/intranet-tmpl/prog/en/modules/members/memberentrygen.tt @@ -618,15 +618,22 @@ [% END %] Card number: [% IF minlength_cardnumber == maxlength_cardnumber %] - + + [% IF ( mandatorycardnumber ) %]Required[% END %] +
Card number must be exactly [% minlength_cardnumber %] characters.
[% ELSIF minlength_cardnumber && maxlength_cardnumber %] - + + [% IF ( mandatorycardnumber ) %]Required[% END %] +
Card number must be between [% minlength_cardnumber %] and [% maxlength_cardnumber %] characters.
[% ELSIF maxlength_cardnumber %] - + + [% IF ( mandatorycardnumber ) %]Required[% END %] +
Card number can be up to [% maxlength_cardnumber %] characters.
[% ELSE %] - + + [% IF ( mandatorycardnumber ) %]Required[% END %] +
There is no minimum or maximum character length.
[% END %] - [% IF ( mandatorycardnumber ) %]Required[% END %] [% END %] [% UNLESS nobranchcode %] -- 2.39.5