From 4587d898dc29c3677eafc250a752a190353d8609 Mon Sep 17 00:00:00 2001 From: Bernardo Gonzalez Kriegel Date: Thu, 29 Oct 2015 09:13:26 -0300 Subject: [PATCH] Bug 15049: (Signed off) Hide currency but preserv alert MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit This follow up hides currency, but the alert pops if no currency is active. To test: 1) Apply the patch 2) Unset any active currency 3) Alert must show on Acquisitons home 4) Set a currency active, no currency display on Acqui home 5) Check that currency IS displayed on /cgi-bin/koha/admin/aqbudgets.pl or /cgi-bin/koha/admin/aqbudgetperiods.pl Amended for better translation Currency does / does not display as described in test plan. Signed-off-by: Marc Véron Signed-off-by: JM Broust Signed-off-by: Jonathan Druart Signed-off-by: Brendan A Gallagher --- .../prog/en/includes/budgets-active-currency.inc | 15 ++++++++++++++- .../prog/en/modules/acqui/acqui-home.tt | 2 +- 2 files changed, 15 insertions(+), 2 deletions(-) diff --git a/koha-tmpl/intranet-tmpl/prog/en/includes/budgets-active-currency.inc b/koha-tmpl/intranet-tmpl/prog/en/includes/budgets-active-currency.inc index 400bbb9255..fbaa7e8e9d 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/includes/budgets-active-currency.inc +++ b/koha-tmpl/intranet-tmpl/prog/en/includes/budgets-active-currency.inc @@ -1 +1,14 @@ -[% IF ( currency ) %]

Currency = [% currency %]

[% ELSE %]

No active currency is defined

[% IF CAN_user_parameters_parameters_remaining_permissions %]Please specify an active currency.[% ELSE %]Your administrator must specify an active currency.[% END %]

[% END %] +[% IF ( currency ) %] + [% IF ( not hide ) %] +

Currency = [% currency %]

+ [% END %] +[% ELSE %] +
+

No active currency is defined

+ [% IF CAN_user_parameters_parameters_remaining_permissions %] +

Please specify an active currency.

+ [% ELSE %] +

Your administrator must specify an active currency.

+ [% END %] +
+[% END %] diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/acqui/acqui-home.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/acqui/acqui-home.tt index 6b521aa763..ab062679d8 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/modules/acqui/acqui-home.tt +++ b/koha-tmpl/intranet-tmpl/prog/en/modules/acqui/acqui-home.tt @@ -98,7 +98,7 @@ $(document).ready(function() { [% INCLUDE 'acquisitions-toolbar.inc' %]

Acquisitions

- [% INCLUDE 'budgets-active-currency.inc' %] + [% INCLUDE 'budgets-active-currency.inc' hide = 'yes' %] [% UNLESS ( loop_budget ) %] [% IF ( CAN_user_acquisition_period_manage ) %]
You must define a budget in Administration
-- 2.39.5