From d29f39afea385dea34bab956b39c3cf5c78d1235 Mon Sep 17 00:00:00 2001 From: Owen Leonard Date: Fri, 2 Jan 2026 11:09:43 -0500 Subject: [PATCH] Bug 19838: (follow-up) Adapting to additional contents Also fixing enabling/disabling of library input Signed-off-by: David Nind --- Koha/AdditionalContents.pm | 2 +- .../en/includes/html-customization-help.inc | 2 ++ .../en/modules/tools/additional-contents.tt | 20 +++++++------------ 3 files changed, 10 insertions(+), 14 deletions(-) diff --git a/Koha/AdditionalContents.pm b/Koha/AdditionalContents.pm index 98a1b16219..775fb28fc0 100644 --- a/Koha/AdditionalContents.pm +++ b/Koha/AdditionalContents.pm @@ -170,7 +170,7 @@ sub get_html_customizations_options { 'OpacMaintenanceNotice', 'OPACResultsSidebar', 'OpacSuppressionMessage', 'SCOMainUserBlock', 'SelfCheckInMainUserBlock', 'SelfCheckHelpMessage', 'CatalogConcernHelp', 'CatalogConcernTemplate', 'CookieConsentBar', 'CookieConsentPopup', 'PatronSelfRegistrationAdditionalInstructions', - 'ILLModuleCopyrightClearance' + 'ILLModuleCopyrightClearance', 'SelfRegistrationInstructions' ]; } diff --git a/koha-tmpl/intranet-tmpl/prog/en/includes/html-customization-help.inc b/koha-tmpl/intranet-tmpl/prog/en/includes/html-customization-help.inc index 1373032296..eb5ba203d6 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/includes/html-customization-help.inc +++ b/koha-tmpl/intranet-tmpl/prog/en/includes/html-customization-help.inc @@ -60,6 +60,8 @@
Show this content on the self check-in screen.
+
Show this content above the OPAC self registration form. This cannot be added on a per-library basis, only for "All libraries."
+
Show this content on the acquisitions home page in the staff interface.
Show this content on the authorities home page in the staff interface.
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 8565762f7f..492f143d3e 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,15 +689,14 @@ $(".customization_note").hide(); $( "#" + location + "_notes" ).show(); } - function checkLang() { - if ( $('#lang').val().includes('SelfRegistrationInstructions_') ) { - $('#branch option[value=""]').prop('selected' , true); - $('#branch').prop('disabled' , true) + function checkLocation( location ) { + if ( location == "SelfRegistrationInstructions") { + $('#branchcode').val("").prop('disabled' , true) } else { - $('#branch').prop('disabled' , false) + $('#branchcode').prop('disabled' , false) } } - checkLang(); + checkLocation( $("#location").val() ); $(document).ready(function() { [% IF category == 'news' %] $("#add_additional_content").validate({ @@ -728,17 +727,12 @@ $("#location").on("change", function(){ showLocationNotes( $(this).val() ); - }); + checkLocation( $(this).val() ); + }).select2({ width: '50%' }); $("#submit_form").on("click",function(){ $("#add_additional_content").submit(); }); - - $("#location").select2({ width: '50%' }); - - $('#lang').change( function() { - checkLang(); - }); }); [% END %] -- 2.39.5