From 521171bef1fa94b7051736e1808ff3ccdd2091fb Mon Sep 17 00:00:00 2001 From: Jonathan Druart Date: Tue, 5 Jul 2022 10:06:41 +0200 Subject: [PATCH] Bug 32030: Disable the module if the pref is not enabled Signed-off-by: Jonathan Field Signed-off-by: Martin Renvoize Signed-off-by: Kyle M Hall Signed-off-by: Tomas Cohen Arazi --- .../intranet-tmpl/prog/en/modules/erm/erm.tt | 2 + .../prog/js/vue/components/ERM/ERMMain.vue | 182 ++++++++++-------- 2 files changed, 101 insertions(+), 83 deletions(-) diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/erm/erm.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/erm/erm.tt index e472cf2843..8264252376 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/modules/erm/erm.tt +++ b/koha-tmpl/intranet-tmpl/prog/en/modules/erm/erm.tt @@ -52,6 +52,8 @@ const ERMProviders = "[% Koha.Preference('ERMProviders') | html %]"; const erm_providers = ERMProviders.split(','); + const ERMModule = [% IF Koha.Preference('ERMModule') %]true[% ELSE %]false[% END %]; + [% Asset.js("js/vue/dist/main.js") | $raw %] diff --git a/koha-tmpl/intranet-tmpl/prog/js/vue/components/ERM/ERMMain.vue b/koha-tmpl/intranet-tmpl/prog/js/vue/components/ERM/ERMMain.vue index c43219eefa..7a58caef47 100644 --- a/koha-tmpl/intranet-tmpl/prog/js/vue/components/ERM/ERMMain.vue +++ b/koha-tmpl/intranet-tmpl/prog/js/vue/components/ERM/ERMMain.vue @@ -1,103 +1,118 @@