@@ -, +, @@
- A child patron must have a guarantor. This is controlled by
a new syspref ChildNeedsGuarantor.
- A guarantor cannot be a guarantee.
---
installer/data/mysql/sysprefs.sql | 1 +
installer/data/mysql/updatedatabase.pl | 12 ++++++++++++
.../prog/en/modules/admin/preferences/patrons.pref | 7 +++++++
.../intranet-tmpl/prog/en/modules/members/memberentrygen.tt | 7 +++++++
members/memberentry.pl | 7 +++++++
5 files changed, 34 insertions(+)
--- a/installer/data/mysql/sysprefs.sql
+++ a/installer/data/mysql/sysprefs.sql
@@ -79,6 +79,7 @@ INSERT INTO systempreferences ( `variable`, `value`, `options`, `explanation`, `
('CatalogModuleRelink','0',NULL,'If OFF the linker will never replace the authids that are set in the cataloging module.','YesNo'),
('CataloguingLog','1',NULL,'If ON, log edit/create/delete actions on bibliographic data. WARNING: this feature is very resource consuming.','YesNo'),
('checkdigit','none','none|katipo','If ON, enable checks on patron cardnumber: none or \"Katipo\" style checks','Choice'),
+('ChildNeedsGuarantor', '0', NULL, 'If ON, a child patron must have a guarantor when adding the patron.', 'YesNo'),
('CircAutocompl','1',NULL,'If ON, autocompletion is enabled for the Circulation input','YesNo'),
('CircAutoPrintQuickSlip','qslip',NULL,'Choose what should happen when an empty barcode field is submitted in circulation: Display a print quick slip window, Display a print slip window or Clear the screen.','Choice'),
('CircControl','ItemHomeLibrary','PickupLibrary|PatronLibrary|ItemHomeLibrary','Specify the agency that controls the circulation and fines policy','Choice'),
--- a/installer/data/mysql/updatedatabase.pl
+++ a/installer/data/mysql/updatedatabase.pl
@@ -8202,6 +8202,18 @@ if ( CheckVersion($DBversion) ) {
SetVersion($DBversion);
}
+$DBversion = "3.15.00.XXX";
+if ( CheckVersion($DBversion) ) {
+ $dbh->do(q{
+ INSERT IGNORE INTO systempreferences (variable,value,explanation,options,type)
+ VALUES('ChildNeedsGuarantor', 0, 'If ON, a child patron must have a guarantor when adding the patron.', '', 'YesNo')
+ });
+
+ print "Upgrade to $DBversion done (Bug 12133 - Guarantor requirements when registering a patron)\n";
+ SetVersion($DBversion);
+}
+
+
=head1 FUNCTIONS
=head2 TableExists($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
@@ -56,6 +56,13 @@ Patrons:
katipo: Do
- check and construct borrower card numbers in the Katipo style. This overrides autoMemberNum
if on.
-
+ - "A child patron"
+ - pref: "ChildNeedsGuarantor"
+ choices:
+ yes: "must have"
+ no: "doesn't need"
+ - a guarantor when adding the patron.
+ -
- pref: EnhancedMessagingPreferences
choices:
yes: Allow
--- a/koha-tmpl/intranet-tmpl/prog/en/modules/members/memberentrygen.tt
+++ a/koha-tmpl/intranet-tmpl/prog/en/modules/members/memberentrygen.tt
@@ -175,6 +175,12 @@
The following fields are wrong. Please fix them.