@@ -, +, @@ On a failed login, the default message is harcorded into opac-auth.tt. It would be preferable to allow for a preference to override that message (for example: ...Please bring an ID to t The changes modify -opac-auth.tt to allow for custom value -admin/preferences/opac.pref to add it to the preferences with a description -C4/Auth.pm for the loading of the preference -sysprefs.sql -updatedatabase.pl TESTING 1) in OPAC, logged out, try login in by entering no or wrong credentials. Acknowledge the "Don't have a p 2) Apply the patch 3) Regression Test: Redo step 1. Same (default) message should appear. 4) Log in to intranet, - select NoLoginInstructions in system preferences. - Enter new (xml) message. Possible:
If you don\'t have a password yet, stop by the circulation desk the next time you\'re in the library. We\'ll happily set one up for you.
If you don\'t have a library card, stop by your local library to sign up.
', '60|10', 'Instructions when a person is not connected', 'Textarea'), ('NotesBlacklist','',NULL,'List of notes fields that should not appear in the title notes/description separator of details','free'), ('NoticeCSS','',NULL,'Notices CSS url.','free'), ('NotifyBorrowerDeparture','30',NULL,'Define number of days before expiry where circulation is warned about patron account expiry','Integer'), --- a/installer/data/mysql/updatedatabase.pl +++ a/installer/data/mysql/updatedatabase.pl @@ -7743,6 +7743,13 @@ if(CheckVersion($DBversion)) { SetVersion($DBversion); } +$DBversion ="3.13.00.XXX"; +if ( CheckVersion($DBversion) ) { + $dbh->do("INSERT IGNORE INTO systempreferences (variable,value,options,explanation,type) VALUES ('NoLoginInstructions', 'If you don''t have a password yet, stop by the circulation desk the next time you''re in the library. We''ll happily set one up for you.
If you don''t have a library card, stop by your local library to sign up.
', '60|10', 'Instructions when a person is not connected', 'Textarea')"); + print "Upgrade to $DBversion done (Bug 10951: Add NoLoginInstructions pref)\n"; + SetVersion($DBversion); +} + =head1 FUNCTIONS =head2 TableExists($table) --- a/koha-tmpl/intranet-tmpl/prog/en/modules/admin/preferences/opac.pref +++ a/koha-tmpl/intranet-tmpl/prog/en/modules/admin/preferences/opac.pref @@ -280,6 +280,11 @@ OPAC: homebranch: 'home library' holdingbranch: 'holding library' - "is the logged in user's library. The second tab will contain all other items." + - + - "Show the following HTML when a person is not connected:" + - pref: NoLoginInstructions + type: textarea + class: code Features: - - pref: opacuserlogin --- a/koha-tmpl/opac-tmpl/prog/en/modules/opac-auth.tt +++ a/koha-tmpl/opac-tmpl/prog/en/modules/opac-auth.tt @@ -86,8 +86,14 @@ please choose against which one you would like to authenticate:If you don't have a password yet, stop by the circulation desk the next time you're in the library. We'll happily set one up for you.
-If you don't have a library card, stop by your local library to sign up[% IF PatronSelfRegistration && PatronSelfRegistrationDefaultCategory %] or register here[% END %].
+[% IF NoLoginInstructions %] [% NoLoginInstructions %] +[% ELSE %] +If you don't have a password yet, stop by the circulation desk the next time you're in the library. We'll happily set one up for you.
+