Bugzilla – Attachment 116382 Details for
Bug 27634
Turn off patron self-registration if no default category is set
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 27634: Add a warning to the about page if PatronSelfRegistrationDefaultCategory not set
Bug-27634-Add-a-warning-to-the-about-page-if-Patro.patch (text/plain), 5.62 KB, created by
Jonathan Druart
on 2021-02-05 10:47:39 UTC
(
hide
)
Description:
Bug 27634: Add a warning to the about page if PatronSelfRegistrationDefaultCategory not set
Filename:
MIME Type:
Creator:
Jonathan Druart
Created:
2021-02-05 10:47:39 UTC
Size:
5.62 KB
patch
obsolete
>From 8f782f5c587bc60a240ef95aeec88551647dee05 Mon Sep 17 00:00:00 2001 >From: Jonathan Druart <jonathan.druart@bugs.koha-community.org> >Date: Fri, 5 Feb 2021 11:16:23 +0100 >Subject: [PATCH] Bug 27634: Add a warning to the about page if > PatronSelfRegistrationDefaultCategory not set > >--- > about.pl | 5 +++++ > koha-tmpl/intranet-tmpl/prog/en/modules/about.tt | 8 ++++++-- > 2 files changed, 11 insertions(+), 2 deletions(-) > >diff --git a/about.pl b/about.pl >index 50952166f0..ce6880c5f3 100755 >--- a/about.pl >+++ b/about.pl >@@ -412,6 +412,11 @@ if ( C4::Context->preference('EnablePayPalOpacPayments') ) { > $template->param( paypal_enabled => 1 ); > } > >+if ( C4::Context->preference('PatronSelfRegistration') ) { >+ $template->param( warnPrefPatronSelfRegistrationDefaultCategory => 1 ) >+ unless Koha::Patron::Categories->find(C4::Context->preference('PatronSelfRegistrationDefaultCategory')); >+} >+ > # Test YAML system preferences > # FIXME: This is list of current YAML formatted prefs, should by type of preference > my @yaml_prefs = ( >diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/about.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/about.tt >index a1ef6a8bb7..ada288df5c 100644 >--- a/koha-tmpl/intranet-tmpl/prog/en/modules/about.tt >+++ b/koha-tmpl/intranet-tmpl/prog/en/modules/about.tt >@@ -198,7 +198,7 @@ > </div> > > <div id="sysinfo"> >- [% IF warnPrefBiblioAddsAuthorities || warnPrefEasyAnalyticalRecords || warnPrefAnonymousPatronOPACPrivacy || warnPrefAnonymousPatronAnonSuggestions || warnPrefAnonymousPatronOPACPrivacy_PatronDoesNotExist || warnPrefAnonymousPatronAnonSuggestions_PatronDoesNotExist || warnPrefKohaAdminEmailAddress || warnNoActiveCurrency || warnIsRootUser || xml_config_warnings.size || AutoSelfCheckPatronDoesNotHaveSelfCheckPerm || AutoSelfCheckPatronHasTooManyPerm || warnStatisticsFieldsError || warnNoTemplateCaching || warnILLConfiguration || has_ai_issues || oauth2_missing_deps || bad_yaml_prefs || warnRelationships || log4perl_errors || config_bcrypt_settings_no_set || warnHiddenBiblionumbers.size || warnConnectBroker %] >+ [% IF warnPrefBiblioAddsAuthorities || warnPrefEasyAnalyticalRecords || warnPrefAnonymousPatronOPACPrivacy || warnPrefAnonymousPatronAnonSuggestions || warnPrefAnonymousPatronOPACPrivacy_PatronDoesNotExist || warnPrefAnonymousPatronAnonSuggestions_PatronDoesNotExist || warnPrefKohaAdminEmailAddress || warnPrefPatronSelfRegistrationDefaultCategory || warnNoActiveCurrency || warnIsRootUser || xml_config_warnings.size || AutoSelfCheckPatronDoesNotHaveSelfCheckPerm || AutoSelfCheckPatronHasTooManyPerm || warnStatisticsFieldsError || warnNoTemplateCaching || warnILLConfiguration || has_ai_issues || oauth2_missing_deps || bad_yaml_prefs || warnRelationships || log4perl_errors || config_bcrypt_settings_no_set || warnHiddenBiblionumbers.size || warnConnectBroker %] > [% IF (warnIsRootUser) %] > <h2>Warning regarding current user</h2> > <p>You are logged in as the database administrative user. This is not recommended because some parts of Koha will not function as expected when using this account.</p> >@@ -282,7 +282,7 @@ > Contact your system administrator. > [% END %] > >- [% IF warnPrefBiblioAddsAuthorities || warnPrefEasyAnalyticalRecords || warnPrefAnonymousPatronOPACPrivacy || warnPrefAnonymousPatronAnonSuggestions || warnPrefAnonymousPatronOPACPrivacy_PatronDoesNotExist || warnPrefAnonymousPatronAnonSuggestions_PatronDoesNotExist || warnPrefKohaAdminEmailAddress || warnNoActiveCurrency || AutoSelfCheckPatronDoesNotHaveSelfCheckPerm || AutoSelfCheckPatronHasTooManyPerm || warnStatisticsFieldsError || warnNoTemplateCaching || warnILLConfiguration || oauth2_missing_deps || bad_yaml_prefs || warnIssuingRules || config_bcrypt_settings_no_set || warnHiddenBiblionumbers.size || paypal_enabled %] >+ [% IF warnPrefBiblioAddsAuthorities || warnPrefEasyAnalyticalRecords || warnPrefAnonymousPatronOPACPrivacy || warnPrefAnonymousPatronAnonSuggestions || warnPrefAnonymousPatronOPACPrivacy_PatronDoesNotExist || warnPrefAnonymousPatronAnonSuggestions_PatronDoesNotExist || warnPrefKohaAdminEmailAddress || warnPrefPatronSelfRegistrationDefaultCategory || warnNoActiveCurrency || AutoSelfCheckPatronDoesNotHaveSelfCheckPerm || AutoSelfCheckPatronHasTooManyPerm || warnStatisticsFieldsError || warnNoTemplateCaching || warnILLConfiguration || oauth2_missing_deps || bad_yaml_prefs || warnIssuingRules || config_bcrypt_settings_no_set || warnHiddenBiblionumbers.size || paypal_enabled %] > <h2>Warnings regarding the system configuration</h2> > <table> > <caption>Preferences and parameters</caption> >@@ -307,6 +307,10 @@ > [% IF warnPrefKohaAdminEmailAddress %] > <tr><th scope="row"><strong>Warning</strong> </th><td>System preference 'KohaAdminEmailAddress' does not contain a valid email address. Emails will not be sent.</td></tr> > [% END %] >+ [% IF warnPrefPatronSelfRegistrationDefaultCategory %] >+ <tr><th scope="row"><strong>Warning</strong> </th><td>System preference 'PatronSelfRegistration' is set but 'PatronSelfRegistrationDefaultCategory' does not contain a valid patron category code. Patron self-registration is disabled.</td></tr> >+ [% END %] >+ > [% IF warnNoActiveCurrency %] > <tr><th scope="row"><strong>Warning</strong> </th><td>No active currency is defined. Please go to <a href="/cgi-bin/koha/admin/currency.pl">Administration > Currencies and exchange rates</a> and mark one currency as active.</td></tr> > [% END %] >-- >2.20.1
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 27634
:
116378
|
116379
|
116380
|
116381
|
116382
|
116383
|
116491
|
145599
|
145600
|
145601
|
145602
|
145603
|
145604
|
145605
|
145922
|
147531
|
147532
|
147533
|
147534
|
147535
|
147536
|
147537
|
149746
|
149747
|
149748
|
149896
|
149897
|
149898
|
149899
|
149900
|
149901
|
149902
|
150083
|
150084
|
150085
|
150086
|
150087
|
150088
|
150089
|
150090
|
151046
|
151047
|
151048
|
151049
|
155863
|
155864
|
155865
|
155866
|
155867
|
155868
|
155869
|
155870
|
156203