@@ -, +, @@ on the suggestion form in OPAC #2/2 --- installer/data/mysql/sysprefs.sql | 1 + installer/data/mysql/updatedatabase.pl | 7 +++++++ .../intranet-tmpl/prog/en/modules/admin/preferences/opac.pref | 7 +++++++ 3 files changed, 15 insertions(+) --- a/installer/data/mysql/sysprefs.sql +++ a/installer/data/mysql/sysprefs.sql @@ -286,6 +286,7 @@ INSERT INTO systempreferences ( `variable`, `value`, `options`, `explanation`, ` ('opacsmallimage','','','Enter a complete URL to an image to replace the default Koha logo','free'), ('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'), ('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 @@ -8551,6 +8551,13 @@ if (CheckVersion($DBversion)) { SetVersion($DBversion); } +$DBversion = "3.17.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');"); + print "Upgrade to $DBversion done (Bug 10848 - Allow configuration of mandatory/required fields on the suggestion form in OPAC)\n"; + SetVersion($DBversion); +} + =head1 FUNCTIONS =head2 TableExists($table) --- a/koha-tmpl/intranet-tmpl/prog/en/modules/admin/preferences/opac.pref +++ a/koha-tmpl/intranet-tmpl/prog/en/modules/admin/preferences/opac.pref @@ -529,6 +529,13 @@ OPAC: yes: Allow - patrons to select library when making a purchase suggestion - + - "Fields (separated with |) 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, place, itemtype and patronreason." + - "Note: title field would be allways implicitly required, no need to enter it here." + - - pref: OpacHiddenItems type: textarea class: code --