https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=42284
--- Comment #15 from Jonathan Druart <[email protected]> --- Created attachment 198795 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=198795&action=edit Bug 42284: (follow-up) Fix important_fields push and id concatenation The BIG_LOOP rewrite introduced two regressions in the mandatory / important field collector at the top of addbiblio.tt: - `important_fields.push([ tag: ..., id: ..., ... ])` wraps the object in brackets instead of braces. `[a: 1]` is not a valid array literal, so the parser aborts the whole script tag and AreFieldsNotOk / PopupZ3950 never run for any record whose framework marks fields as "important". - The `id` interpolation joins index and random with a literal `$` (`"[% index %]$[% random %]"`), but the DOM ids rendered elsewhere in the template (and looked up by AreFieldsNotOk via `divid = "tag_" + tag + "_" + id`) concatenate them with no separator. Use `{...}` for important_fields and drop the `$` so the collector shape and ids match the rest of the template. To test: - Open addbiblio.pl for a framework that has mandatory and important fields (e.g. default MARC21). - Submit a new record with mandatory subfields empty: the error panel lists them and focuses the first empty input. - Submit with only important subfields empty: the warning panel (not blocking) lists them under "The following important subfields aren't filled". - Browser console has no SyntaxError on page load. Signed-off-by: Paul Derscheid <[email protected]> -- You are receiving this mail because: You are watching all bug changes. _______________________________________________ Koha-bugs mailing list [email protected] https://lists.koha-community.org/cgi-bin/mailman/listinfo/koha-bugs website : http://www.koha-community.org/ git : http://git.koha-community.org/ bugs : http://bugs.koha-community.org/
