Bugzilla – Attachment 26780 Details for
Bug 6864
add a syspref to allow custom text for OPAC user/pass information
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
[SIGNED OFF] Add OpacBelowLoginBox preference to add custom text below the login box.
SIGNED-OFF-Add-OpacBelowLoginBox-preference-to-add.patch (text/plain), 7.58 KB, created by
Mark Tompsett
on 2014-04-03 02:25:33 UTC
(
hide
)
Description:
[SIGNED OFF] Add OpacBelowLoginBox preference to add custom text below the login box.
Filename:
MIME Type:
Creator:
Mark Tompsett
Created:
2014-04-03 02:25:33 UTC
Size:
7.58 KB
patch
obsolete
>From 7f8309f5a1fb7050e52f75594ff1a12e73a29e06 Mon Sep 17 00:00:00 2001 >From: =?UTF-8?q?Fr=C3=A9d=C3=A9rick?= <frederick.capovilla@libeo.com> >Date: Wed, 19 Mar 2014 14:40:38 -0400 >Subject: [PATCH] [SIGNED OFF] Add OpacBelowLoginBox preference to add custom > text below the login box. > >This patch file adds the ability to customize the text below >the login area which appears when 'Log in to your account' >in clicked in the top right of the OPAC. > >TEST PLAN >---------- > 0) Back up your data if you care about it. > 1) Open a staff client in your browser. > 2) Make sure the OPAC system preference opacthemes is set > to 'prog'. > 3) Make sure the OPAC system preference opacuserlogin is > set to 'Allow'. >NOTE: Required to make the 'Log in to your account' in the top > left of OPAC appear. > 4) Make sure the OPAC system preference PatronSelfRegistration > is set to 'Allow'. > 5) Make sure the OPAC system preference > PatronSelfRegistrationDefaultCategory is set to a value > of patron category that exists (eg. PT is a sample one) >NOTE: These are required to make the 'Register here' links > appear after the text. > 6) Open the OPAC in another tab. > 7) Click the 'Log in to your account' link. > 8) Note the text below the login area. > 9) Apply the patch and run an update. > (git bz apply 6864 -- interactive just this one) > (./installer/data/mysql/updatedatabase.pl) >10) Refresh the OPAC page. > -- the text should be identical. >11) In the staff client, modify the OPAC system preference > OpacBelowLoginText to have some text, and save. >12) Refresh the OPAC page. > -- the text should reflect what was entered in the > OpacBelowLoginText system preference. >13) Open your mysql. >14) Drop and recreate the koha database. >15) Do a web install by going to the staff client URL. >16) Log in as the system user. >17) Confirm the OPAC system preference OpacBelowLoginBox > exists. >18) Modify its value (blank, non-blank) and confirm that > the OPAC page reflects the default message or custom > message as expected each reload. >19) Run the Koha QA Test Tool > -- This will FAIL on the system preferences SQL file. > The next patch by me, Mark Tompsett, will fix it. > >Signed-off-by: Mark Tompsett <mtompset@hotmail.com> >--- > C4/Auth.pm | 1 + > installer/data/mysql/sysprefs.sql | 3 ++- > installer/data/mysql/updatedatabase.pl | 8 ++++++++ > .../prog/en/modules/admin/preferences/opac.pref | 5 +++++ > koha-tmpl/opac-tmpl/prog/en/modules/opac-auth.tt | 9 +++++++-- > 5 files changed, 23 insertions(+), 3 deletions(-) > >diff --git a/C4/Auth.pm b/C4/Auth.pm >index 44edf67..d2a8a19 100644 >--- a/C4/Auth.pm >+++ b/C4/Auth.pm >@@ -1064,6 +1064,7 @@ sub checkauth { > IndependentBranches=> C4::Context->preference("IndependentBranches"), > AutoLocation => C4::Context->preference("AutoLocation"), > wrongip => $info{'wrongip'}, >+ opacbelowloginbox => C4::Context->preference("OpacBelowLoginBox"), > PatronSelfRegistration => C4::Context->preference("PatronSelfRegistration"), > PatronSelfRegistrationDefaultCategory => C4::Context->preference("PatronSelfRegistrationDefaultCategory"), > persona => C4::Context->preference("Persona"), >diff --git a/installer/data/mysql/sysprefs.sql b/installer/data/mysql/sysprefs.sql >index 661910b..27b83d2 100644 >--- a/installer/data/mysql/sysprefs.sql >+++ b/installer/data/mysql/sysprefs.sql >@@ -427,5 +427,6 @@ INSERT INTO systempreferences ( `variable`, `value`, `options`, `explanation`, ` > ('XSLTResultsDisplay','default','','Enable XSL stylesheet control over results page display on intranet','Free'), > ('yuipath','local','local|http://yui.yahooapis.com/2.5.1/build','Insert the path to YUI libraries, choose local if you use koha offline','Choice'), > ('z3950AuthorAuthFields','701,702,700',NULL,'Define the MARC biblio fields for Personal Name Authorities to fill biblio.author','free'), >-('z3950NormalizeAuthor','0','','If ON, Personal Name Authorities will replace authors in biblio.author','YesNo') >+('z3950NormalizeAuthor','0','','If ON, Personal Name Authorities will replace authors in biblio.author','YesNo'), >+('OpacBelowLoginBox','', '30|10','HTML to show under the login box','Textarea') > ; >diff --git a/installer/data/mysql/updatedatabase.pl b/installer/data/mysql/updatedatabase.pl >index 062ecc1..a949136 100755 >--- a/installer/data/mysql/updatedatabase.pl >+++ b/installer/data/mysql/updatedatabase.pl >@@ -8083,6 +8083,14 @@ if ( CheckVersion($DBversion) ) { > SetVersion($DBversion); > } > >+$DBversion = "XXX"; >+if ( CheckVersion($DBversion) ) { >+ $dbh->do("INSERT INTO `systempreferences` (variable,value,options,explanation,type) VALUES ('OpacBelowLoginBox','', '30|10','HTML to show under the login box','Textarea');"); >+ print "Upgrade to $DBversion done (Add OpacBelowLoginBox preference)\n"; >+ SetVersion($DBversion); >+} >+ >+ > =head1 FUNCTIONS > > =head2 TableExists($table) >diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/admin/preferences/opac.pref b/koha-tmpl/intranet-tmpl/prog/en/modules/admin/preferences/opac.pref >index d541440..415e4e1 100644 >--- a/koha-tmpl/intranet-tmpl/prog/en/modules/admin/preferences/opac.pref >+++ b/koha-tmpl/intranet-tmpl/prog/en/modules/admin/preferences/opac.pref >@@ -225,6 +225,11 @@ OPAC: > type: textarea > class: code > - >+ - "Include the following HTML under the login box in the OPAC." >+ - pref: OpacBelowLoginBox >+ type: textarea >+ class: code >+ - > - 'Include a "More Searches" box on the detail pages of items on the OPAC, with the following HTML (leave blank to disable):' > - '<br />Note: The placeholders {BIBLIONUMBER}, {CONTROLNUMBER}, {TITLE}, {ISBN}, {ISSN} and {AUTHOR} will be replaced with information from the displayed record.' > - pref: OPACSearchForTitleIn >diff --git a/koha-tmpl/opac-tmpl/prog/en/modules/opac-auth.tt b/koha-tmpl/opac-tmpl/prog/en/modules/opac-auth.tt >index 7b8b8f9..b3685c4 100644 >--- a/koha-tmpl/opac-tmpl/prog/en/modules/opac-auth.tt >+++ b/koha-tmpl/opac-tmpl/prog/en/modules/opac-auth.tt >@@ -86,8 +86,13 @@ please choose against which one you would like to authenticate: </p> > > <input type="submit" value="Log In" class="submit" /> > <div id="nologininstructions"> >- <h5>Don't have a password yet?</h5><p> 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.</p> >- <h5>Don't have a library card?</h5><p> If you don't have a library card, stop by your local library to sign up[% IF PatronSelfRegistration && PatronSelfRegistrationDefaultCategory %]<span id="registrationinstructions"> or <a href="/cgi-bin/koha/opac-memberentry.pl">register here</a></span>[% END %]. </p> >+ [% IF ( opacbelowloginbox ) %] >+ [% opacbelowloginbox %] >+ [% IF PatronSelfRegistration && PatronSelfRegistrationDefaultCategory %]<span id="registrationinstructions"><a href="/cgi-bin/koha/opac-memberentry.pl">Register here</a></span>[% END %] >+ [% ELSE %] >+ <h5>Don't have a password yet?</h5><p> 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.</p> >+ <h5>Don't have a library card?</h5><p> If you don't have a library card, stop by your local library to sign up[% IF PatronSelfRegistration && PatronSelfRegistrationDefaultCategory %]<span id="registrationinstructions"> or <a href="/cgi-bin/koha/opac-memberentry.pl">register here</a></span>[% END %]. </p> >+ [% END %] > </div> > </form> > >-- >1.7.9.5
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
|
Splinter Review
Attachments on
bug 6864
:
5401
|
25714
|
25938
|
26465
|
26774
|
26776
|
26779
| 26780 |
26781
|
26782
|
26783
|
26784