Bugzilla – Attachment 12983 Details for
Bug 7455
Authority subfields are cloned in the wrong field
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 7455: Authority subfields are cloned in the wrong field (follow-up)
Bug-7455-Authority-subfields-are-cloned-in-the-wro.patch (text/plain), 2.95 KB, created by
Jared Camins-Esakov
on 2012-10-21 14:44:15 UTC
(
hide
)
Description:
Bug 7455: Authority subfields are cloned in the wrong field (follow-up)
Filename:
MIME Type:
Creator:
Jared Camins-Esakov
Created:
2012-10-21 14:44:15 UTC
Size:
2.95 KB
patch
obsolete
>From 17cfb2c203675851572a73715058b276cc66e371 Mon Sep 17 00:00:00 2001 >From: Fridolyn SOMERS <fridolyn.somers@biblibre.com> >Date: Tue, 28 Aug 2012 14:55:01 +0200 >Subject: [PATCH] Bug 7455: Authority subfields are cloned in the wrong field > (follow-up) > >Signed-off-by: Jared Camins-Esakov <jcamins@cpbibliography.com> >--- > authorities/authorities.pl | 16 +++++++++------- > koha-tmpl/intranet-tmpl/prog/en/js/cataloging.js | 4 ++++ > 2 files changed, 13 insertions(+), 7 deletions(-) > >diff --git a/authorities/authorities.pl b/authorities/authorities.pl >index b63f7e4..6ddb337 100755 >--- a/authorities/authorities.pl >+++ b/authorities/authorities.pl >@@ -152,9 +152,15 @@ sub create_input { > $value =~ s/DD/$day/g; > } > my $dbh = C4::Context->dbh; >+ >+ # map '@' as "subfield" label for fixed fields >+ # to something that's allowed in a div id. >+ my $id_subfield = $subfield; >+ $id_subfield = "00" if $id_subfield eq "@"; >+ > my %subfield_data = ( > tag => $tag, >- subfield => $subfield, >+ subfield => $id_subfield, > marc_lib => substr( $tagslib->{$tag}->{$subfield}->{lib}, 0, 22 ), > marc_lib_plain => $tagslib->{$tag}->{$subfield}->{lib}, > tag_mandatory => $tagslib->{$tag}->{mandatory}, >@@ -162,14 +168,10 @@ sub create_input { > repeatable => $tagslib->{$tag}->{$subfield}->{repeatable}, > kohafield => $tagslib->{$tag}->{$subfield}->{kohafield}, > index => $index_tag, >- id => "tag_".$tag."_subfield_".$subfield."_".$index_tag."_".$index_subfield, >+ id => "tag_".$tag."_subfield_".$id_subfield."_".$index_tag."_".$index_subfield, > value => $value, >+ random => CreateKey(), > ); >- if($subfield eq '@'){ >- $subfield_data{id} = "tag_".$tag."_subfield_00_".$index_tag."_".$index_subfield; >- } else { >- $subfield_data{id} = "tag_".$tag."_subfield_".$subfield."_".$index_tag."_".$index_subfield; >- } > > if(exists $mandatory_z3950->{$tag.$subfield}){ > $subfield_data{z3950_mandatory} = $mandatory_z3950->{$tag.$subfield}; >diff --git a/koha-tmpl/intranet-tmpl/prog/en/js/cataloging.js b/koha-tmpl/intranet-tmpl/prog/en/js/cataloging.js >index 1baf794..b9e0f23 100644 >--- a/koha-tmpl/intranet-tmpl/prog/en/js/cataloging.js >+++ b/koha-tmpl/intranet-tmpl/prog/en/js/cataloging.js >@@ -211,6 +211,10 @@ function CloneField(index, hideMarc, advancedMARCEditor) { > > } else { // it's a indicator div > if(divs[i].getAttribute('id').match(/^div_indicator/)){ >+ >+ // setting a new id for the indicator div >+ divs[i].setAttribute('id',divs[i].getAttribute('id')+new_key); >+ > var inputs = divs[i].getElementsByTagName('input'); > inputs[0].setAttribute('id',inputs[0].getAttribute('id')+new_key); > inputs[1].setAttribute('id',inputs[1].getAttribute('id')+new_key); >-- >1.7.9.5
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
|
Splinter Review
Attachments on
bug 7455
:
7257
|
7258
|
7259
|
10884
|
11032
|
11338
|
11850
|
11866
|
11908
|
11909
|
12216
|
12313
|
12314
|
12315
|
12546
|
12827
|
12828
|
12982
|
12983
|
12984
|
12985