Bugzilla – Attachment 71473 Details for
Bug 19466
Cardnumber auto calc is broken because field is required
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 19466: Check if cardnumber is mandatory
Bug-19466-Check-if-cardnumber-is-mandatory.patch (text/plain), 6.19 KB, created by
Claire Gravely
on 2018-02-12 14:04:19 UTC
(
hide
)
Description:
Bug 19466: Check if cardnumber is mandatory
Filename:
MIME Type:
Creator:
Claire Gravely
Created:
2018-02-12 14:04:19 UTC
Size:
6.19 KB
patch
obsolete
>From 91923223e7fd23a37b2c0c82c7ffbf565c9100c9 Mon Sep 17 00:00:00 2001 >From: David Bourgault <david.bourgault@inlibro.com> >Date: Thu, 21 Dec 2017 10:20:48 -0500 >Subject: [PATCH] Bug 19466: Check if cardnumber is mandatory > >Changes the appearance of the cardnumber entry field in memberentrygen.tt >The "Leave empty for autocalc" message has been moved to the hint div >under the input field. If AutoMemberNum and BorrowerMandatoryField >interfere with each other, the auto calc hint is replace by a warning >telling the user that auto calc has been disabled. > >Cardnumber should now correctly appear as mandatory if marked as such >in BorrowerMandatoryField. > >Test plan: >0] Apply patch >1} Disable AutoMemberNum, remove cardnumber from BorrowerMandatoryField >2) Edit or create a patron, scroll down to cardnumber input field > Hint is some form of "Cardnumber must be this long" > Cardnumber input is not marked as required > There is no mention of auto calc > >3> Enable AutoMemberNum > Hint includes "Leave empty for auto calc" message > >4~ Add cardnumber to BorrowerMandatoryField > Hint warns you that your sysprefs are conflicting. > Cardnumber input is marked as required > >5: Disable AutoMemberNum > Hint is some form of "Cardnumber must be this long" > Cardnumber input is marked as required > >Signed-off-by: Claire Gravely <claire.gravely@bsz-bw.de> >--- > .../prog/en/modules/members/memberentrygen.tt | 34 +++++++++++++--------- > 1 file changed, 20 insertions(+), 14 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 314f216..e369453 100644 >--- a/koha-tmpl/intranet-tmpl/prog/en/modules/members/memberentrygen.tt >+++ b/koha-tmpl/intranet-tmpl/prog/en/modules/members/memberentrygen.tt >@@ -646,33 +646,39 @@ $(document).ready(function() { > <legend id="library_management_lgd">Library management</legend><ol> > [% UNLESS nocardnumber %] > <li> >- [% IF mandatorycardnumber and not autoMemberNum %] >+ [% IF mandatorycardnumber %] > <label for="cardnumber" class="required"> > [% ELSE %] > <label for="cardnumber" class="validated"> > [% END %] >- [% IF autoMemberNum %] >- Card number<br>(<u>leave blank for auto calc during registration</u>): </label> >- [% ELSE %] >- Card number: </label> >- [% END %] >+ Card number: </label> >+ >+ <!-- NOTE: div.hint closing tag isn't on the same line --> > [% IF minlength_cardnumber == maxlength_cardnumber %] > <input type="text" id="cardnumber" name="cardnumber" size="20" value="[% cardnumber | html %]" minlength="[% minlength_cardnumber %]" maxlength="[% maxlength_cardnumber %]" /> >- [% IF mandatorycardnumber and not autoMemberNum %]<span class="required">Required</span>[% END %]<span id="cn_max" class="required">Card number must not be more than [% maxlength_cardnumber %] characters.</span> >- <div class="hint">Card number must be exactly [% minlength_cardnumber %] characters.</div> >+ [% IF mandatorycardnumber %]<span class="required">Required</span>[% END %]<span id="cn_max" class="required">Card number must not be more than [% maxlength_cardnumber %] characters.</span> >+ <div class="hint">Card number must be exactly [% minlength_cardnumber %] characters. > [% ELSIF minlength_cardnumber && maxlength_cardnumber %] > <input type="text" id="cardnumber" name="cardnumber" size="20" value="[% cardnumber | html %]" minlength="[% minlength_cardnumber %]" maxlength="[% maxlength_cardnumber %]" /> >- [% IF mandatorycardnumber and not autoMemberNum %]<span class="required">Required</span>[% END %]<span id="cn_max" class="required">Card number must not be more than [% maxlength_cardnumber %] characters.</span> >- <div class="hint">Card number must be between [% minlength_cardnumber %] and [% maxlength_cardnumber %] characters.</div> >+ [% IF mandatorycardnumber %]<span class="required">Required</span>[% END %]<span id="cn_max" class="required">Card number must not be more than [% maxlength_cardnumber %] characters.</span> >+ <div class="hint">Card number must be between [% minlength_cardnumber %] and [% maxlength_cardnumber %] characters. > [% ELSIF maxlength_cardnumber %] > <input type="text" id="cardnumber" name="cardnumber" size="20" value="[% cardnumber | html %]" maxlength="[% maxlength_cardnumber %]" /> >- [% IF mandatorycardnumber and not autoMemberNum %]<span class="required">Required</span>[% END %]<span id="cn_max" class="required">Card number must not be more than [% maxlength_cardnumber %] characters.</span> >- <div class="hint">Card number can be up to [% maxlength_cardnumber %] characters.</div> >+ [% IF mandatorycardnumber %]<span class="required">Required</span>[% END %]<span id="cn_max" class="required">Card number must not be more than [% maxlength_cardnumber %] characters.</span> >+ <div class="hint">Card number can be up to [% maxlength_cardnumber %] characters. > [% ELSE %] > <input type="text" id="cardnumber" name="cardnumber" size="20" value="[% cardnumber | html %]" /> >- [% IF mandatorycardnumber and not autoMemberNum %]<span class="required">Required</span>[% END %] >- <div class="hint">There is no minimum or maximum character length.</div> >+ [% IF mandatorycardnumber %]<span class="required">Required</span>[% END %] >+ <div class="hint">There is no minimum or maximum character length. >+ [% END %] >+ [% IF autoMemberNum %] >+ [% IF mandatorycardnumber %] >+ <br/><span class="error">AutoMemberNum is set to enabled, but cardnumber is marked as mandatory in BorrowerMandatoryField : auto calc has been disabled.</span> >+ [% ELSE %] >+ <br/>Leave empty for auto calc during registration >+ [% END %] > [% END %] >+ </div><!--/hint div --> > </li> > [% END %] > [% UNLESS nobranchcode %] >-- >2.1.4
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
|
Splinter Review
Attachments on
bug 19466
:
68099
|
69298
|
69299
|
70056
|
71473
|
71534
|
71558
|
74957