From 953c9d511bf94f3904541feb81568b893505bb1a Mon Sep 17 00:00:00 2001 From: Jonathan Druart Date: Wed, 23 Apr 2014 09:56:26 +0200 Subject: [PATCH] Bug 7180: (follow-up) 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: Galen Charlton --- 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 f3c124ec8a..456e8400b6 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 86b6b236f6..9c36ff44e0 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/modules/acqui/addorderiso2709.tt +++ b/koha-tmpl/intranet-tmpl/prog/en/modules/acqui/addorderiso2709.tt @@ -65,6 +65,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"); @@ -316,38 +318,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 %] - + +
  • -- 2.39.5