]> git.koha-community.org Git - koha.git/commit
Bug 11584: Introduce UseWYSIWYGinSystemPreferences syspref
authorDavid Cook <dcook@prosentient.com.au>
Tue, 14 Jul 2015 07:02:17 +0000 (17:02 +1000)
committerTomas Cohen Arazi <tomascohen@theke.io>
Fri, 28 Aug 2015 13:29:39 +0000 (10:29 -0300)
commitacc8de8214c6f8c342eb170c9ddd2be63c16354b
tree53f363e26fcb3011c0d01765d3a868cbb5474e5f
parenta5beeb365e21e8417b456f013b4bcdf3e21b1aa3
Bug 11584: Introduce UseWYSIWYGinSystemPreferences syspref

This patch adds a system preference "UseWYSIWYGinSystemPreferences" to the Staff Client tab.

By default, it is off, which means that the TinyMCE WYSIWYG editor won't be shown for system
preferences with a type of "htmlarea".

However, when it's on, it will show the editor for "Local Use" preferences with a "htmlarea"
type, and for other system preferences in the "Opac", "Circulation", and "Staff Client" tabs,
which I have re-assigned. (Basically, I grepped for HTML and changed the type for all
the system preferences I found except for "IntranetNav", "OpacCustomSearch", and "OPACSearchForTitleIn",
as a WYSIWYG editor would potentially break the output for these system preferences or
add no value to them...)

_TEST PLAN_

0) Run `perl installer/data/mysql/updatedatabase.pl` after setting your environmental variables
1) Check the Opac tab to make sure that the WYSIWYG is nowhere to be seen
2) Change the "UseWYSIWYGinSystemPreferences" preference in "Staff Client" to "Show"
3) Refresh the Opac tab and notice that many system preferences now have a WYSIWYG editor

4) Try typing some text into these fields
5) Note that it gets marked as "modified"
6) Save the preference, and refresh the page
7) Note that the content has been saved
8) Take a look at how it's rendered on the actual webpage!

Signed-off-by: Martin Persson <xarragon@gmail.com>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
installer/data/mysql/atomicupdate/bug_11584-add_UseWYSIWYGinSystemPreferences_syspref.sql [new file with mode: 0644]
installer/data/mysql/sysprefs.sql
koha-tmpl/intranet-tmpl/prog/en/modules/admin/preferences.tt
koha-tmpl/intranet-tmpl/prog/en/modules/admin/preferences/circulation.pref
koha-tmpl/intranet-tmpl/prog/en/modules/admin/preferences/opac.pref
koha-tmpl/intranet-tmpl/prog/en/modules/admin/preferences/staff_client.pref
koha-tmpl/intranet-tmpl/prog/en/modules/admin/systempreferences.tt