From 134f50e6d2d383678e7e20c9551e589d54d23ff3 Mon Sep 17 00:00:00 2001 From: Paul POULAIN Date: Tue, 30 Oct 2007 13:02:41 -0500 Subject: [PATCH] #1492 MARC subfields structure: can't switch to tab with label "@" replacing the @ by _ in the template, wich is valid. I also have changed a little the behaviour : the New button appears only for >010 fields (<10 have only the data, no real subfield) Signed-off-by: Chris Cormack Signed-off-by: Joshua Ferraro --- admin/marc_subfields_structure.pl | 3 ++- .../en/modules/admin/marc_subfields_structure.tmpl | 10 ++++++++-- 2 files changed, 10 insertions(+), 3 deletions(-) diff --git a/admin/marc_subfields_structure.pl b/admin/marc_subfields_structure.pl index c40f5f0e88..db35334be0 100755 --- a/admin/marc_subfields_structure.pl +++ b/admin/marc_subfields_structure.pl @@ -205,7 +205,7 @@ if ( $op eq 'add_form' ) { . "{'tagsubfield'} . "\" id=\"tagsubfield\" />"; - $row_data{subfieldcode} = $data->{'tagsubfield'}; + $row_data{subfieldcode} = $data->{'tagsubfield'} eq '@'?'_':$data->{'tagsubfield'}; $row_data{liblibrarian} = CGI::escapeHTML( $data->{'liblibrarian'} ); $row_data{libopac} = CGI::escapeHTML( $data->{'libopac'} ); $row_data{seealso} = CGI::escapeHTML( $data->{'seealso'} ); @@ -416,6 +416,7 @@ elsif ( $op eq 'add_validate' ) { my $tagfield = $input->param('tagfield'); my $tagsubfield = $tagsubfield[$i]; $tagsubfield = "@" unless $tagsubfield ne ''; + $tagsubfield = "@" if $tagsubfield eq '_'; my $liblibrarian = $liblibrarian[$i]; my $libopac = $libopac[$i]; my $repeatable = $input->param("repeatable$i") ? 1 : 0; diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/admin/marc_subfields_structure.tmpl b/koha-tmpl/intranet-tmpl/prog/en/modules/admin/marc_subfields_structure.tmpl index d401ed5b75..0b7ce2c80e 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/modules/admin/marc_subfields_structure.tmpl +++ b/koha-tmpl/intranet-tmpl/prog/en/modules/admin/marc_subfields_structure.tmpl @@ -53,9 +53,15 @@ function displayMoreConstraint(numlayer){