Bugzilla – Attachment 12545 Details for
Bug 4381
systempreference hide_marc = ON results in erroneous behaviour of repeatable fields and subfields
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Proposed patch
0001-Bug-4381-syspref-hide_marc-ON-results-in-erroneous-b.patch (text/plain), 2.92 KB, created by
Fridolin Somers
on 2012-09-27 08:26:54 UTC
(
hide
)
Description:
Proposed patch
Filename:
MIME Type:
Creator:
Fridolin Somers
Created:
2012-09-27 08:26:54 UTC
Size:
2.92 KB
patch
obsolete
>From 0e8f685e37c45632c1ed3298b9609c623dca0c37 Mon Sep 17 00:00:00 2001 >From: Fridolyn SOMERS <fridolyn.somers@biblibre.com> >Date: Thu, 27 Sep 2012 10:07:52 +0200 >Subject: [PATCH] Bug 4381: syspref hide_marc ON results in erroneous > behaviour of repeatable fields > >--- > .../prog/en/modules/authorities/authorities.tt | 15 +++++++-------- > .../prog/en/modules/cataloguing/addbiblio.tt | 15 +++++++-------- > 2 files changed, 14 insertions(+), 16 deletions(-) > >diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/authorities/authorities.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/authorities/authorities.tt >index d0c4329..2b065f4 100644 >--- a/koha-tmpl/intranet-tmpl/prog/en/modules/authorities/authorities.tt >+++ b/koha-tmpl/intranet-tmpl/prog/en/modules/authorities/authorities.tt >@@ -192,14 +192,13 @@ function CloneField(index) { > > var divs = clone.getElementsByTagName('div'); > >- [% UNLESS ( hide_marc ) %] // No indicator if hide_marc >- // setting a new name for the new indicator >- for(var i=0; i < 2; i++) { >- var indicator = clone.getElementsByTagName('input')[i]; >- indicator.setAttribute('name',indicator.getAttribute('name')+new_key); >- } >- [% END %] >- >+ // setting a new name for the new indicator >+ // if hide_marc, indicator are hidden inputs >+ for(var i=0; i < 2; i++) { >+ var indicator = clone.getElementsByTagName('input')[i]; >+ indicator.setAttribute('name',indicator.getAttribute('name')+new_key); >+ } >+ > // settings all subfields > for(var i=0,divslen = divs.length ; i<divslen ; i++){ // foreach div > if(divs[i].getAttribute("name") == 'line'){ // if it s a subfield >diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/cataloguing/addbiblio.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/cataloguing/addbiblio.tt >index f934fbe..2a3a685 100644 >--- a/koha-tmpl/intranet-tmpl/prog/en/modules/cataloguing/addbiblio.tt >+++ b/koha-tmpl/intranet-tmpl/prog/en/modules/cataloguing/addbiblio.tt >@@ -326,14 +326,13 @@ function CloneField(index) { > > var divs = clone.getElementsByTagName('div'); > >- [% UNLESS ( hide_marc ) %] // No indicator if hide_marc >- // setting a new name for the new indicator >- for(var i=0; i < 2; i++) { >- var indicator = clone.getElementsByTagName('input')[i]; >- indicator.setAttribute('name',indicator.getAttribute('name')+new_key); >- } >- [% END %] >- >+ // setting a new name for the new indicator >+ // if hide_marc, indicator are hidden inputs >+ for(var i=0; i < 2; i++) { >+ var indicator = clone.getElementsByTagName('input')[i]; >+ indicator.setAttribute('name',indicator.getAttribute('name')+new_key); >+ } >+ > // settings all subfields > for(var i=0,divslen = divs.length ; i<divslen ; i++){ // foreach div > if(divs[i].getAttribute("id").match(/^subfield/)){ // if it s a subfield >-- >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 4381
: 12545