Bug 14924: Remove C4::Dates from members/memberentry.pl
authorMarc Véron <veron@veron.ch>
Tue, 29 Sep 2015 15:32:56 +0000 (17:32 +0200)
committerTomas Cohen Arazi <tomascohen@theke.io>
Thu, 8 Oct 2015 13:58:26 +0000 (10:58 -0300)
commit9ff81d0e3f1217e780b070b651e00642e6c83b8a
tree8d895ca7fe471e7cefc2340f6a65ae646a7f3e2d
parentcc87d60b4afd274b6282dfd2e79ce8ffa845ef1f
Bug 14924: Remove C4::Dates from members/memberentry.pl

This patch removes C4::Dates from members/memberentry.pl

To test:
- Apply patch
- Add and edit patrons with and without birthdate as
  mandatory field (syspref BorrowerMandatoryField)
- Verify that dates (birtdate, registration, expiration)
  display and are stored correctly

Signed-off-by: Hector Castro <hector.hecaxmmx@gmail.com>
Works as advertised. Tested with syspref BorrowerMandatoryField and
table borrowers.dateofbirth

Bug 14924 - (follow-up) Add date validation using eval

This patch adds a date validation (see comment #3).

To test:

- Apply patch
- Create a new user or edit an existing user
- Try valid dates for date of birth
- Try invalid dates as 0000-00-00 or 32/01/1970. You can can
  copy/paste such strings to the date field, ignore the warning
  message and submit. Verify that after submit you get a message
  "Date of birth is invalid"
- Try the same with enrollement /expiry dates

Signed-off-by: Hector Castro <hector.hecaxmmx@gmail.com>
Works as advertised. Tested with invalid dates.

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Amended patch: I have splitted them to make them much more readable
(some lines were removed then added).
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
members/memberentry.pl