@@ -, +, @@
suggestion fields
- Go to Administration -> System preferences.
- Search for 'OPACSuggestion.'
- The input fields for OPACSuggestionUnwantedFields and
OPACSuggestionMandatoryFields should appear as "locked" (read-only)
inputs.
- Clicking either input field should trigger a modal window with
checkboxes for each available column in the suggestions table.
- Test that the "select all" and "clear all" links work correctly.
- Test that the "cancel" link closes the modal without saving your
selections.
- Test that the "Save" button closes the modal, copies your
selections to the form field, and triggers the preference-saving
function.
- Test that changes to both preferences are correctly reflected in the
OPAC suggestion form.
---
...ma-with-pipe-in-OPACSuggestion-preferences.perl | 16 +++++++++++++
.../prog/en/modules/admin/preferences/opac.pref | 28 ++++------------------
.../en/modules/admin/preferences/suggestions.json | 13 ++++++++++
.../bootstrap/en/modules/opac-suggestions.tt | 2 +-
opac/opac-suggestions.pl | 4 ++--
5 files changed, 36 insertions(+), 27 deletions(-)
create mode 100644 installer/data/mysql/atomicupdate/bug_26296-Replace-comma-with-pipe-in-OPACSuggestion-preferences.perl
create mode 100644 koha-tmpl/intranet-tmpl/prog/en/modules/admin/preferences/suggestions.json
--- a/installer/data/mysql/atomicupdate/bug_26296-Replace-comma-with-pipe-in-OPACSuggestion-preferences.perl
+++ a/installer/data/mysql/atomicupdate/bug_26296-Replace-comma-with-pipe-in-OPACSuggestion-preferences.perl
@@ -0,0 +1,16 @@
+$DBversion = 'XXX'; # will be replaced by the RM
+if( CheckVersion( $DBversion ) ) {
+ # you can use $dbh here like:
+ # $dbh->do( "ALTER TABLE biblio ADD COLUMN badtaste int" );
+
+ # or perform some test and warn
+ # if( !column_exists( 'biblio', 'biblionumber' ) ) {
+ # warn "There is something wrong";
+ # }
+
+ $dbh->do("UPDATE systempreferences SET value = REPLACE(value, ',', '|') WHERE variable IN ('OPACSuggestionMandatoryFields','OPACSuggestionUnwantedFields')");
+
+ # Always end with this (adjust the bug info)
+ NewVersion( $DBversion, 26296, "Replace comma with pipe in OPACSuggestion field preferences");
+}
+
--- a/koha-tmpl/intranet-tmpl/prog/en/modules/admin/preferences/opac.pref
+++ a/koha-tmpl/intranet-tmpl/prog/en/modules/admin/preferences/opac.pref
@@ -613,34 +613,14 @@ OPAC:
-
- "Fields that should be mandatory for patron purchase suggestions:"
- pref: OPACSuggestionMandatoryFields
- multiple:
- title: Title
- author: Author
- copyrightdate: Copyright or publication date
- isbn: ISBN, ISSN or other standard number
- publishercode: Publisher name
- collectiontitle: Collection title
- place: Publication place
- itemtype: Item type
- branch: Library or branch
- patronreason: Patron reason
- note: Note
+ type: modalselect
+ source: suggestions
- "
Note: if none of the above options are selected, 'Title' field would be mandatory anyway, by default."
-
- "Fields that should be hidden for patron purchase suggestions:"
- pref: OPACSuggestionUnwantedFields
- multiple:
- author: Author
- copyrightdate: Copyright or publication date
- isbn: ISBN, ISSN or other standard number
- publishercode: Publisher name
- collectiontitle: Collection title
- place: Publication place
- itemtype: Item type
- quantity: Quantity
- branch: Library or branch
- patronreason: Patron reason
- note: Note
+ type: modalselect
+ source: suggestions
- '
Note: Do not make OPACSuggestionMandatoryFields unwanted fields '
-
- pref: OpacHiddenItems
--- a/koha-tmpl/intranet-tmpl/prog/en/modules/admin/preferences/suggestions.json
+++ a/koha-tmpl/intranet-tmpl/prog/en/modules/admin/preferences/suggestions.json
@@ -0,0 +1,13 @@
+{
+ "author": "author",
+ "copyrightdate": "copyrightdate",
+ "isbn": "isbn",
+ "publishercode": "publishercode",
+ "collectiontitle": "collectiontitle",
+ "place": "place",
+ "quantity": "quantity",
+ "itemtype": "itemtype",
+ "branchcode": "branchcode",
+ "patronreason": "patronreason",
+ "note": "note"
+}
--- a/koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-suggestions.tt
+++ a/koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-suggestions.tt
@@ -174,7 +174,7 @@
[% END %]
[% END %]
- [% UNLESS ( branch_hidden )%]
+ [% UNLESS ( branchcode_hidden )%]