From 444bdcc2a50c64037c0f463200683009d8ae0b6e Mon Sep 17 00:00:00 2001 From: Oleg Vasylenko Date: Tue, 24 Jan 2017 17:58:39 +0200 Subject: [PATCH] Bug 17780 - When choose an author in authority results new window shows a blank screen Select2 (Bug 13501) introduced divs and inputs that broke some assumptions about the expected HTML structure. This patch checks if input has name attribute, because some inputs in Select2 have not. To test: Try to add info from the authorities to field that has subfield with Select2 (subfield with authorised values on Koha 16.11+) Signed-off-by: Josef Moravec Signed-off-by: Jonathan Druart --- .../prog/en/modules/authorities/blinddetail-biblio-search.tt | 1 + 1 file changed, 1 insertion(+) diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/authorities/blinddetail-biblio-search.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/authorities/blinddetail-biblio-search.tt index c95a29b0d9..da9ac248e2 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/modules/authorities/blinddetail-biblio-search.tt +++ b/koha-tmpl/intranet-tmpl/prog/en/modules/authorities/blinddetail-biblio-search.tt @@ -90,6 +90,7 @@ var subfields = field_start.getElementsByTagName('input'); var re = /^tag_\d*_code_/; for(var i=0, len = subfields.length ; i< len ; i++) { // browse all subfields + if(subfields[i].hasAttribute('name') == 0 ) {continue; } if(subfields[i].getAttribute('name').match(re)){ // it s a subfield var code = subfields[i]; // code is the first input var subfield = subfields[i+1]; // subfield the second -- 2.39.5