View | Details | Raw Unified | Return to bug 34369
Collapse All | Expand All

(-)a/koha-tmpl/intranet-tmpl/prog/en/modules/preservation/home.tt (+1 lines)
Lines 34-39 Link Here
34
        const db_columns = [% To.json(db_columns) | $raw %];
34
        const db_columns = [% To.json(db_columns) | $raw %];
35
        const api_mappings = [% To.json(api_mappings) | $raw %];
35
        const api_mappings = [% To.json(api_mappings) | $raw %];
36
        const notice_templates = [% To.json(notice_templates || []) | $raw %];
36
        const notice_templates = [% To.json(notice_templates || []) | $raw %];
37
        const csrf_token = "[% Koha.GenerateCSRF | $raw %]";
37
38
38
    </script>
39
    </script>
39
40
(-)a/koha-tmpl/intranet-tmpl/prog/js/vue/fetch/system-preferences-api-client.js (-3 / +5 lines)
Lines 6-12 export class SysprefAPIClient extends HttpClient { Link Here
6
            baseURL: "/cgi-bin/koha/svc/config/systempreferences",
6
            baseURL: "/cgi-bin/koha/svc/config/systempreferences",
7
        });
7
        });
8
    }
8
    }
9
10
    get sysprefs() {
9
    get sysprefs() {
11
        return {
10
        return {
12
            get: variable =>
11
            get: variable =>
Lines 16-22 export class SysprefAPIClient extends HttpClient { Link Here
16
            update: (variable, value) =>
15
            update: (variable, value) =>
17
                this.post({
16
                this.post({
18
                    endpoint: "",
17
                    endpoint: "",
19
                    body: "pref_%s=%s".format(variable, value),
18
                    body: "pref_%s=%s&csrf_token=%s".format(
19
                        variable,
20
                        value,
21
                        csrf_token
22
                    ),
20
                    headers: {
23
                    headers: {
21
                        "Content-Type":
24
                        "Content-Type":
22
                            "application/x-www-form-urlencoded;charset=utf-8",
25
                            "application/x-www-form-urlencoded;charset=utf-8",
23
- 

Return to bug 34369