From 2c1cdc5dc399ee2d8fd890fc38dd17d1b75fd3da Mon Sep 17 00:00:00 2001 From: Henri-Damien LAURENT Date: Tue, 1 Sep 2009 10:34:08 +0200 Subject: [PATCH] Bug Fixing 3568 : Untranslated strings Signed-off-by: Galen Charlton --- .../en/modules/serials/subscription-add.tmpl | 14 +++------ serials/subscription-add.pl | 29 +++++-------------- 2 files changed, 12 insertions(+), 31 deletions(-) diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/serials/subscription-add.tmpl b/koha-tmpl/intranet-tmpl/prog/en/modules/serials/subscription-add.tmpl index 26337f1f7c..0908828a50 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/modules/serials/subscription-add.tmpl +++ b/koha-tmpl/intranet-tmpl/prog/en/modules/serials/subscription-add.tmpl @@ -1052,7 +1052,7 @@ $(document).ready(function() { @@ -1275,15 +1275,9 @@ $(document).ready(function() { " size="3" onkeypress="return check_input(event)" /> (enter amount in numerals) Required diff --git a/serials/subscription-add.pl b/serials/subscription-add.pl index 9fd55d12f7..e6f9e83e67 100755 --- a/serials/subscription-add.pl +++ b/serials/subscription-add.pl @@ -93,32 +93,19 @@ if ($op eq 'mod' || $op eq 'dup' || $op eq 'modsubscription') { $nextexpected->{'isfirstissue'} = $nextexpected->{planneddate}->output('iso') eq $firstissuedate ; $subs->{nextacquidate} = $nextexpected->{planneddate}->output() if($op eq 'mod'); unless($op eq 'modsubscription') { - if($subs->{numberlength} > 0){ - $sublength = $subs->{numberlength}; - $sub_on = $subscription_types[0]; - } elsif ($subs->{weeklength}>0){ - $sublength = $subs->{weeklength}; - $sub_on = $subscription_types[1]; - } else { - $sublength = $subs->{monthlength}; - $sub_on = $subscription_types[2]; - } - while (@subscription_types) { - my $sub_type = shift @subscription_types; - my %row = ( 'name' => $sub_type ); - if ( $sub_on eq $sub_type ) { - $row{'selected'} = ' selected'; - } else { - $row{'selected'} = ''; - } - push( @sub_type_data, \%row ); - } + foreach my $length_unit qw(numberlength weeklength monthlength){ + if ($subs->{$length_unit}){ + $sublength=$subs->{$length_unit}; + $sub_on=$length_unit; + last; + } + } $template->param($subs); $template->param("dow".$subs->{'dow'} => 1) if defined $subs->{'dow'}; $template->param( $op => 1, - subtype => \@sub_type_data, + "subtype_$sub_on" => 1, sublength =>$sublength, history => ($op eq 'mod' && $subs->{manualhistory} == 1 ), "periodicity".$subs->{'periodicity'} => 1, -- 2.39.5