From 3f45f621e6bd2e71454f9a7ff1c7ab23258c8d84 Mon Sep 17 00:00:00 2001 From: Owen Leonard Date: Fri, 29 Jan 2010 10:52:05 -0500 Subject: [PATCH] Fix for Bug 3970, Warn user when there is no active currency - Adds warning to budget admin pages - Adds warning to currency admin page Signed-off-by: Galen Charlton --- admin/currency.pl | 9 +++++++-- .../prog/en/modules/admin/aqbudgetperiods.tmpl | 2 +- .../intranet-tmpl/prog/en/modules/admin/aqbudgets.tmpl | 8 +++++--- .../intranet-tmpl/prog/en/modules/admin/aqplan.tmpl | 2 +- .../intranet-tmpl/prog/en/modules/admin/currency.tmpl | 4 ++++ 5 files changed, 18 insertions(+), 7 deletions(-) diff --git a/admin/currency.pl b/admin/currency.pl index cb869e2016..43e08aec8a 100755 --- a/admin/currency.pl +++ b/admin/currency.pl @@ -164,8 +164,10 @@ if ($op eq 'add_form') { my $results = StringSearch($searchfield); my $count = scalar(@$results); my @loop; + my $activecurrency; for (my $i=$offset; $i < ($offset+$pagesize<$count?$offset+$pagesize:$count); $i++){ - warn Data::Dumper::Dumper($results->[$i]); + # warn Data::Dumper::Dumper($results->[$i]); + if($results->[$i]{'active'} == 1){ $activecurrency = 1; } push @loop, { currency => $results->[$i]{'currency'}, rate => $results->[$i]{'rate'}, @@ -174,7 +176,10 @@ if ($op eq 'add_form') { active => $results->[$i]{'active'}, }; } - $template->param(loop => \@loop); + $template->param( + loop => \@loop, + activecurrency => $activecurrency, + ); if ($offset>0) { $template->param(offsetgtzero => 1, diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/admin/aqbudgetperiods.tmpl b/koha-tmpl/intranet-tmpl/prog/en/modules/admin/aqbudgetperiods.tmpl index 41af729597..c283dfccb5 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/modules/admin/aqbudgetperiods.tmpl +++ b/koha-tmpl/intranet-tmpl/prog/en/modules/admin/aqbudgetperiods.tmpl @@ -252,7 +252,7 @@

Root budgets administration

-

Currency =

+

Currency =

No active currency is defined

Please specify an active currency.

diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/admin/aqbudgets.tmpl b/koha-tmpl/intranet-tmpl/prog/en/modules/admin/aqbudgets.tmpl index de3d738dbf..96b79a2215 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/modules/admin/aqbudgets.tmpl +++ b/koha-tmpl/intranet-tmpl/prog/en/modules/admin/aqbudgets.tmpl @@ -96,7 +96,7 @@ $(document).ready(function() { var tooltipcontent = $(".tooltipcontent"); tooltipcontent.hide(); - + $(".tooltiped td").each(function (){ contentelem = $(this).parent().children().filter(".tooltipcontent"); if(contentelem.html() != ""){ @@ -104,7 +104,7 @@ content: contentelem.html(), show: "mouseover", hide: "mouseout", - style: { + style: { name: "light", tip: "bottomLeft", border: { @@ -140,7 +140,7 @@ -
diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/admin/aqplan.tmpl b/koha-tmpl/intranet-tmpl/prog/en/modules/admin/aqplan.tmpl index 4e2702e043..28235184cf 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/modules/admin/aqplan.tmpl +++ b/koha-tmpl/intranet-tmpl/prog/en/modules/admin/aqplan.tmpl @@ -155,7 +155,7 @@ Budget planning -

Currency =

+

Currency =

No active currency is defined

Please specify an active currency.

diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/admin/currency.tmpl b/koha-tmpl/intranet-tmpl/prog/en/modules/admin/currency.tmpl index 980fbd5304..a75b675d0c 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/modules/admin/currency.tmpl +++ b/koha-tmpl/intranet-tmpl/prog/en/modules/admin/currency.tmpl @@ -180,6 +180,10 @@

Currencies and Exchange Rates

+ +

No active currency is defined

Please edit one currency and mark it as active.

+ + You searched for -- 2.39.2