[Koha-cvs] koha/admin marc_subfields_structure.pl [rel_3_0]

paul poulain paul at koha-fr.org
Thu Nov 23 10:06:31 CET 2006


CVSROOT:	/sources/koha
Module name:	koha
Branch:		rel_3_0
Changes by:	paul poulain <tipaul>	06/11/23 09:06:31

Modified files:
	admin          : marc_subfields_structure.pl 

Log message:
	- reindenting with spaces
	-  fixing a bug in new subfield creation (mandatory & repeatable where not stored + no list for plugins)

CVSWeb URLs:
http://cvs.savannah.gnu.org/viewcvs/koha/admin/marc_subfields_structure.pl?cvsroot=koha&only_with_tag=rel_3_0&r1=1.38.2.1&r2=1.38.2.2

Patches:
Index: marc_subfields_structure.pl
===================================================================
RCS file: /sources/koha/koha/admin/Attic/marc_subfields_structure.pl,v
retrieving revision 1.38.2.1
retrieving revision 1.38.2.2
diff -u -b -r1.38.2.1 -r1.38.2.2
--- marc_subfields_structure.pl	1 Sep 2006 13:13:33 -0000	1.38.2.1
+++ marc_subfields_structure.pl	23 Nov 2006 09:06:31 -0000	1.38.2.2
@@ -237,10 +237,10 @@
 		$i++;
 	}
 	# add more_subfields empty lines for add if needed
-	for (my $i=1;$i<=$more_subfields;$i++) {
+    for (my $j=$i;$j<=$more_subfields+$i;$j++) {
 		my %row_data;  # get a fresh hash for the row data
 		$row_data{tab} = CGI::scrolling_list(-name=>'tab',
-					-id => "tab$i",
+                    -id => "tab$j",
 					-values=>['-1','0','1','2','3','4','5','6','7','8','9','10'],
 					-labels => {'-1' =>'ignore','0'=>'0','1'=>'1',
 									'2' =>'2','3'=>'3','4'=>'4',
@@ -256,29 +256,37 @@
 		$row_data{liblibrarian} = "";
 		$row_data{libopac} = "";
 		$row_data{seealso} = "";
+        $row_data{kohafield}= CGI::scrolling_list( -name=>'kohafield',
+                                -id => "kohafield$j",
+                                -values=> \@kohafields,
+                                -default=> "",
+                                -size=>1,
+                                -tabindex=>'',
+                                -multiple=>0,
+                                );
 		$row_data{hidden} = "";
-		$row_data{repeatable} = CGI::checkbox( -name=> 'repeatable',
-				-id => "repeatable$i",
+        $row_data{repeatable} = CGI::checkbox( -name=> "repeatable$j",
+                                -id => "repeatable$j",
 				-checked => '',
 				-value => 1,
 	 			-tabindex=>'',
 				-label => '');
-		$row_data{mandatory} = CGI::checkbox( -name=> 'mandatory',
-			-id => "mandatory$i",
+        $row_data{mandatory} = CGI::checkbox( -name=> "mandatory$j",
+                                -id => "mandatory$j",
 			-checked => '',
 			-value => 1,
  			-tabindex=>'',
 			-label => '');
-		$row_data{isurl} = CGI::checkbox(-name => 'isurl',
-			-id => "isurl$i",
+        $row_data{isurl} = CGI::checkbox(-name => "isurl$j",
+                            -id => "isurl$j",
 			-checked => '',
 			-value => 1,
  			-tabindex=>'',
 			-label => '');
-		$row_data{kohafield}= CGI::scrolling_list( -name=>'kohafield',
-					-id => "kohafield$i",
-					-values=> \@kohafields,
-					-default=> "",
+        $row_data{value_builder}  = CGI::scrolling_list(-name=>'value_builder',
+                                    -id=>'value_builder',
+                                    -values=> \@value_builder,
+                                    -default=>$data->{'value_builder'},
 					-size=>1,
  					-tabindex=>'',
 					-multiple=>0,
@@ -299,7 +307,7 @@
 					);
 		$row_data{link} = CGI::escapeHTML($data->{'link'});
 		$row_data{toggle} = $toggle;
-		$row_data{row} = $i;
+        $row_data{row} = $j;
 		push(@loop_data, \%row_data);
 	}
 	$template->param('use-heading-flags-p' => 1);





More information about the Koha-cvs mailing list