From 3c88db75e30939cb7c369ca8a29b716e1fc22ff5 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 --- .../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 0000000..1c7bea5 --- /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 9514b1f..1822c7a 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 ef57d4a..f48c08c 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/modules/auth.tt +++ b/koha-tmpl/intranet-tmpl/prog/en/modules/auth.tt @@ -19,6 +19,7 @@

Koha

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