From c7bde81dd8444dfe099d66d89731ef281744341f Mon Sep 17 00:00:00 2001 From: Nick Clemens Date: Wed, 21 Feb 2018 04:56:23 +0000 Subject: [PATCH] Bug 20291: Add a StaffLoginInstructions preference for adding text to staff client login To test: 1 - Apply patches 2 - Upgrade database 3 - Check the staff client login page, should be no change 4 - Add something to the preferene 5 - It should appear on the login page Signed-off-by: Owen Leonard Signed-off-by: Katrin Fischer Signed-off-by: Jonathan Druart --- .../bug_20291_add_StaffLoginInstructions_preference.perl | 8 ++++++++ .../prog/en/modules/admin/preferences/staff_client.pref | 5 +++++ koha-tmpl/intranet-tmpl/prog/en/modules/auth.tt | 1 + 3 files changed, 14 insertions(+) create mode 100644 installer/data/mysql/atomicupdate/bug_20291_add_StaffLoginInstructions_preference.perl diff --git a/installer/data/mysql/atomicupdate/bug_20291_add_StaffLoginInstructions_preference.perl b/installer/data/mysql/atomicupdate/bug_20291_add_StaffLoginInstructions_preference.perl new file mode 100644 index 0000000000..1c7bea532b --- /dev/null +++ b/installer/data/mysql/atomicupdate/bug_20291_add_StaffLoginInstructions_preference.perl @@ -0,0 +1,8 @@ +$DBversion = 'XXX'; # will be replaced by the RM +if( CheckVersion( $DBversion ) ) { + $dbh->do("INSERT IGNORE INTO systempreferences (variable,value,explanation,options,type) VALUES ('StaffLoginInstructions','','HTML to go into the login box for the staff client',NULL,'Free')"); + + # Always end with this (adjust the bug info) + SetVersion( $DBversion ); + print "Upgrade to $DBversion done (Bug 20291 - Add StaffLoginInstructions system preference)\n"; +} diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/admin/preferences/staff_client.pref b/koha-tmpl/intranet-tmpl/prog/en/modules/admin/preferences/staff_client.pref index 9514b1f124..1822c7ab24 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/modules/admin/preferences/staff_client.pref +++ b/koha-tmpl/intranet-tmpl/prog/en/modules/admin/preferences/staff_client.pref @@ -107,6 +107,11 @@ Staff Client: - pref: IntranetReportsHomeHTML type: htmlarea class: code + - + - "Show the following HTML on the staff client login page" + - pref: StaffLoginInstructions + type: htmlarea + class: code Options: - - pref: viewMARC diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/auth.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/auth.tt index 8d5158666e..d4a2b4e840 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/modules/auth.tt +++ b/koha-tmpl/intranet-tmpl/prog/en/modules/auth.tt @@ -18,6 +18,7 @@

Koha

+[% IF (Koha.Preference('StaffLoginInstructions')) %]
[% Koha.Preference('StaffLoginInstructions') %]
[% END %] [% IF ( nopermission ) %]
Error: -- 2.39.5