Created attachment 5401 [details] image
some libraries may want to change the default text regarding the assigning of patron cards and passwords, depending on a library's policy adding a syspref would allow them to do this...
Created attachment 25714 [details] [review] Add the OpacBelowLoginBox preference. We did a patch for our Koha instance which does what you are looking for. This patch adds the OpacBelowLoginBox which lets you set the message to show under the login form in the OPAC. If the preference is empty, the default, translatable text is used instead of the custom preference value. Sponsored-by: CCSR ( http://www.ccsr.qc.ca )
Comment on attachment 25714 [details] [review] Add the OpacBelowLoginBox preference. Review of attachment 25714 [details] [review]: ----------------------------------------------------------------- ::: installer/data/mysql/updatedatabase.pl @@ +7825,5 @@ > } > > +$DBversion = "XXX"; > +if ( CheckVersion($DBversion) ) { > + $dbh->do("INSERT INTO `systempreferences` (variable,value,options,explanation,type) VALUES ('OpacBelowLoginBox','', '30|10','Texte à afficher en dessous de la boite de login','Textarea');"); I believe the text should be in English. ::: koha-tmpl/opac-tmpl/prog/en/modules/opac-auth.tt @@ +87,5 @@ > <input type="submit" value="Log In" class="submit" /> > <div id="nologininstructions"> > + [% IF ( opacbelowloginbox ) %] > + [% opacbelowloginbox %] > + [% IF PatronSelfRegistration && PatronSelfRegistrationDefaultCategory %]<span id="registrationinstructions"><a href="/cgi-bin/koha/opac-memberentry.pl">Register here</a></span>[% END %] Kind of strange to have the self-registration stuff in both IF and ELSE clauses. Put it after the IF/ELSE. ::: koha-tmpl/opac-tmpl/prog/en/modules/opac-main.tt @@ +62,5 @@ > > </fieldset></fieldset> > </form> > + <br style="clear:both" /> > + <div> div's should have id's or classes or some way of being able to affect them via Javascript, in my opinion.
Created attachment 25938 [details] [review] New version of the patch. Rebase on current master and fixed. Here is a new version of the patch, fixing comment 1 and 3 of your code review. For the self-registration, the text is duplicated because the old version includes "or" and a period, which is not needed for the custom text since the link cannot be included inside of it.
Sorry. I missed mentioning that you forgot to update installer/data/mysql/sysprefs.sql as well.
Comment on attachment 25938 [details] [review] New version of the patch. Rebase on current master and fixed. Review of attachment 25938 [details] [review]: ----------------------------------------------------------------- ::: koha-tmpl/opac-tmpl/prog/en/modules/opac-main.tt @@ +64,5 @@ > </form> > + <br style="clear:both" /> > + <div id="opacbelowloginbox"> > + [% opacbelowloginbox %] > + </div> I like the id, but I'm not sure I see a need for this functionality. ::: opac/opac-main.pl @@ +56,4 @@ > $template->param( > koha_news => $all_koha_news, > koha_news_count => $koha_news_count, > + opacbelowloginbox => C4::Context->preference("OpacBelowLoginBox"), So you really want something under the login area in the right side of the OPAC screen? I think it is ugly.
If you do want something under the login area displayed on the main screen, perhaps it would be shorter or different than the other login area reached by clicking 'Log in to your account'?
Comment on attachment 25938 [details] [review] New version of the patch. Rebase on current master and fixed. Review of attachment 25938 [details] [review]: ----------------------------------------------------------------- ::: koha-tmpl/opac-tmpl/prog/en/modules/opac-main.tt @@ +64,5 @@ > </form> > + <br style="clear:both" /> > + <div id="opacbelowloginbox"> > + [% opacbelowloginbox %] > + </div> With PatronSelfRegistration turned on, it gets uglier. The div is in the wrong place. It should be above line 61, I think.
Created attachment 26465 [details] [review] New version of the patch, removing code in opac-main and adding missing syspref line. Since we can use the existing opacnavright preference to get the same text in opac-main, I removed the opacBelowLoginBox text from this page.
Comment on attachment 26465 [details] [review] New version of the patch, removing code in opac-main and adding missing syspref line. Review of attachment 26465 [details] [review]: ----------------------------------------------------------------- ::: installer/data/mysql/sysprefs.sql @@ +427,5 @@ > ('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'), > +('OpacBelowLoginBox','', '30|10','HTML to show under the login box','Textarea') Please try to keep this alphabetical.
Also, bootstrap. You only tweaked prog opactheme.
We have the same local enhancement. This would be another one that could benefit from using a WYSIWYG editor on the syspref.
Created attachment 26774 [details] [review] Bug 6864 - Corrected alphabetical order of sysprefs.sql Original patch lazily added OpacBelowLoginBox to the end. This puts it in proper alphabetical order location.
Created attachment 26776 [details] [review] Bug 6864 - Added missing bootstrap template changes. The original patch only touches the prog template. This updates the bootstrap theme in a corresponding manner.
Created attachment 26779 [details] [review] Bug 6864 - Corrected alphabetical order of sysprefs.sql Original patch lazily added OpacBelowLoginBox to the end. This puts it in proper alphabetical order location. TEST PLAN --------- 1) Apply only the first patch 2) Run the Koha QA Test tool -- FAILED on the system preferences SQL file. 3) Apply only the second patch (this one) 4) Run the Koha QA Test tool -- Everything OK now.
Created attachment 26780 [details] [review] [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>
Created attachment 26781 [details] [review] Bug 6864 - Corrected alphabetical order of sysprefs.sql Original patch lazily added OpacBelowLoginBox to the end. This puts it in proper alphabetical order location. TEST PLAN --------- 1) Apply only the first patch 2) Run the Koha QA Test tool -- FAILED on the system preferences SQL file. 3) Apply only the second patch (this one) 4) Run the Koha QA Test tool -- Everything OK now.
Created attachment 26782 [details] [review] Bug 6864 - Added missing bootstrap template changes. The original patch only touches the prog template. This updates the bootstrap theme in a corresponding manner.
Created attachment 26783 [details] [review] Bug 6864 - Bootstrap OpacBelowLoginBox This adds OpacBelowLoginBox to bootstrap. It also corrects the placement of setting the opacbelowloginbox template parameter, so that it will work under bootstrap.
Created attachment 26784 [details] [review] Bug 6864 - Bootstrap OpacBelowLoginBox This adds OpacBelowLoginBox to bootstrap. It also corrects the placement of setting the opacbelowloginbox template parameter, so that it will work under bootstrap. TEST PLAN --------- Run steps similar to the first patch except with opacthemese set to 'bootstrap'.
A couple of comments: The system preference name "OpacBelowLoginBox" refers to where it goes rather than what it is. It would be a lot better to have something descriptive, like "OpacLoginHelp" or something like that. The change to the bootstrap theme modifies a different page than the change to the prog theme. I think the change to the prog theme is in the right place: On the full-page login screen where there is currently text about logging in, opac-auth.tt. (It might be good to link to this page directly from the bootstrap theme's login modal so that patrons can read the help text if they want to?)
I think this may be a duplicate of 10951
10951 is only partially what this was supposed to cover, as far as I can tell. This should be reworked to use the system preference in 10951.
For me, this is a complete duplicate of Bug 10951 *** This bug has been marked as a duplicate of bug 10951 ***