Bug 40608: (follow-up) Add warning in about page
This patch adds a check in about.pl for when `NotifyPasswordChange` is enabled but no notices are present on the system. Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io> Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl> Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
This commit is contained in:
parent
f748205ad0
commit
8e05336a08
14
about.pl
14
about.pl
|
|
@ -49,6 +49,7 @@ use Koha::BiblioFrameworks;
|
|||
use Koha::Biblios;
|
||||
use Koha::Email;
|
||||
use Koha::I18N;
|
||||
use Koha::Notice::Templates;
|
||||
use Koha::Patron::Categories;
|
||||
use Koha::Patrons;
|
||||
use Koha::Caches;
|
||||
|
|
@ -588,6 +589,19 @@ if ( $tab eq 'sysinfo' ) {
|
|||
$template->param( warnDbRowFormat => C4::Installer->has_non_dynamic_row_format );
|
||||
}
|
||||
|
||||
# NotifyPasswordChange
|
||||
if ( C4::Context->preference('NotifyPasswordChange') ) {
|
||||
|
||||
$template->param( warnPassChangeNoticeMissing => 1 )
|
||||
unless Koha::Notice::Templates->find_effective_template(
|
||||
{
|
||||
module => 'members',
|
||||
code => 'PASSWORD_CHANGE',
|
||||
message_transport_type => 'email',
|
||||
}
|
||||
);
|
||||
}
|
||||
|
||||
$template->param(
|
||||
prefRequireChoosingExistingAuthority => $prefRequireChoosingExistingAuthority,
|
||||
prefAutoCreateAuthorities => $prefAutoCreateAuthorities,
|
||||
|
|
|
|||
|
|
@ -328,7 +328,7 @@
|
|||
[% SET warnMissingCompiledFiles = 1 %]
|
||||
[% END %]
|
||||
[% WRAPPER tab_panel tabname= "sysinfo" bt_active = 1 %]
|
||||
[% IF weasyprint_missing || warnPrefRequireChoosingExistingAuthority || warnPrefEasyAnalyticalRecords || warnPrefAnonymousPatronOPACPrivacy || warnPrefAnonymousPatronAnonSuggestions || warnPrefAnonymousPatronOPACPrivacy_PatronDoesNotExist || warnPrefAnonymousPatronAnonSuggestions_PatronDoesNotExist || warnPrefKohaAdminEmailAddress || warnPrefOpacHiddenItems || warnPrefPatronSelfRegistrationDefaultCategory || invalid_yesno.count || warnNoActiveCurrency || warnIsRootUser || xml_config_warnings.size || warnI18nMissing || 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 || elasticsearch_has_missing || warnMissingCompiledFiles || warnDbRowFormat %]
|
||||
[% IF weasyprint_missing || warnPrefRequireChoosingExistingAuthority || warnPrefEasyAnalyticalRecords || warnPrefAnonymousPatronOPACPrivacy || warnPrefAnonymousPatronAnonSuggestions || warnPrefAnonymousPatronOPACPrivacy_PatronDoesNotExist || warnPrefAnonymousPatronAnonSuggestions_PatronDoesNotExist || warnPrefKohaAdminEmailAddress || warnPrefOpacHiddenItems || warnPrefPatronSelfRegistrationDefaultCategory || invalid_yesno.count || warnNoActiveCurrency || warnIsRootUser || xml_config_warnings.size || warnI18nMissing || 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 || elasticsearch_has_missing || warnMissingCompiledFiles || warnDbRowFormat || warnPassChangeNoticeMissing %]
|
||||
[% IF ( warnDbRowFormat ) %]
|
||||
<h2>Database row format incorrect</h2>
|
||||
<p>Database tables with a row format other than 'DYNAMIC': [% warnDbRowFormat | html %]</p>
|
||||
|
|
@ -473,7 +473,7 @@
|
|||
Contact your system administrator.
|
||||
[% END # /IF warnConnectBroker %]
|
||||
|
||||
[% IF weasyprint_missing || warnPrefRequireChoosingExistingAuthority || warnPrefEasyAnalyticalRecords || warnPrefAnonymousPatronOPACPrivacy || warnPrefAnonymousPatronAnonSuggestions || warnPrefAnonymousPatronOPACPrivacy_PatronDoesNotExist || warnPrefAnonymousPatronAnonSuggestions_PatronDoesNotExist || warnPrefKohaAdminEmailAddress || warnPrefOpacHiddenItems || warnPrefPatronSelfRegistrationDefaultCategory || invalid_yesno.count || warnNoActiveCurrency || AutoSelfCheckPatronDoesNotHaveSelfCheckPerm || AutoSelfCheckPatronHasTooManyPerm || warnStatisticsFieldsError || warnNoTemplateCaching || warnILLConfiguration || warnXSLT || oauth2_missing_deps || bad_yaml_prefs || warnIssuingRules || config_bcrypt_settings_no_set || warnHiddenBiblionumbers.size || warnFastCataloging %]
|
||||
[% IF weasyprint_missing || warnPrefRequireChoosingExistingAuthority || warnPrefEasyAnalyticalRecords || warnPrefAnonymousPatronOPACPrivacy || warnPrefAnonymousPatronAnonSuggestions || warnPrefAnonymousPatronOPACPrivacy_PatronDoesNotExist || warnPrefAnonymousPatronAnonSuggestions_PatronDoesNotExist || warnPrefKohaAdminEmailAddress || warnPrefOpacHiddenItems || warnPrefPatronSelfRegistrationDefaultCategory || invalid_yesno.count || warnNoActiveCurrency || AutoSelfCheckPatronDoesNotHaveSelfCheckPerm || AutoSelfCheckPatronHasTooManyPerm || warnStatisticsFieldsError || warnNoTemplateCaching || warnILLConfiguration || warnXSLT || oauth2_missing_deps || bad_yaml_prefs || warnIssuingRules || config_bcrypt_settings_no_set || warnHiddenBiblionumbers.size || warnFastCataloging || warnPassChangeNoticeMissing %]
|
||||
<h2>Warnings regarding the system configuration</h2>
|
||||
<table>
|
||||
<caption>Preferences and parameters</caption>
|
||||
|
|
@ -592,6 +592,15 @@
|
|||
<td> The PO directory has not been found. See <a href="https://wiki.koha-community.org/wiki/Translation_files">the dedicated wiki page</a> for more information. </td>
|
||||
</tr>
|
||||
[% END %]
|
||||
[% IF warnPassChangeNoticeMissing %]
|
||||
<tr>
|
||||
<th scope="row"><strong>Warning</strong> </th>
|
||||
<td
|
||||
>System preference 'NotifyPasswordChange' is enabled, but the PASSWORD_CHANGE notice template is missing. Password changes will fail. Please create the PASSWORD_CHANGE notice template in
|
||||
<a href="/cgi-bin/koha/tools/letter.pl">Tools > Notices and slips</a>.</td
|
||||
>
|
||||
</tr>
|
||||
[% END %]
|
||||
[% IF warnILLConfiguration %]
|
||||
[% IF no_ill_backends %]
|
||||
<tr>
|
||||
|
|
|
|||
Loading…
Reference in New Issue