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 <lucas@bywatersolutions.com>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
This commit is contained in:
Philip Orr 2023-04-25 10:34:09 +00:00 committed by Tomas Cohen Arazi
parent 5771e6f463
commit a2b880e57b
Signed by: tomascohen
GPG key ID: 0A272EA1B2F3C15F

View file

@ -462,20 +462,6 @@ function PopupMARCFieldDoc(field) {
} }
} }
function PopupMARCFieldDoc(field) {
[% IF Koha.Preference('marcfielddocurl') %]
var docurl = "[% Koha.Preference('marcfielddocurl').replace('"','&quot;') | 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) { function _MARC21FieldDoc(field) {
if(field == 0) { if(field == 0) {
window.open("http://www.loc.gov/marc/bibliographic/bdleader.html"); window.open("http://www.loc.gov/marc/bibliographic/bdleader.html");