@@ -, +, @@ and turn it into a system preference - Set a patron category in the sys pref and then delete said patron category (needs to not have patrons in it) - Check the about page -> System information and confirm the warning message is correct - Set the sys pref to the empty option - Check the about page -> System information and confirm the warning message is correct - Set the sys pref to a category that has no patrons of its type (ktd examples: Board, or Library) - Check the about page -> System information and confirm the warning message is correct --- Koha/Illrequest/Config.pm | 2 +- about.pl | 11 +++++++---- installer/data/mysql/mandatory/sysprefs.sql | 1 + koha-tmpl/intranet-tmpl/prog/en/modules/about.tt | 12 ++++++++++-- .../admin/preferences/interlibrary_loans.pref | 5 +++++ 5 files changed, 24 insertions(+), 7 deletions(-) --- a/Koha/Illrequest/Config.pm +++ a/Koha/Illrequest/Config.pm @@ -319,7 +319,7 @@ sub _load_configuration { if ( $reply_date && 'hide' eq $reply_date ); # ILL Partners - $configuration->{partner_code} = $xml_config->{partner_code} || 'IL'; + $configuration->{partner_code} = C4::Context->preference('ILLPartnerCode') || 'IL'; return $configuration; } --- a/about.pl +++ a/about.pl @@ -303,13 +303,16 @@ if ( C4::Context->preference('ILLModule') ) { $warnILLConfiguration = 1; } - # Check partner_code - if ( !Koha::Patron::Categories->find($ill_config->partner_code) ) { - $template->param( ill_partner_code_doesnt_exist => $ill_config->partner_code ); + # Check ILLPartnerCode sys pref + if ( !Koha::Patron::Categories->find( C4::Context->preference('ILLPartnerCode') ) ) { + $template->param( ill_partner_code_doesnt_exist => C4::Context->preference('ILLPartnerCode') ); + $warnILLConfiguration = 1; + } elsif ( !Koha::Patrons->search( { categorycode => C4::Context->preference('ILLPartnerCode') } )->count ) { + $template->param( ill_partner_code_no_patrons => C4::Context->preference('ILLPartnerCode') ); $warnILLConfiguration = 1; } - if ( !$ill_config_from_file->{partner_code} ) { + if ( !C4::Context->preference('ILLPartnerCode') ) { # partner code not defined $template->param( ill_partner_code_not_defined => 1 ); $warnILLConfiguration = 1; --- a/installer/data/mysql/mandatory/sysprefs.sql +++ a/installer/data/mysql/mandatory/sysprefs.sql @@ -287,6 +287,7 @@ INSERT INTO systempreferences ( `variable`, `value`, `options`, `explanation`, ` ('ILLModuleCopyrightClearance','','70|10','Enter text to enable the copyright clearance stage of request creation. Text will be displayed','Textarea'), ('ILLModuleUnmediated','0','','If enabled, try to immediately progress newly placed ILL requests.','YesNo'), ('ILLOpacbackends',NULL,NULL,'ILL backends to enabled for OPAC initiated requests','multiple'), +('ILLPartnerCode','IL','','Patrons from this patron category will be used as partners to place ILL requests with','free'), ('ILLSendStaffNotices', NULL, NULL, 'Send these ILL notices to staff', 'multiple'), ('ILS-DI','0','','Enables ILS-DI services at OPAC.','YesNo'), ('ILS-DI:AuthorizedIPs','','Restricts usage of ILS-DI to some IPs','.','Free'), --- a/koha-tmpl/intranet-tmpl/prog/en/modules/about.tt +++ a/koha-tmpl/intranet-tmpl/prog/en/modules/about.tt @@ -514,7 +514,15 @@