From f4ccc5b29c12eadf8927ab1c3c77a6243ac1cbd3 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 --- .../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 94e2463434..1a6920f84d 100644 --- a/installer/data/mysql/mandatory/sysprefs.sql +++ b/installer/data/mysql/mandatory/sysprefs.sql @@ -513,6 +513,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 9ef410f24c..5504fa6f60 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 @@ -326,6 +326,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.20.1