From c3e86c90f4ec61c364808f9b2548c6c6292f0662 Mon Sep 17 00:00:00 2001 From: Jonathan Druart Date: Fri, 6 Oct 2023 10:56:05 +0200 Subject: [PATCH] Bug 30708: Pass csrf_token to the Vue app It's needed since bug 34369 to POST to the syspref route --- koha-tmpl/intranet-tmpl/prog/en/modules/preservation/home.tt | 3 +++ 1 file changed, 3 insertions(+) diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/preservation/home.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/preservation/home.tt index 5740f51d5ec..39695277834 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/modules/preservation/home.tt +++ b/koha-tmpl/intranet-tmpl/prog/en/modules/preservation/home.tt @@ -1,6 +1,7 @@ [% USE raw %] [% USE To %] [% USE Asset %] +[% USE Koha %] [% USE KohaDates %] [% USE TablesSettings %] [% USE AuthorisedValues %] @@ -34,6 +35,8 @@ const db_columns = [% To.json(db_columns) | $raw %]; const api_mappings = [% To.json(api_mappings) | $raw %]; + const csrf_token = "[% Koha.GenerateCSRF | $raw %]"; + [% Asset.js("js/vue/dist/preservation.js") | $raw %] -- 2.34.1