fix for bug 2577: Cannot delete patron in IE
[koha.git] / admin / marc_subfields_structure.pl
index 0a414e6..3c15291 100755 (executable)
@@ -126,6 +126,7 @@ if ( $op eq 'add_form' ) {
     }
     push( @authorised_values, "branches" );
     push( @authorised_values, "itemtypes" );
+    push( @authorised_values, "cn_source" );
 
     # build thesaurus categories list
     $sth2->finish;
@@ -197,7 +198,6 @@ if ( $op eq 'add_form' ) {
             },
             -default  => $data->{'tab'},
             -size     => 1,
-            -tabindex => '',
             -multiple => 0,
         );
         $row_data{tagsubfield} =
@@ -206,6 +206,7 @@ if ( $op eq 'add_form' ) {
           . $data->{'tagsubfield'}
           . "\" id=\"tagsubfield\" />";
         $row_data{subfieldcode} = $data->{'tagsubfield'} eq '@'?'_':$data->{'tagsubfield'};
+        $row_data{urisubfieldcode} = $row_data{subfieldcode} eq '%' ? 'pct' : $row_data{subfieldcode};
         $row_data{liblibrarian} = CGI::escapeHTML( $data->{'liblibrarian'} );
         $row_data{libopac}      = CGI::escapeHTML( $data->{'libopac'} );
         $row_data{seealso}      = CGI::escapeHTML( $data->{'seealso'} );
@@ -215,49 +216,43 @@ if ( $op eq 'add_form' ) {
             -values   => \@kohafields,
             -default  => "$data->{'kohafield'}",
             -size     => 1,
-            -tabindex => '',
             -multiple => 0,
         );
         $row_data{authorised_value} = CGI::scrolling_list(
-            -name     => 'authorised_value',
-            -id       => 'authorised_value',
+            -name     => "authorised_value",
+            -id       => "authorised_value$i",
             -values   => \@authorised_values,
             -default  => $data->{'authorised_value'},
             -size     => 1,
-            -tabindex => '',
             -multiple => 0,
         );
         $row_data{value_builder} = CGI::scrolling_list(
-            -name     => 'value_builder',
-            -id       => 'value_builder',
+            -name     => "value_builder",
+            -id       => "value_builder$i",
             -values   => \@value_builder,
             -default  => $data->{'value_builder'},
             -size     => 1,
-            -tabindex => '',
             -multiple => 0,
         );
         $row_data{authtypes} = CGI::scrolling_list(
-            -name     => 'authtypecode',
-            -id       => 'authtypecode',
+            -name     => "authtypecode",
+            -id       => "authtypecode$i",
             -values   => \@authtypes,
             -default  => $data->{'authtypecode'},
             -size     => 1,
-            -tabindex => '',
             -multiple => 0,
         );
         $row_data{repeatable} = CGI::checkbox(
             -name     => "repeatable$i",
             -checked  => $data->{'repeatable'} ? 'checked' : '',
             -value    => 1,
-            -tabindex => '',
             -label    => '',
             -id       => "repeatable$i"
         );
         $row_data{mandatory} = CGI::checkbox(
-            -name     => "mandatory$i",
+            -name     => "mandatory",
             -checked  => $data->{'mandatory'} ? 'checked' : '',
             -value    => 1,
-            -tabindex => '',
             -label    => '',
             -id       => "mandatory$i"
         );
@@ -267,7 +262,6 @@ if ( $op eq 'add_form' ) {
             -id       => "isurl$i",
             -checked  => $data->{'isurl'} ? 'checked' : '',
             -value    => 1,
-            -tabindex => '',
             -label    => ''
         );
         $row_data{row}    = $i;
@@ -304,7 +298,6 @@ if ( $op eq 'add_form' ) {
             },
             -default  => "",
             -size     => 1,
-            -tabindex => '',
             -multiple => 0,
         );
         $row_data{tagsubfield} =
@@ -320,7 +313,6 @@ if ( $op eq 'add_form' ) {
             -values   => \@kohafields,
             -default  => "",
             -size     => 1,
-            -tabindex => '',
             -multiple => 0,
         );
         $row_data{hidden}     = "";
@@ -329,7 +321,6 @@ if ( $op eq 'add_form' ) {
             -id       => "repeatable$j",
             -checked  => '',
             -value    => 1,
-            -tabindex => '',
             -label    => ''
         );
         $row_data{mandatory} = CGI::checkbox(
@@ -337,7 +328,6 @@ if ( $op eq 'add_form' ) {
             -id       => "mandatory$j",
             -checked  => '',
             -value    => 1,
-            -tabindex => '',
             -label    => ''
         );
         $row_data{isurl} = CGI::checkbox(
@@ -345,32 +335,28 @@ if ( $op eq 'add_form' ) {
             -id       => "isurl$j",
             -checked  => '',
             -value    => 1,
-            -tabindex => '',
             -label    => ''
         );
         $row_data{value_builder} = CGI::scrolling_list(
-            -name     => 'value_builder',
-            -id       => 'value_builder',
+            -name     => "value_builder",
+            -id       => "value_builder$j",
             -values   => \@value_builder,
             -default  => $data->{'value_builder'},
             -size     => 1,
-            -tabindex => '',
             -multiple => 0,
         );
         $row_data{authorised_value} = CGI::scrolling_list(
-            -name     => 'authorised_value',
-            -id       => 'authorised_value',
+            -name     => "authorised_value",
+            -id       => "authorised_value$j",
             -values   => \@authorised_values,
             -size     => 1,
-            -tabindex => '',
             -multiple => 0,
         );
         $row_data{authtypes} = CGI::scrolling_list(
-            -name     => 'authtypecode',
-            -id       => 'authtypecode',
+            -name     => "authtypecode",
+            -id       => "authtypecode$j",
             -values   => \@authtypes,
             -size     => 1,
-            -tabindex => '',
             -multiple => 0,
         );
         $row_data{link}   = CGI::escapeHTML( $data->{'link'} );
@@ -559,12 +545,12 @@ else {    # DEFAULT
     if ( $offset > 0 ) {
         my $prevpage = $offset - $pagesize;
         $template->param(
-            prev => "<a href=\"$script_name?offset=$prevpage\">" );
+            prev => "<a href=\"$script_name?offset=$prevpage\&tagfield=$tagfield\&frameworkcode=$frameworkcode \">" );
     }
     if ( $offset + $pagesize < $count ) {
         my $nextpage = $offset + $pagesize;
         $template->param(
-            next => "<a href=\"$script_name?offset=$nextpage\">" );
+            next => "<a href=\"$script_name?offset=$nextpage\&tagfield=$tagfield\&frameworkcode=$frameworkcode \">" );
     }
 }    #---- END $OP eq DEFAULT