From f8586f07999b32123f74f1db9e7f8f6e0b02ac69 Mon Sep 17 00:00:00 2001 From: Andrew Isherwood Date: Thu, 13 Feb 2020 14:11:05 +0000 Subject: [PATCH] Bug 24608: Add EditDueDates syspref This patch adds a EditDueDates syspref which determines whether a button for editing due dates appears in a patron's checkouts list Signed-off-by: Sally --- .../mysql/atomicupdate/bug_24083_EditDueDates_syspref.perl | 6 ++++++ installer/data/mysql/mandatory/sysprefs.sql | 1 + .../prog/en/modules/admin/preferences/circulation.pref | 6 ++++++ 3 files changed, 13 insertions(+) create mode 100644 installer/data/mysql/atomicupdate/bug_24083_EditDueDates_syspref.perl diff --git a/installer/data/mysql/atomicupdate/bug_24083_EditDueDates_syspref.perl b/installer/data/mysql/atomicupdate/bug_24083_EditDueDates_syspref.perl new file mode 100644 index 0000000000..778696ef30 --- /dev/null +++ b/installer/data/mysql/atomicupdate/bug_24083_EditDueDates_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 ('EditDueDates', '0', 'If enabled, it is possible to modify due dates in a patron checkout list ', '', 'YesNo'); | ); + SetVersion( $DBversion ); + print "Upgrade to $DBversion done (Bug 24083 - Add EditDueDates syspref)\n"; +} diff --git a/installer/data/mysql/mandatory/sysprefs.sql b/installer/data/mysql/mandatory/sysprefs.sql index 5607163a6a..63fe1991a1 100644 --- a/installer/data/mysql/mandatory/sysprefs.sql +++ b/installer/data/mysql/mandatory/sysprefs.sql @@ -189,6 +189,7 @@ INSERT INTO systempreferences ( `variable`, `value`, `options`, `explanation`, ` ('DumpTemplateVarsOpac', '0', NULL , 'If enabled, dump all Template Toolkit variable to a comment in the html source for the opac.', 'YesNo'), ('EasyAnalyticalRecords','0','','If on, display in the catalogue screens tools to easily setup analytical record relationships','YesNo'), ('EdifactInvoiceImport', 'automatic', 'automatic|manual', "If on, don't auto-import EDI invoices, just keep them in the database with the status 'new'", 'Choice'), +('EditDueDates','0','','If on, it is possible to edit due dates within a patron checkouts list','YesNo'), ('ElasticsearchIndexStatus_authorities', '0', 'Authorities index status', NULL, NULL), ('ElasticsearchIndexStatus_biblios', '0', 'Biblios index status', NULL, NULL), ('ElasticsearchMARCFormat', 'ISO2709', 'ISO2709|ARRAY', 'Elasticsearch MARC format. ISO2709 format is recommended as it is faster and takes less space, whereas array is searchable.', 'Choice'), diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/admin/preferences/circulation.pref b/koha-tmpl/intranet-tmpl/prog/en/modules/admin/preferences/circulation.pref index 6c2a33bc6c..c85149f002 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/modules/admin/preferences/circulation.pref +++ b/koha-tmpl/intranet-tmpl/prog/en/modules/admin/preferences/circulation.pref @@ -168,6 +168,12 @@ Circulation: 1: "Use" 0: "Don't use" - circulation desks with circulation. + - + - pref: EditDueDates + choices: + yes: Allow + no: "Don't allow" + - editing of due dates in a patron checkouts list Checkout policy: - -- 2.20.1