[Koha-patches] [PATCH] (bug #3057) fix the subfield edition

Nahuel ANGELINETTI nahuel.angelinetti at biblibre.com
Wed Mar 25 13:55:16 CET 2009


this patch modify the generation of inputs, and field "name" value of input fields.
---
 admin/marc_subfields_structure.pl |   22 +++++++++++-----------
 1 files changed, 11 insertions(+), 11 deletions(-)

diff --git a/admin/marc_subfields_structure.pl b/admin/marc_subfields_structure.pl
index 3c15291..1c96e32 100755
--- a/admin/marc_subfields_structure.pl
+++ b/admin/marc_subfields_structure.pl
@@ -178,7 +178,7 @@ if ( $op eq 'add_form' ) {
         }
         $row_data{defaultvalue} = $data->{defaultvalue};
         $row_data{tab} = CGI::scrolling_list(
-            -name   => 'tab',
+            -name   => 'tab$i',
             -id     => "tab$i",
             -values =>
               [ '-1', '0', '1', '2', '3', '4', '5', '6', '7', '8', '9', '10' ],
@@ -211,7 +211,7 @@ if ( $op eq 'add_form' ) {
         $row_data{libopac}      = CGI::escapeHTML( $data->{'libopac'} );
         $row_data{seealso}      = CGI::escapeHTML( $data->{'seealso'} );
         $row_data{kohafield}    = CGI::scrolling_list(
-            -name     => "kohafield",
+            -name     => "kohafield$i",
             -id       => "kohafield$i",
             -values   => \@kohafields,
             -default  => "$data->{'kohafield'}",
@@ -219,7 +219,7 @@ if ( $op eq 'add_form' ) {
             -multiple => 0,
         );
         $row_data{authorised_value} = CGI::scrolling_list(
-            -name     => "authorised_value",
+            -name     => "authorised_value$i",
             -id       => "authorised_value$i",
             -values   => \@authorised_values,
             -default  => $data->{'authorised_value'},
@@ -227,7 +227,7 @@ if ( $op eq 'add_form' ) {
             -multiple => 0,
         );
         $row_data{value_builder} = CGI::scrolling_list(
-            -name     => "value_builder",
+            -name     => "value_builder$i",
             -id       => "value_builder$i",
             -values   => \@value_builder,
             -default  => $data->{'value_builder'},
@@ -235,7 +235,7 @@ if ( $op eq 'add_form' ) {
             -multiple => 0,
         );
         $row_data{authtypes} = CGI::scrolling_list(
-            -name     => "authtypecode",
+            -name     => "authtypecode$i",
             -id       => "authtypecode$i",
             -values   => \@authtypes,
             -default  => $data->{'authtypecode'},
@@ -250,7 +250,7 @@ if ( $op eq 'add_form' ) {
             -id       => "repeatable$i"
         );
         $row_data{mandatory} = CGI::checkbox(
-            -name     => "mandatory",
+            -name     => "mandatory$i",
             -checked  => $data->{'mandatory'} ? 'checked' : '',
             -value    => 1,
             -label    => '',
@@ -278,7 +278,7 @@ if ( $op eq 'add_form' ) {
         $row_data{'subfieldcode'} = '';
 
         $row_data{tab} = CGI::scrolling_list(
-            -name   => 'tab',
+            -name   => 'tab$j',
             -id     => "tab$j",
             -values =>
               [ '-1', '0', '1', '2', '3', '4', '5', '6', '7', '8', '9', '10' ],
@@ -308,7 +308,7 @@ if ( $op eq 'add_form' ) {
         $row_data{libopac}      = "";
         $row_data{seealso}      = "";
         $row_data{kohafield}    = CGI::scrolling_list(
-            -name     => 'kohafield',
+            -name     => 'kohafield$j',
             -id       => "kohafield$j",
             -values   => \@kohafields,
             -default  => "",
@@ -338,7 +338,7 @@ if ( $op eq 'add_form' ) {
             -label    => ''
         );
         $row_data{value_builder} = CGI::scrolling_list(
-            -name     => "value_builder",
+            -name     => "value_builder$j",
             -id       => "value_builder$j",
             -values   => \@value_builder,
             -default  => $data->{'value_builder'},
@@ -346,14 +346,14 @@ if ( $op eq 'add_form' ) {
             -multiple => 0,
         );
         $row_data{authorised_value} = CGI::scrolling_list(
-            -name     => "authorised_value",
+            -name     => "authorised_value$j",
             -id       => "authorised_value$j",
             -values   => \@authorised_values,
             -size     => 1,
             -multiple => 0,
         );
         $row_data{authtypes} = CGI::scrolling_list(
-            -name     => "authtypecode",
+            -name     => "authtypecode$j",
             -id       => "authtypecode$j",
             -values   => \@authtypes,
             -size     => 1,
-- 
1.5.6.3




More information about the Koha-patches mailing list