From e741435e351b7298ee79d51df32203efa135a582 Mon Sep 17 00:00:00 2001 From: =?utf8?q?Marc=20V=C3=A9ron?= Date: Sat, 15 Feb 2014 16:19:04 +0100 Subject: [PATCH] Bug 11772: Show warning on About page:System information if no active currency is defined MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit This patch displays a warning on the About page when no active currency is defined. Test plan: 1) Make sure that no currency is defined as active (Home › Administration › Currencies & Exchange rates › Currencies) 2) Go to Home › About Koha > System information Result: No warning issued. 3) Apply patch and reload About page Result: Warning issued. Signed-off-by: Chris Cormack Signed-off-by: Jonathan Druart Signed-off-by: Galen Charlton (cherry picked from commit 9e01b7c1d6c32dfd9ae0af4e708ca598303fbcf1) Signed-off-by: Fridolin Somers --- about.pl | 3 +++ koha-tmpl/intranet-tmpl/prog/en/modules/about.tt | 7 +++++-- 2 files changed, 8 insertions(+), 2 deletions(-) diff --git a/about.pl b/about.pl index 6b44ea852b..ba77ca6d44 100755 --- a/about.pl +++ b/about.pl @@ -77,6 +77,8 @@ my $errZebraConnection = C4::Context->Zconn("biblioserver",0)->errcode(); my $warnIsRootUser = (! $loggedinuser); +my $warnNoActiveCurrency = (! defined C4::Budgets->GetCurrency()); + $template->param( kohaVersion => $kohaVersion, osVersion => $osVersion, @@ -93,6 +95,7 @@ $template->param( warnPrefAnonymousPatron => $warnPrefAnonymousPatron, errZebraConnection => $errZebraConnection, warnIsRootUser => $warnIsRootUser, + warnNoActiveCurrency => $warnNoActiveCurrency, ); my @components = (); diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/about.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/about.tt index 5fa89e946b..1c0d4c8d98 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/modules/about.tt +++ b/koha-tmpl/intranet-tmpl/prog/en/modules/about.tt @@ -104,9 +104,9 @@

Please log in instead with a regular staff account. To create a staff account, create a library, a patron category 'Staff' and add a new patron. Then give this patron permissions from 'More' in the toolbar.

[% END %]

Warnings regarding the system configuration

- [% IF warnPrefBiblioAddsAuthorities || warnPrefEasyAnalyticalRecords || warnPrefAnonymousPatron %] + [% IF warnPrefBiblioAddsAuthorities || warnPrefEasyAnalyticalRecords || warnPrefAnonymousPatron || warnNoActiveCurrency %] - + [% IF (warnPrefBiblioAddsAuthorities) %] [% END %] @@ -116,6 +116,9 @@ [% IF warnPrefAnonymousPatron %] [% END %] + [% IF warnNoActiveCurrency %] + + [% END %]
PreferencesPreferences and parameters
Warning System preference 'AutoCreateAuthorities' set, but needs 'BiblioAddsAuthorities' set as well.
Warning System preference 'OPACPrivacy' set, but AnonymousPatron preference is set to '0'. Set it to a valid borrower number if you want that this feature works correctly.
Warning No active currency is defined. Please go to Administration:Currencies & Exchange rates and mark one currency as active.
[% ELSE %]

No warnings

-- 2.39.5