Bug 26296: Use new table column selection modal for OPAC suggestion fields
authorOwen Leonard <oleonard@myacpl.org>
Fri, 8 Jan 2021 20:06:45 +0000 (20:06 +0000)
committerFridolin Somers <fridolin.somers@biblibre.com>
Mon, 10 Jan 2022 07:04:17 +0000 (21:04 -1000)
commitfe46f077a7b27ebb82891abf37144ba9f4fd59ea
treeef7cfecde2620cc8a06d74f421b15f522d254c59
parent895fc88605f7381218b38463be17531a06403c1a
Bug 26296: Use new table column selection modal for OPAC suggestion fields

This patch builds on the change introduced by Bug 22844, changing the
selection mode for the OPACSuggestionMandatoryFields and
OPACSuggestionUnwantedFields preferences to a modal.

This patch includes a database update for converting the format of the
saved values in these preferences. Previously the suggestions table
fields would be separated by a comma. Now they should be separated by a
pipe.

To test, apply the patch run the database update.

 - 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.

Signed-off-by: David Nind <david@davidnind.com>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
installer/data/mysql/atomicupdate/bug_26296-Replace-comma-with-pipe-in-OPACSuggestion-preferences.perl [new file with mode: 0644]
koha-tmpl/intranet-tmpl/prog/en/modules/admin/preferences/opac.pref
koha-tmpl/intranet-tmpl/prog/en/modules/admin/preferences/suggestions.json [new file with mode: 0644]
koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-suggestions.tt
opac/opac-suggestions.pl