https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=39538
--- Comment #33 from Lisette Scheer <[email protected]> --- Created attachment 210532 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=210532&action=edit Bug 39538: (follow-up) Require CSS snippet content and remove translations CSS snippets could be saved with empty or whitespace-only content, which adds nothing to the page. They also showed a tab for each language, but only the default content of a snippet is used, so CSS entered in another language tab was saved and silently ignored. This patch: - Marks the content of a CSS snippet as required, and prevents saving when it is empty or only whitespace, both in the form and in tools/additional-contents.pl - Shows a single "Default" tab for CSS snippets, and only saves the default content. Translations saved before are removed the next time the snippet is saved News and HTML customizations are not changed. To test: 1. Go to Tools -> CSS snippets -> New CSS snippet 2. Only a "Default" tab is shown, and the content is marked as required 3. Enter a title and only spaces or line breaks as content, and save 4. The form is not submitted and "Enter some CSS before saving." is shown 5. Enter some CSS, save, and check it is applied to the staff interface 6. Edit the snippet: the title and CSS are filled in 7. Go to Tools -> News -> New entry, the language tabs are shown as before, and the content is still required 8. Go to Tools -> HTML customizations -> New entry, the language tabs are shown as before, and the content is not required 9. prove t/db_dependent/Koha/AdditionalContents.t \ t/db_dependent/Template/Plugin/AdditionalContents.t Co-Authored-By: Claude Opus 5.5 <[email protected]> -- You are receiving this mail because: You are watching all bug changes. _______________________________________________ Koha-bugs mailing list -- [email protected] To unsubscribe send an email to [email protected] website : http://www.koha-community.org/ git : http://git.koha-community.org/ bugs : http://bugs.koha-community.org/
