From 0e1d572218b39b51c6e2fe26ec7165c72a2746dd Mon Sep 17 00:00:00 2001 From: Jonathan Druart Date: Wed, 23 Apr 2014 09:56:26 +0200 Subject: [PATCH] [PASSED QA] Bug 7180: Reset statistic values on reloading the page On the "Default accounting details", if a dropdown list was created for a statistic value, on reloading the page it still exist. It should not given the fund value is reset. The CGIsort variable is useless and can be remove: the dropdown list is generated using the ajax call. Signed-off-by: Katrin Fischer Testing notes are on the bug report. --- acqui/addorderiso2709.pl | 31 ------------------- .../prog/en/modules/acqui/addorderiso2709.tt | 36 ++++------------------ 2 files changed, 6 insertions(+), 61 deletions(-) diff --git a/acqui/addorderiso2709.pl b/acqui/addorderiso2709.pl index f3c124e..456e840 100755 --- a/acqui/addorderiso2709.pl +++ b/acqui/addorderiso2709.pl @@ -311,37 +311,6 @@ foreach my $r ( @{$budgets_hierarchy} ) { } $template->param( budget_loop => $budget_loop,); -my $CGIsort1; -if ($budget) { # its a mod .. - if ( defined $budget->{'sort1_authcat'} ) { # with custom Asort* planning values - $CGIsort1 = GetAuthvalueDropbox( $budget->{'sort1_authcat'}, $data->{'sort1'} ); - } -} elsif ( scalar(@$budgets) ) { -} elsif ( scalar(@$budgets_hierarchy) ) { - $CGIsort1 = GetAuthvalueDropbox( @$budgets_hierarchy[0]->{'sort1_authcat'}, '' ); -} -# if CGIsort is successfully fetched, the use it -# else - failback to plain input-field -if ($CGIsort1) { - $template->param( CGIsort1 => $CGIsort1 ); -} else { - $template->param( sort1 => $data->{'sort1'} ); -} - -my $CGIsort2; -if ($budget) { - if ( defined $budget->{'sort2_authcat'} ) { - $CGIsort2 = GetAuthvalueDropbox( $budget->{'sort2_authcat'}, $data->{'sort2'} ); - } -} elsif ( scalar(@$budgets_hierarchy) ) { - $CGIsort2 = GetAuthvalueDropbox( @$budgets_hierarchy[0]->{sort2_authcat}, '' ); -} -if ($CGIsort2) { - $template->param( CGIsort2 => $CGIsort2 ); -} else { - $template->param( sort2 => $data->{'sort2'} ); -} - output_html_with_http_headers $input, $cookie, $template->output; 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 4a72396..e5a5641 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/modules/acqui/addorderiso2709.tt +++ b/koha-tmpl/intranet-tmpl/prog/en/modules/acqui/addorderiso2709.tt @@ -70,6 +70,8 @@ $(this).parent().siblings('li').find('input[name="sort2"]').attr('name', 'all_sort2'); } ); + $("select[name='all_budget_id']").change(); + $("#records_to_import fieldset.rows ol").hide(); $('input:checkbox[name="import_record_id"]').change(function(){ var container = $(this).parents("fieldset"); @@ -321,38 +323,12 @@
  • The 2 following fields are available for your own usage. They can be useful for statistical purposes
    - - [% IF CGIsort1 %] - - [% ELSE %] - - [% END %] + +
  • - - - [% IF CGIsort2 %] - - [% ELSE %] - - [% END %] - + +
  • -- 1.8.3.2