Bug 30364

Summary: If a tag, i.e. 500$a has a framework plugin, even though a multi-line html “textarea” is desired, as soon as the plugin is added it goes back to a single line text box.
Product: Koha Reporter: Courtenay Johnson <courtenay.johnson>
Component: CatalogingAssignee: Bugs List <koha-bugs>
Status: NEW --- QA Contact: Testopia <testopia>
Severity: enhancement    
Priority: P5 - low CC: m.de.rooy
Version: 21.05   
Hardware: All   
OS: Linux   
GIT URL: Change sponsored?: ---
Patch complexity: --- Documentation contact:
Documentation submission: Text to go in the release notes:
Version(s) released in:
Circulation function:
Attachments: patch to addbiblio.pl to permit multiline input when plugs present

Description Courtenay Johnson 2022-03-25 19:52:14 UTC
Created attachment 132263 [details]
patch to addbiblio.pl to permit multiline input when plugs present

If a tag, i.e. 500$a has a framework plugin, even though a multi-line html “textarea” is desired, as soon as the plugin is added, such as the example.pl, it goes back to a single line text box.

I wish to use the HTML textarea to allow multi-line input, and I wish to use a plugin to filter out undesirable (non-utf-8) characters and to convert Windows code set smart quotes into UTF-8 so they would not be lost.

Looking at the code, in addbiblio.pl, I see there is no provision for tags in the range 500 to 600 to use the textarea method for input when a plugin is used. 
I have made a change to the addbiblio.pl (starting at line 393) and the addbiblio.tt to add  another alternative to input_complex, and now have the plugin I wrote working, with subfields that are accepting multi-line input. In the addbiblio.tt at line 1063 I created a new mv.type of textarea_complex, so for multiline input with tags  within a suitable range with a plugin, so that this preserves the structure of the existing code. As part of my change  tag 650$a is now accepting multi-line input with \n accepted.

I am including a diff for the two changes done with version 21.05.03. 
This was originally done in 21.05.03 and I recently upgraded to 21.11.03 and see the same problem exists and the same solution was applied and appears to work.