Bug 13526 - Mandatory fields should not be able to be hidden in borrower self-registr...
authorDavid Cook <dcook@prosentient.com.au>
Wed, 7 Jan 2015 06:32:06 +0000 (17:32 +1100)
committerChris Cormack <chris@bigballofwax.co.nz>
Mon, 19 Jan 2015 19:07:44 +0000 (08:07 +1300)
commit1cf3dc6e8e296ad9d5af5f270c1afed74b68a02c
tree357fccf8be1b7459acd8c1fc3e4a7e5c10b5818a
parent27f6ca35210a70662de50577c9f1c3fa2774dd08
Bug 13526 - Mandatory fields should not be able to be hidden in borrower self-registration

Currently, mandatory fields in the borrower self-registration can be hidden.
This causes problems since the validator rejects the registration,
even though all required fields on the screen have been filled out.

This is especially a problem when using the system preference
"PatronSelfRegistrationVerifyByEmail", since it automatically makes
"email" a mandatory field.

This patch makes it so that a mandatory field cannot be hidden on
the self-registration page.

_TEST PLAN_

Before applying
1) Hide the "email" and the "emailpro" fields using the
"PatronSelfRegistrationBorrowerUnwantedField" system preference.

2) Make the "email" and the "emailpro" fields mandatory using the
"PatronSelfRegistrationBorrowerMandatoryField" system preference.

3) Note that you cannot see "Primary email" or "Secondary email"
on the self registration page.
(The registration page which can be found by turning
on "PatronSelfRegistration" and filling in
"PatronSelfRegistrationDefaultCategory". The link will be on
opac-main.pl on the right side of the screen under the login box.)

4) Note that you cannot submit a self-registration request as
the system tells you that you have not filled in all the mandatory
fields.

5) Apply the patch && refresh the self registration page

6) Note that you can now see "Primary email" and "Secondary email"
on the self-registration screen".

Signed-off-by: Abby <abbyrobnz@gmail.com>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@gmail.com>
(cherry picked from commit fd6176d0a58e5e5016d5db002578b7a7dee9531c)
Signed-off-by: Chris Cormack <chris@bigballofwax.co.nz>
opac/opac-memberentry.pl