Bugzilla – Attachment 69298 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 mandatory
Bug-19466---Check-if-cardnumber-mandatory.patch (text/plain), 1.79 KB, created by
David Bourgault
on 2017-11-22 22:00:04 UTC
(
hide
)
Description:
Bug 19466 - Check if cardnumber mandatory
Filename:
MIME Type:
Creator:
David Bourgault
Created:
2017-11-22 22:00:04 UTC
Size:
1.79 KB
patch
obsolete
>From 4db427743f3e565001d8f530685be3db1578d205 Mon Sep 17 00:00:00 2001 >From: David Bourgault <david.bourgault@inlibro.com> >Date: Wed, 22 Nov 2017 16:55:09 -0500 >Subject: [PATCH] Bug 19466 - Check if cardnumber mandatory > >Turns out this isn't a bug, since it is caused by 'cardnumber' being in the 'BorrowerMandatoryField' syspref. > >It is however confusing for the user that it suggested to leave the field blank when the field is required. To alleviate this I added a condition to the code; it will not suggest leaving the field blank if 'BorrowerMandatoryField' contains 'cardnumber'. > >To test: > >Before: >0) Enable autoMemberNum >1) Add 'cardnumber' to BorrowerMandatoryField >2) Go to create a user: a message will appear suggesting you leave the cardnumber field blank for autocalc, but when submitting the form it will show as required. >Apply patch >2) Go to create a user: if 'cardnumber' is in BorrowerMandatoryField, the suggestion will not be shown. >--- > koha-tmpl/intranet-tmpl/prog/en/modules/members/memberentrygen.tt | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > >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 8a17653..9c5c8b4 100644 >--- a/koha-tmpl/intranet-tmpl/prog/en/modules/members/memberentrygen.tt >+++ b/koha-tmpl/intranet-tmpl/prog/en/modules/members/memberentrygen.tt >@@ -651,7 +651,7 @@ $(document).ready(function() { > [% ELSE %] > <label for="cardnumber" class="validated"> > [% END %] >- [% IF autoMemberNum %] >+ [% IF autoMemberNum && !BorrowerMandatoryField.match('.*cardnumber.*') %] > Card number<br>(<u>leave blank for auto calc during registration</u>): </label> > [% ELSE %] > Card number: </label> >-- >2.7.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