From aca135d22d535c7498f8042d8eeb22b69d14cf2d 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" --- .../atomicupdate/bug_23681_add_PatronRestrictionTypes_syspref.perl | 6 ++++++ installer/data/mysql/sysprefs.sql | 1 + .../intranet-tmpl/prog/en/modules/admin/preferences/patrons.pref | 6 ++++++ 3 files changed, 13 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..d6d06ee94b --- /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/sysprefs.sql b/installer/data/mysql/sysprefs.sql index 88476cd729..d8b3e4aab1 100644 --- a/installer/data/mysql/sysprefs.sql +++ b/installer/data/mysql/sysprefs.sql @@ -465,6 +465,7 @@ INSERT INTO systempreferences ( `variable`, `value`, `options`, `explanation`, ` ('PatronAnonymizeDelay','',NULL,'Delay for anonymizing patrons', 'Integer'), ('patronimages','0',NULL,'Enable patron images for the Staff Client','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'), ('PatronSelfRegistration','0',NULL,'If enabled, patrons will be able to register themselves via the OPAC.','YesNo'), ('PatronSelfRegistrationAdditionalInstructions','','','A free text field to display additional instructions to newly self registered patrons.','free'), 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 14f1ef910c..7906d3c0b6 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 @@ -233,6 +233,12 @@ Patrons: no: Allow all permitted users - "to access/change superlibrarian privileges." - "
NOTE: A permitted user needs to have the 'permissions' flag (if no superlibrarian)." + - + - pref: PatronRestrictionTypes + choices: + yes: Allow + no: Don't allow + - "the type of patron restriction to be specified when applying manually" Privacy: - -- 2.11.0