Bug 19466: Warn about conflicting settings of autoMemberNum and BorrowerMandatoryFiel...
authorDavid Bourgault <david.bourgault@inlibro.com>
Thu, 21 Dec 2017 15:20:48 +0000 (10:20 -0500)
committerJonathan Druart <jonathan.druart@bugs.koha-community.org>
Tue, 13 Feb 2018 16:36:01 +0000 (13:36 -0300)
commit8df9ba7ec5c8a01b1a12ebab12c5b965441d0f21
tree092dcd695d1c31c099ed78a5cb7de81ffe6b71bb
parenta845188c7d3a7700301d5d649ad7685f72879d6d
Bug 19466: Warn about conflicting settings of autoMemberNum and BorrowerMandatoryField for cardnumber

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>
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
koha-tmpl/intranet-tmpl/prog/en/modules/members/memberentrygen.tt