From 46d212201e43de3a29679d3da63a6567390dc03b Mon Sep 17 00:00:00 2001 From: Jonathan Druart Date: Thu, 12 Sep 2013 11:44:25 +0200 Subject: [PATCH] Bug 7180: QA followup - fix unit tests (use a transaction). - add 3 tabs on the page in order to be more understandable. - fix a warn in logs --- acqui/addorderiso2709.pl | 1 + .../prog/en/modules/acqui/addorderiso2709.tt | 42 ++++++++++++-------- t/db_dependent/Budgets.t | 8 ++-- 3 files changed, 31 insertions(+), 20 deletions(-) diff --git a/acqui/addorderiso2709.pl b/acqui/addorderiso2709.pl index be893e5..58fcef4 100755 --- a/acqui/addorderiso2709.pl +++ b/acqui/addorderiso2709.pl @@ -501,6 +501,7 @@ sub get_infos_syspref { } my $r; for my $field_name ( @$field_list ) { + next unless exists $yaml->{$field_name}; my @fields = split /\|/, $yaml->{$field_name}; for my $field ( @fields ) { my ( $f, $sf ) = split /\$/, $field; diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/acqui/addorderiso2709.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/acqui/addorderiso2709.tt index f70aaf5..05164a7 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/modules/acqui/addorderiso2709.tt +++ b/koha-tmpl/intranet-tmpl/prog/en/modules/acqui/addorderiso2709.tt @@ -76,11 +76,11 @@ if ( $(this).is(':checked') ) { $(container).addClass("selected"); $(container).removeClass("unselected"); - $(container).find("ol").toggle(); + $(container).find("ol").toggle(true); } else { $(container).addClass("unselected"); $(container).removeClass("selected"); - $(container).find("ol").toggle(); + $(container).find("ol").toggle(false); } } ); @@ -118,12 +118,12 @@ return disableUnchecked($(this)); }); + $('#tabs').tabs(); }); function disableUnchecked(form){ $("div.biblio.unselected").each(function(){ - $(this).find('select').attr('disabled', 'disabled'); - $(this).find('input').attr('disabled', 'disabled'); + $(this).remove(); }); return 1; } @@ -142,11 +142,17 @@

Add orders from [% comments %] ([% file_name %] staged on [% upload_timestamp | $KohaDates with_hours => 1 %])

-
+
+
+ +
Check All Uncheck All - @@ -158,7 +164,7 @@ [% END %] [% FOREACH biblio IN biblio_list %] -
+
[% END %]
-
-

Import all

-

Import all the lines in the basket with the following parameters:

+
+

Items information

+

Import all the checked items in the basket with the following parameters:

[% IF ( items ) %] -
+
Item [% IF ( NoACQframework ) %]
No ACQ framework, using default. You should create a framework with code ACQ, the items framework would be used
@@ -259,8 +265,9 @@ [% END %]
[% END %] - -
+
+
+
Accounting details
  1. @@ -339,11 +346,12 @@
-
- Cancel -
+
+
-
+
+ Cancel +
[% ELSE %]
diff --git a/t/db_dependent/Budgets.t b/t/db_dependent/Budgets.t index 54beddf..efb07ce 100755 --- a/t/db_dependent/Budgets.t +++ b/t/db_dependent/Budgets.t @@ -3,16 +3,17 @@ use warnings; use Test::More tests => 22; BEGIN {use_ok('C4::Budgets') } +use C4::Context; use C4::Dates; use C4::Context; use YAML; - -my $dbh = C4::Context->dbh(); +my $dbh = C4::Context->dbh; $dbh->{AutoCommit} = 0; $dbh->{RaiseError} = 1; -$dbh->do('DELETE FROM aqbudgetperiods'); +$dbh->do(q|DELETE FROM aqbudgetperiods|); +$dbh->do(q|DELETE FROM aqbudgets|); # # Budget Periods : @@ -134,3 +135,4 @@ ok($budgets->[0]->{budget_name} lt $budgets->[1]->{budget_name}, 'default sort o ok($del_status=DelBudget($budget_id), "DelBudget returned $del_status"); +$dbh->rollback; -- 1.7.10.4