Bugzilla – Attachment 105126 Details for
Bug 25100
Add ability to add custom text to top of the Self registration Form
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 25100: Add sys pref OPACSelfRegistrationHeader
Bug-25100-Add-sys-pref-OPACSelfRegistrationHeader.patch (text/plain), 5.57 KB, created by
Lucas Gass (lukeg)
on 2020-05-19 22:34:18 UTC
(
hide
)
Description:
Bug 25100: Add sys pref OPACSelfRegistrationHeader
Filename:
MIME Type:
Creator:
Lucas Gass (lukeg)
Created:
2020-05-19 22:34:18 UTC
Size:
5.57 KB
patch
obsolete
>From da20d7456bf6abe5caebd787f17ac15589d3cff9 Mon Sep 17 00:00:00 2001 >From: Lucas Gass <lucas@bywatersolutions.com> >Date: Tue, 19 May 2020 22:03:41 +0000 >Subject: [PATCH] Bug 25100: Add sys pref OPACSelfRegistrationHeader > >This patch adds a system prefernce called OPACSelfRegistrationHeader which allows librarians to add HTML above the self registration form >TO TEST: >1. Apply patch and updatedatabase >2. Make sure self registration is turned on. >3. Search for the new system preference 'OPACSelfRegistrationHeader'. >4. Add some HTML to the field like <h1>TEST</h1> >5. Go to the self registration page and confirm you can see your HTML. >6. This HTML should not effect the OPAC patron modification page, go there and make sure this is the case. >--- > .../bug_23420_add_OPACSelfRegistrationHeader_syspref.perl | 7 +++++++ > installer/data/mysql/sysprefs.sql | 1 + > .../intranet-tmpl/prog/en/modules/admin/preferences/opac.pref | 6 ++++++ > koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-memberentry.tt | 6 +++++- > 4 files changed, 19 insertions(+), 1 deletion(-) > create mode 100644 installer/data/mysql/atomicupdate/bug_23420_add_OPACSelfRegistrationHeader_syspref.perl > >diff --git a/installer/data/mysql/atomicupdate/bug_23420_add_OPACSelfRegistrationHeader_syspref.perl b/installer/data/mysql/atomicupdate/bug_23420_add_OPACSelfRegistrationHeader_syspref.perl >new file mode 100644 >index 0000000000..14f57ac9d2 >--- /dev/null >+++ b/installer/data/mysql/atomicupdate/bug_23420_add_OPACSelfRegistrationHeader_syspref.perl >@@ -0,0 +1,7 @@ >+$DBversion = 'XXX'; # will be replaced by the RM >+if( CheckVersion( $DBversion ) ) { >+ $dbh->do( "INSERT INTO systempreferences (variable,value,explanation,options,type) VALUES ('OPACSelfRegistrationHeader', '', 'Insert HTML above the self registration form', '70|10', 'Textarea')"); >+ >+ # Always end with this (adjust the bug info) >+ NewVersion( $DBversion, 25100, "Add OPACSelfRegistrationHeader system preference"); >+} >diff --git a/installer/data/mysql/sysprefs.sql b/installer/data/mysql/sysprefs.sql >index 58bd459e94..49e53639a9 100644 >--- a/installer/data/mysql/sysprefs.sql >+++ b/installer/data/mysql/sysprefs.sql >@@ -434,6 +434,7 @@ INSERT INTO systempreferences ( `variable`, `value`, `options`, `explanation`, ` > ('OPACResultsLibrary', 'homebranch', 'homebranch|holdingbranch', 'Defines whether the OPAC displays the holding or home branch in search results when using XSLT', 'Choice'), > ('OPACResultsSidebar','','70|10','Define HTML to be included on the search results page, underneath the facets sidebar','Textarea'), > ('OPACSearchForTitleIn','<li><a href=\"https://worldcat.org/search?q={TITLE}\" target=\"_blank\">Other Libraries (WorldCat)</a></li>\n<li><a href=\"https://scholar.google.com/scholar?q={TITLE}\" target=\"_blank\">Other Databases (Google Scholar)</a></li>\n<li><a href=\"https://www.bookfinder.com/search/?author={AUTHOR}&title={TITLE}&st=xl&ac=qr\" target=\"_blank\">Online Stores (Bookfinder.com)</a></li>\n<li><a href=\"https://openlibrary.org/search?author=({AUTHOR})&title=({TITLE})\" target=\"_blank\">Open Library (openlibrary.org)</a></li>','70|10','Enter the HTML that will appear in the \'Search for this title in\' box on the detail page in the OPAC. Enter {TITLE}, {AUTHOR}, or {ISBN} in place of their respective variables in the URL. Leave blank to disable \'More Searches\' menu.','Textarea'), >+('OPACSelfRegistrationHeader','','70|10','Use HTML tags to add content above the self registration form','Textarea'), > ('OpacSeparateHoldings','0',NULL,'Separate current branch holdings from other holdings (OPAC)','YesNo'), > ('OpacSeparateHoldingsBranch','homebranch','homebranch|holdingbranch','Branch used to separate holdings (OPAC)','Choice'), > ('opacSerialDefaultTab','subscriptions','holdings|serialcollection|subscriptions','Define the default tab for serials in OPAC.','Choice'), >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 7169962c84..2e3a997af7 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 >@@ -342,6 +342,12 @@ OPAC: > holdingbranch: Holding library > - "is the default sort field for the holdings table" > - >+ - "Show the following HTML above the OPAC self registration form:" >+ - pref: OPACSelfRegistrationHeader >+ type: textarea >+ syntax: text/html >+ class: code >+ - > - pref: OpacSuggestionManagedBy > choices: > yes: Show >diff --git a/koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-memberentry.tt b/koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-memberentry.tt >index 35af40224f..27bd3d66e2 100644 >--- a/koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-memberentry.tt >+++ b/koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-memberentry.tt >@@ -59,7 +59,11 @@ > [% ELSE %] > <div id="add-account"> > [% END %] >- >+ [% IF Koha.Preference( 'OPACSelfRegistrationHeader' ) && action != 'edit' %] >+ <div id="selfregistrationheader"> >+ [% Koha.Preference( 'OPACSelfRegistrationHeader' ) | $raw %] >+ </div> >+ [% END %] > [% IF action == 'edit' %] > [% UNLESS OPACPatronDetails %] > <div class="alert alert-info">To make changes to your record please contact the library.</div> >-- >2.11.0
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 25100
:
105126
|
105234