From 525718991f6688c47539f9a4bd930a7be74647c6 Mon Sep 17 00:00:00 2001 From: Andrew Isherwood Date: Tue, 1 Oct 2019 11:02:15 +0100 Subject: [PATCH] Bug 23681: Add PatronRestrictionTypes syspref This patch adds the new syspref "PatronRestrictionTypes" Signed-off-by: Benjamin Veasey Sponsored-by: Loughborough University Signed-off-by: Katrin Fischer --- .../bug_23681_add_PatronRestrictionTypes_syspref.perl | 6 ++++++ installer/data/mysql/mandatory/sysprefs.sql | 1 + .../prog/en/modules/admin/preferences/patrons.pref | 7 +++++++ 3 files changed, 14 insertions(+) create mode 100644 installer/data/mysql/atomicupdate/bug_23681_add_PatronRestrictionTypes_syspref.perl diff --git a/installer/data/mysql/atomicupdate/bug_23681_add_PatronRestrictionTypes_syspref.perl b/installer/data/mysql/atomicupdate/bug_23681_add_PatronRestrictionTypes_syspref.perl new file mode 100644 index 0000000000..0319740215 --- /dev/null +++ b/installer/data/mysql/atomicupdate/bug_23681_add_PatronRestrictionTypes_syspref.perl @@ -0,0 +1,6 @@ +$DBversion = 'XXX'; # will be replaced by the RM +if( CheckVersion( $DBversion ) ) { + $dbh->do( q| INSERT IGNORE INTO systempreferences (variable, value, explanation, options, type) VALUES ('PatronRestrictionTypes', '0', 'If enabled, it is possible to specify the "type" of patron restriction being applied', '', 'YesNo'); | ); + SetVersion( $DBversion ); + print "Upgrade to $DBversion done (Bug 23681 - Add PatronRestrictionTypes syspref)\n"; +} diff --git a/installer/data/mysql/mandatory/sysprefs.sql b/installer/data/mysql/mandatory/sysprefs.sql index c1162d9f6c..b84429197f 100644 --- a/installer/data/mysql/mandatory/sysprefs.sql +++ b/installer/data/mysql/mandatory/sysprefs.sql @@ -524,6 +524,7 @@ INSERT INTO systempreferences ( `variable`, `value`, `options`, `explanation`, ` ('PatronDuplicateMatchingAddFields','surname|firstname|dateofbirth', NULL,'A list of fields separated by "|" to deduplicate patrons when created','Free'), ('patronimages','0',NULL,'Enable patron images for the staff interface','YesNo'), ('PatronRemovalDelay','',NULL,'Delay for removing anonymized patrons', 'Integer'), +('PatronRestrictionTypes','0',NULL,'Specify type of patron restriction being applied', 'YesNo'), ('PatronSelfModificationBorrowerUnwantedField','',NULL,'Name the fields you don\'t want to display when a patron is editing their information via the OPAC.','free'), ('PatronSelfModificationMandatoryField','',NULL,'Define the required fields when a patron is editing their information via the OPAC','free'), ('PatronSelfRegistration','0',NULL,'If enabled, patrons will be able to register themselves via the OPAC.','YesNo'), diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/admin/preferences/patrons.pref b/koha-tmpl/intranet-tmpl/prog/en/modules/admin/preferences/patrons.pref index 239dd62ed7..8e8225c998 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/modules/admin/preferences/patrons.pref +++ b/koha-tmpl/intranet-tmpl/prog/en/modules/admin/preferences/patrons.pref @@ -330,6 +330,13 @@ Patrons: 1: Allow 0: "Don't allow" - staff to set the ability for a patron's fines to be viewed by linked patrons in the OPAC. + - + - pref: PatronRestrictionTypes + choices: + yes: Allow + no: Don't allow + - "the type of patron restriction to be specified when applying manually" + Privacy: - - Use the following URL -- 2.30.2