Bug 27378: Introduce cookie consent to OPAC and staff client
To avoid confusion around commit messages and the content of this enhancement, this first commit is a squashed commit of all the original code submited to this bug. Following a few years of inactivity, it has been rebased and re-submitted with some fixes and concept changes contained in the more recent commits.
Signed-ff-by: Barry Cannon <bc@interleaf.ie>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
Bug 27378: (follow-up) Add missing filters
(cherry picked from commit
6b8565b949b62269f6d850e6d412458d0dbcfb37)
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
Bug 27378: Fix accessibility issues
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
Bug 27378: Update to new atomicupdate structure
This patch consolidates the previous 4 database update files into one atomicupdate file in line with the new structure
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
Bug 27378: Change ConsentJS to CookieConsentedJS
This patch updates the name of the ConsentJS syspref to CookieConsentedJS and amends the description to be more clear what the syspref is for
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
Bug 27378: Stop the codemirror editor and delete confirmation from duplicating
Previously, if the "Add new code button" was clicked in the CookieConsentedJS editor, the original entry would have duplicated CodeMirror editors.
This was exponential, i.e adding two new lines would result in three codemirror editors appearing on the first entry, two on the second and so on.
The click event was not being applied properly and was being applied to every element with the .expand-textarea class, rather than specifically the new elements being created. The addExpandHandler function now loops through each element individually and decides whether to apply the click event handler.
Similarly, the delete confirmation was dupliacting for the same reason. This has also been resolved.
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
Bug 27378: Remove two sysprefs and replace with html customisations
Currently there are two sysprefs - CookieConsentBar and CookieConsentPopup. These allow the user to select what text they would like to see in the consent bar and modal. These have been removed and replaced with HTML customisations to allow more flexible customisations and different languages.
Sponsored by: PTFS-Europe
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
Bug 27378: (QA follow-up) Small fixes and tidy-ups
This patch does the following:
- Realphabetizes the lines in sysprefs.sql
- Fixes a formatting error in patrons.pref
- Adjusts the position of the cookie consent bar if the language selector is visible
- Fixes translatability on the syspref modal
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
Bug 27378: (QA follow-up) Allow staff to view their cookie consents
This patch allows staff to view their cookie consents through a link in the dropdown menu in the navbar. Previously staff had no way of accessing their cookie consents
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
Bug 27378: (QA follow-up) Add cancel button to cookie modal
This patch adds a cancel button to the modal for reviewing cookie consents. Previously there was no way to exit without selecting one of the cookie options
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
Bug 27378: (QA follow-up) Add filtering for OPAC only and staff only cookies
This patch fixes an issue where cookies selected as OPAC only would still show in the staff client and vise versa. The cookies are now filtered and only the correct cookies will be used in the OPAC and staff client
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
Bug 27378: (QA follow-up) Fix tests and character encoding
This patch fixes an encoding issue when using diacritics. It also fixes a failing test, corrects the format of the "Cancel" links in the modal and perltidy has been used on all relevant files
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>