Bug Fixing 3568 : Untranslated strings
authorHenri-Damien LAURENT <henridamien.laurent@biblibre.com>
Tue, 1 Sep 2009 08:34:08 +0000 (10:34 +0200)
committerHenri-Damien LAURENT <henridamien.laurent@biblibre.com>
Wed, 16 Sep 2009 21:19:46 +0000 (23:19 +0200)
Signed-off-by: Galen Charlton <gmcharlt@gmail.com>
Signed-off-by: Henri-Damien LAURENT <henridamien.laurent@biblibre.com>
koha-tmpl/intranet-tmpl/prog/en/modules/serials/subscription-add.tmpl
serials/subscription-add.pl

index 9512b30..514963f 100644 (file)
@@ -1034,7 +1034,7 @@ $(document).ready(function() {
             
                 <ul>
                     <li>The subscription <strong>must</strong> be associated with a bibliographic record.</li>
-                    <li>You <strong>must</strong> select a vendor if you wish to generate claims.</li>
+                    <li>You have to select a vendor if you wish to generate claims.</li>
                 </ul></div>
             
             
@@ -1257,15 +1257,9 @@ $(document).ready(function() {
             <label for="subtype" class="required">Subscription length:</label>
             
                 <select name="subtype" id="subtype">
-                    <!-- TMPL_LOOP NAME="subtype" -->
-                        <!-- TMPL_IF NAME="selected" -->
-                        <option value="<!-- TMPL_VAR NAME="name" -->" selected="selected">
-                        <!-- TMPL_ELSE -->
-                        <option value="<!-- TMPL_VAR NAME="name" -->">
-                        <!-- /TMPL_IF -->
-                        <!-- TMPL_VAR NAME="name" -->
-                        </option>
-                    <!-- /TMPL_LOOP -->
+                                       <!--TMPL_IF Name="subtype_numberlength"--><option value="numberlength" selected="selected"><!--TMPL_ELSE--><option value="numberlength"><!--/TMPL_IF--> Number of issues</option>                                       
+                                       <!--TMPL_IF Name="subtype_weeklength"--><option value="weeklength" selected="selected"><!--TMPL_ELSE--><option value="weeklength"><!--/TMPL_IF--> Number of weeks</option>                                      
+                                       <!--TMPL_IF Name="subtype_monthlength"--><option value="monthlength" selected="selected"><!--TMPL_ELSE--><option value="monthlength"><!--/TMPL_IF--> Number of months</option>                                  
                 </select>
                 <input type="text" name="sublength" value="<!-- TMPL_VAR name="sublength" -->" size="3" onkeypress="return check_input(event)" /> (enter amount in numerals)
             <span class="required">Required</span>
index 39bd8ff..9d3f1c6 100755 (executable)
@@ -102,31 +102,18 @@ 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(
                     $op => 1,
-                    subtype => \@sub_type_data,
+                    "subtype_$sub_on" => 1,
                     sublength =>$sublength,
                     history => ($op eq 'mod' && $subs->{manualhistory} == 1 ),
                     "periodicity".$subs->{'periodicity'} => 1,