Bugzilla – Attachment 190857 Details for
Bug 19838
Add HTML customization for adding text to self-registration form
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 19838: Add customizable self registration instructions to Koha news
Bug-19838-Add-customizable-self-registration-instr.patch (text/plain), 3.56 KB, created by
David Nind
on 2026-01-03 03:28:29 UTC
(
hide
)
Description:
Bug 19838: Add customizable self registration instructions to Koha news
Filename:
MIME Type:
Creator:
David Nind
Created:
2026-01-03 03:28:29 UTC
Size:
3.56 KB
patch
obsolete
>From 39299cd59b82ab2f4357e4b6c82217aa6f793253 Mon Sep 17 00:00:00 2001 >From: Lucas Gass <lucas@bywatersolutions.com> >Date: Tue, 9 Feb 2021 21:11:32 +0000 >Subject: [PATCH] Bug 19838: Add customizable self registration instructions to > Koha news > >Test plan: >1. Apply patch >2. Go to Tools -> HTML customizations and create 'New entry' with a > dsiplay location of SelfRegistrationInstructions >3. On the OPAC go to the self registration page >4. Your new content should be there. >5. Go back to HTML customizations and edit your > SelfRegistrationInstructions entry, try to set the library to > something other than 'All libraries', you should not be able to. > SelfRegistrationInstructions cannot be branch specific. > >Signed-off-by: David Nind <david@davidnind.com> >--- > .../prog/en/modules/tools/additional-contents.tt | 14 +++++++++++++- > .../bootstrap/en/modules/opac-memberentry.tt | 5 +++++ > 2 files changed, 18 insertions(+), 1 deletion(-) > >diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/tools/additional-contents.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/tools/additional-contents.tt >index 68eea23180..8565762f7f 100644 >--- a/koha-tmpl/intranet-tmpl/prog/en/modules/tools/additional-contents.tt >+++ b/koha-tmpl/intranet-tmpl/prog/en/modules/tools/additional-contents.tt >@@ -689,7 +689,15 @@ > $(".customization_note").hide(); > $( "#" + location + "_notes" ).show(); > } >- >+ function checkLang() { >+ if ( $('#lang').val().includes('SelfRegistrationInstructions_') ) { >+ $('#branch option[value=""]').prop('selected' , true); >+ $('#branch').prop('disabled' , true) >+ } else { >+ $('#branch').prop('disabled' , false) >+ } >+ } >+ checkLang(); > $(document).ready(function() { > [% IF category == 'news' %] > $("#add_additional_content").validate({ >@@ -727,6 +735,10 @@ > }); > > $("#location").select2({ width: '50%' }); >+ >+ $('#lang').change( function() { >+ checkLang(); >+ }); > }); > </script> > [% END %] >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 b785e6ad2f..2776d48998 100644 >--- a/koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-memberentry.tt >+++ b/koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-memberentry.tt >@@ -11,6 +11,7 @@ > [% PROCESS 'html_helpers.inc' %] > [% SET OpacNav = AdditionalContents.get( location => "OpacNav", lang => lang, library => logged_in_user.branchcode || default_branch, blocktitle => 0 ) %] > [% SET OpacNavBottom = AdditionalContents.get( location => "OpacNavBottom", lang => lang, library => logged_in_user.branchcode || default_branch, blocktitle => 0 ) %] >+[% SET selfregistrationinstructions = AdditionalContents.get( location => "SelfRegistrationInstructions", lang => lang, library => branchcode ) %] > [% SET userupdateview = 1 %] > [% BLOCK streetnumber %] > [% UNLESS hidden.defined('streetnumber') %] >@@ -235,6 +236,10 @@ > > > [% END %] > >+ [% IF ( selfregistrationinstructions ) %] >+ [% PROCESS koha_news_block news => selfregistrationinstructions %] >+ [% END %] >+ > <form method="post" action="/cgi-bin/koha/opac-memberentry.pl" id="memberentry-form" autocomplete="off"> > [% INCLUDE 'csrf-token.inc' %] > >-- >2.39.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 19838
:
116618
|
190837
|
190838
| 190857 |
190858