@@ -, +, @@ instead - Verify there's no behaviour change besides the change in the sysprefs definition. --- installer/data/mysql/sysprefs.sql | 2 +- installer/data/mysql/updatedatabase.pl | 2 +- .../prog/en/modules/admin/preferences/opac.pref | 17 ++++++++++++----- opac/opac-suggestions.pl | 2 +- 4 files changed, 15 insertions(+), 8 deletions(-) --- a/installer/data/mysql/sysprefs.sql +++ a/installer/data/mysql/sysprefs.sql @@ -305,7 +305,7 @@ INSERT INTO systempreferences ( `variable`, `value`, `options`, `explanation`, ` ('OPACShowUnusedAuthorities','1','','Show authorities that are not being used in the OPAC.','YesNo'), ('OpacStarRatings','all','disable|all|details',NULL,'Choice'), ('OpacSuggestionManagedBy',1,'','Show the name of the staff member who managed a suggestion in OPAC','YesNo'), -('OPACSuggestionMandatoryFields','',NULL,'Define the mandatory fields for a patron purchase suggestions made via OPAC.','free'), +('OPACSuggestionMandatoryFields','',NULL,'Define the mandatory fields for a patron purchase suggestions made via OPAC.','multiple'), ('OpacSuppression','0','','Turn ON the OPAC Suppression feature, requires further setup, ask your system administrator for details','YesNo'), ('OpacSuppressionByIPRange','','','Restrict the suppression to IP adresses outside of the IP range','free'), ('OpacSuppressionMessage','','Display this message on the redirect page for suppressed biblios','70|10','Textarea'), --- a/installer/data/mysql/updatedatabase.pl +++ a/installer/data/mysql/updatedatabase.pl @@ -9761,7 +9761,7 @@ if ( CheckVersion($DBversion) ) { $DBversion = "3.19.00.XXX"; if (CheckVersion($DBversion)) { - $dbh->do("INSERT INTO systempreferences (variable,value,options,explanation,type) VALUES('OPACSuggestionMandatoryFields', '', 'NULL', 'Define the mandatory fields for a patron purchase suggestions made via OPAC.', 'Free');"); + $dbh->do("INSERT INTO systempreferences (variable,value,options,explanation,type) VALUES('OPACSuggestionMandatoryFields', '', 'NULL', 'Define the mandatory fields for a patron purchase suggestions made via OPAC.', 'multiple');"); print "Upgrade to $DBversion done (Bug 10848 - Allow configuration of mandatory/required fields on the suggestion form in OPAC)\n"; SetVersion($DBversion); } --- a/koha-tmpl/intranet-tmpl/prog/en/modules/admin/preferences/opac.pref +++ a/koha-tmpl/intranet-tmpl/prog/en/modules/admin/preferences/opac.pref @@ -535,12 +535,19 @@ OPAC: yes: Allow - patrons to select library when making a purchase suggestion - - - "Fields (separated with |) that should be mandatory for patron purchase suggestions:" + - "Fields that should be mandatory for patron purchase suggestions:" - pref: OPACSuggestionMandatoryFields - class: multi - - "
Field names you can set here as mandatory for OPAC suggestions include: author, copyrightdate," - - "isbn, publishercode, collectiontitle, place, note, itemtype and patronreason." - - "Note: title field would be always implicitly required, no need to enter it here." + multiple: + author: Author + copyrightdate: Copyright date + isbn: ISBN + publishercode: Publisher code + collectiontitle: Collection title + place: Place + note: Note + itemtype: Item type + patronreason: Patron reason + - "(Note: title field would be always implicitly required, no need to enter it here)." - - pref: OpacHiddenItems type: textarea --- a/opac/opac-suggestions.pl +++ a/opac/opac-suggestions.pl @@ -176,7 +176,7 @@ my $mandatoryfields = ''; }; my %fh = map { ($_ && $supported_rf->{$_})? ('"'.$_.'"', 1): (); - } (split(/\s*\|\s*/, $fldsreqsp)); + } (split(/\s*\,\s*/, $fldsreqsp)); $fh{'"title"'} = 1; $mandatoryfields = join(',', (sort keys %fh)); } --