Bug 34369: Fix 'Did you mean'

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>

Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
This commit is contained in:
Jonathan Druart 2023-08-03 10:01:32 +02:00 committed by Tomas Cohen Arazi
parent 3c6dd02acb
commit ea91896f15
Signed by: tomascohen
GPG key ID: 0A272EA1B2F3C15F

View file

@ -1,6 +1,7 @@
[% USE raw %]
[% USE Asset %]
[% PROCESS 'i18n.inc' %]
[% USE Koha %]
[% SET footerjs = 1 %]
[% BLOCK pluginlist %]
<div class="pluginlist">
@ -67,6 +68,7 @@
plugins that you want to use.
</div>
<form action="/cgi-bin/koha/admin/didyoumean.pl" method="post">
[% INCLUDE 'csrf-token.inc' %]
<fieldset id="didyoumeanopac">
<legend>OPAC</legend>
[% PROCESS pluginlist plugins=OPACpluginlist type='opac' %]
@ -110,7 +112,8 @@
function yesimeant() {
var OPACdidyoumean = serialize_plugins('opac');
var data = "pref_OPACdidyoumean=" + encodeURIComponent(OPACdidyoumean);
const csrf_token = "[% Koha.GenerateCSRF | $raw %]";
let data = "pref_OPACdidyoumean=%s&csrf_token=%s".format(encodeURIComponent(OPACdidyoumean), csrf_token);
$.ajax({
data: data,