From 167b8c134540a858a5f3dada8e9230830c8e4178 Mon Sep 17 00:00:00 2001 From: Owen Leonard Date: Thu, 28 Jan 2016 08:54:56 -0500 Subject: [PATCH] [SIGNED-OFF]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 --- .../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 8a8d3d4..8433229 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/modules/members/memberentrygen.tt +++ b/koha-tmpl/intranet-tmpl/prog/en/modules/members/memberentrygen.tt @@ -633,15 +633,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 %] -- 1.7.10.4