@@ -, +, @@
---
admin/systempreferences.pl | 1 +
installer/data/mysql/sysprefs.sql | 1 +
installer/data/mysql/updatedatabase.pl | 7 +
.../prog/en/modules/admin/preferences/patrons.pref | 5 +
.../prog/en/modules/help/members/memberentry.tt | 1 +
.../prog/en/modules/members/memberentrygen.tt | 124 +++++++++++++++++++-
members/memberentry.pl | 7 +
7 files changed, 142 insertions(+), 4 deletions(-)
--- a/admin/systempreferences.pl
+++ a/admin/systempreferences.pl
@@ -223,6 +223,7 @@ $tabsysprefs{intranetreadinghistory} = "Patrons";
$tabsysprefs{NotifyBorrowerDeparture} = "Patrons";
$tabsysprefs{memberofinstitution} = "Patrons";
$tabsysprefs{BorrowerMandatoryField} = "Patrons";
+$tabsysprefs{BorrowerUnwantedField} = "Patrons";
$tabsysprefs{borrowerRelationship} = "Patrons";
$tabsysprefs{BorrowersTitles} = "Patrons";
$tabsysprefs{patronimages} = "Patrons";
--- a/installer/data/mysql/sysprefs.sql
+++ a/installer/data/mysql/sysprefs.sql
@@ -323,4 +323,5 @@ INSERT INTO systempreferences (variable,value,explanation,options,type) VALUES (
INSERT INTO `systempreferences` (variable,value,explanation,options,type) VALUES ('BasketConfirmations', '1', 'When closing or reopening a basket,', 'always ask for confirmation.|do not ask for confirmation.', 'Choice');
INSERT INTO `systempreferences` (variable,value,explanation,options,type) VALUES ('MARCAuthorityControlField008', '|| aca||aabn | a|a d', NULL, NULL, 'Textarea');
INSERT INTO systempreferences (variable,value,explanation,options,type) VALUES('OpenLibraryCovers',0,'If ON Openlibrary book covers will be show',NULL,'YesNo');
+INSERT INTO `systempreferences` (variable,value,explanation,options,type) VALUES('BorrowerUnwantedField','','Name the fields you don\'t need to store for a patron\'s account',NULL,'free');
INSERT INTO `systempreferences` (variable,value,explanation,options,type) VALUES ('OpacKohaUrl','1',"Show 'Powered by Koha' text on OPAC footer.",NULL,NULL);
--- a/installer/data/mysql/updatedatabase.pl
+++ a/installer/data/mysql/updatedatabase.pl
@@ -4476,6 +4476,13 @@ if (C4::Context->preference("Version") < TransformToNum($DBversion)) {
SetVersion($DBversion);
}
+$DBversion = "3.05.00.XXX";
+if (C4::Context->preference("Version") < TransformToNum($DBversion)) {
+ $dbh->do("INSERT INTO `systempreferences` (variable,value,explanation,options,type) VALUES('BorrowerUnwantedField','','Name the fields you don\'t need to store for a patron\'s account',NULL,'free')");
+ print "Upgrade to $DBversion done (BorrowerUnwantedField syspref)\n";
+ SetVersion ($DBversion);
+}
+
=head1 FUNCTIONS
=head2 DropAllForeignKeys($table)
--- a/koha-tmpl/intranet-tmpl/prog/en/modules/admin/preferences/patrons.pref
+++ a/koha-tmpl/intranet-tmpl/prog/en/modules/admin/preferences/patrons.pref
@@ -32,6 +32,11 @@ Patrons:
class: multi
- (separate columns with |)
-
+ - "The following database columns will not appear on the patron entry screen:"
+ - pref: BorrowerUnwantedField
+ class: multi
+ - (separate columns with |)
+ -
- "Guarantors can be the following of those they guarantee:"
- pref: borrowerRelationship
class: multi
--- a/koha-tmpl/intranet-tmpl/prog/en/modules/help/members/memberentry.tt
+++ a/koha-tmpl/intranet-tmpl/prog/en/modules/help/members/memberentry.tt
@@ -22,6 +22,7 @@
Enter the identifying information regarding your patron
- Required fields are defined in the BorrowerMandatoryField system preference
+ - Unwanted fields are defined in the BorrowerUnwantedField system preference
- Salutation is populated by the BorrowersTitles system preference
--- a/koha-tmpl/intranet-tmpl/prog/en/modules/members/memberentrygen.tt
+++ a/koha-tmpl/intranet-tmpl/prog/en/modules/members/memberentrygen.tt
@@ -178,10 +178,12 @@
[% END %]
[% IF ( step_1 ) %]
+[%UNLESS notitle && nosurname && nofirstname && nodateofbirth && noinitials && noothernames &&nosex %]
+[% END # hide fieldset %]
[% IF ( showguarantor ) %]
[% END %]
+[% UNLESS noaddress && noaddress2 && nocity && nostate && nozipcode && nocountry %]
+[% END # nostreet && nocity etc group%]
+
+[% UNLESS nophone && nophonepro && nomobile && noemail && noemailpro && nofax %]
-
+[%END # hide fieldset %]
[% END %]
[% IF ( step_6 ) %]
+ [% UNLESS noB_address && noB_address2 && noB_city && noB_zipcode && noB_state && noB_country &&nocontactnote && noB_phone && noB_email %]
+ [% END # UNLESS noB_address && noB_city && noB_state && noB_phone && noB_email %]
[% END %]
[% IF ( step_2 ) %]
+ [% UNLESS noaltcontactsurname && noaltcontactfirstname && noaltcontactaddress1 && noaltcontactaddress2 && noaltcontactaddress3 && noaltcontactstate && noaltcontactzipcode && noaltcontactcountry && noaltcontactphone %]
+ [% END # UNLESS noaltcontactsurname && noaltcontactfirstname etc %]
[% END %]
[% IF ( step_3 ) %]
+ [% UNLESS nodateenrolled && nodateexpiry && noopacnote && noborrowernotes %]
+ [% END # hide fieldset %]
+
+ [% UNLESS nouserid && nopassword %]
+ [% END # hide fieldset %]
[% UNLESS ( opadd ) %]