From 4a9be2cbe3da28bb73b1268f27d6ea0c7710f3fe Mon Sep 17 00:00:00 2001 From: Philip Orr Date: Tue, 25 Apr 2023 10:34:09 +0000 Subject: [PATCH] Bug 28315: Remove duplicate function definition This patch removes the unnecessary second definition of the JS function PopupMARCFieldDoc from addbiblio.tt. To test: 1. Apply the patch 2. Check that addbiblio.tt contains only one function definition for PopupMARCFieldDoc 3. Navigate to "Cataloging" -> "Add MARC record" 4. Check that after clicking on the question mark symbol next to any MARC field, the loc description of that MARC field is opened in a new tab Signed-off-by: Lucas Gass Signed-off-by: Nick Clemens Signed-off-by: Tomas Cohen Arazi (cherry picked from commit a2b880e57bb1ccd4b8270ec8bfdcdc86e18a2e48) Signed-off-by: Matt Blenkinsop --- .../prog/en/modules/cataloguing/addbiblio.tt | 14 -------------- 1 file changed, 14 deletions(-) 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 90733324f5..62a9fabf6e 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/modules/cataloguing/addbiblio.tt +++ b/koha-tmpl/intranet-tmpl/prog/en/modules/cataloguing/addbiblio.tt @@ -462,20 +462,6 @@ function PopupMARCFieldDoc(field) { } } - function PopupMARCFieldDoc(field) { - [% IF Koha.Preference('marcfielddocurl') %] - var docurl = "[% Koha.Preference('marcfielddocurl').replace('"','"') | html %]"; - docurl = docurl.replace("{MARC}", "[% marcflavour | html %]"); - docurl = docurl.replace("{FIELD}", ""+field); - docurl = docurl.replace("{LANG}", "[% lang | html %]"); - window.open(docurl); - [% ELSIF ( marcflavour == 'MARC21' ) %] - _MARC21FieldDoc(field); - [% ELSIF ( marcflavour == 'UNIMARC' ) %] - _UNIMARCFieldDoc(field); - [% END %] - } - function _MARC21FieldDoc(field) { if(field == 0) { window.open("http://www.loc.gov/marc/bibliographic/bdleader.html"); -- 2.39.5