Bug 35186 - Remove html tags from sample notices
Summary: Remove html tags from sample notices
Status: Pushed to oldstable
Alias: None
Product: Koha
Classification: Unclassified
Component: Notices (show other bugs)
Version: Main
Hardware: All All
: P5 - low trivial (vote)
Assignee: Katrin Fischer
QA Contact: Nick Clemens
URL:
Keywords:
Depends on:
Blocks: 34704
  Show dependency treegraph
 
Reported: 2023-10-29 15:26 UTC by Katrin Fischer
Modified: 2023-11-13 15:29 UTC (History)
3 users (show)

See Also:
Change sponsored?: ---
Patch complexity: Trivial patch
Documentation contact:
Documentation submission:
Text to go in the release notes:
This removes unnecessary <html></html> tags in two email notices: * PASSWORD_RESET * STAFF_PASSWORD_RESET These notices are only updated in new installations, for existing installation manually change the notices.
Version(s) released in:
23.11.00,23.05.06,22.11.12


Attachments
Bug 35186: Remove unnecessary html tags from PASSWORD notices (2.34 KB, patch)
2023-10-29 15:47 UTC, Katrin Fischer
Details | Diff | Splinter Review
Bug 35186: Remove unnecessary html tags from PASSWORD notices (2.39 KB, patch)
2023-10-29 23:10 UTC, David Nind
Details | Diff | Splinter Review
Bug 35186: Remove unnecessary html tags from PASSWORD notices (2.45 KB, patch)
2023-10-30 16:05 UTC, Nick Clemens
Details | Diff | Splinter Review

Note You need to log in before you can comment on or make changes to this bug.
Description Katrin Fischer 2023-10-29 15:26:36 UTC
HTML notices don't require that we explicitly add <html> tags.

We have 2 notices where these are included in the sample notices and should be removed:

PASSWORD_RESET
STAFF_PASSWORD_RESET
Comment 1 Katrin Fischer 2023-10-29 15:47:32 UTC
Created attachment 158048 [details] [review]
Bug 35186: Remove unnecessary html tags from PASSWORD notices

In HTML notices we don't need to explicitly use <html></html>.

This removes them from the 2 notices using them:
* PASSWORD_RESET
* STAFF_PASSWORD_RESET

To test:
* Apply patch
* Make sure your Koha can send email (set up SMTP server, KohaAdminLibraryAddress)
* Make sure your patron has an email set
* In patron account, use "More > Send password reset"
* Log out
* In the OPAC, request password reset ("forgot your password?")
* Verify both notices appear nicely formatted (line breaks, bold, etc.)
Comment 2 David Nind 2023-10-29 23:10:45 UTC
Created attachment 158054 [details] [review]
Bug 35186: Remove unnecessary html tags from PASSWORD notices

In HTML notices we don't need to explicitly use <html></html>.

This removes them from the 2 notices using them:
* PASSWORD_RESET
* STAFF_PASSWORD_RESET

To test:
* Apply patch
* Make sure your Koha can send email (set up SMTP server, KohaAdminLibraryAddress)
* Make sure your patron has an email set
* In patron account, use "More > Send password reset"
* Log out
* In the OPAC, request password reset ("forgot your password?")
* Verify both notices appear nicely formatted (line breaks, bold, etc.)

Signed-off-by: David Nind <david@davidnind.com>
Comment 3 Katrin Fischer 2023-10-29 23:11:27 UTC
Thanks David :)
Comment 4 David Nind 2023-10-29 23:21:58 UTC
Testing notes (using KTD):

1. After applying the patch, ran reset_all, so that the notices are updated.

2. Needed to set the OpacResetPassword and KohaAdminEmailAddress system preference. OpacResetPassword required for Patron account > More > Send password reset option to appear.

3. To test sending emails using a Google account:
   3.1 Set up an App password in your Google Account
   3.2 Edit /etc/koha/sites/kohadev/koha-conf.xml file and add this configuration near the end (where <user_name> = your Google email address; <password> = your APP password, not your Google account password):

 <smtp_server>
    <host>smtp.gmail.com</host>
    <port>587</port>
    <timeout>5</timeout>
    <ssl_mode>STARTTLS</ssl_mode>
    <user_name>GOOGLEACCOUNTUSER</user_name>
    <password>GOOGLEAPPPASSWORD</password>
    <debug>1</debug>
 </smtp_server>
Comment 5 Nick Clemens 2023-10-30 16:05:58 UTC
Created attachment 158079 [details] [review]
Bug 35186: Remove unnecessary html tags from PASSWORD notices

In HTML notices we don't need to explicitly use <html></html>.

This removes them from the 2 notices using them:
* PASSWORD_RESET
* STAFF_PASSWORD_RESET

To test:
* Apply patch
* Make sure your Koha can send email (set up SMTP server, KohaAdminLibraryAddress)
* Make sure your patron has an email set
* In patron account, use "More > Send password reset"
* Log out
* In the OPAC, request password reset ("forgot your password?")
* Verify both notices appear nicely formatted (line breaks, bold, etc.)

Signed-off-by: David Nind <david@davidnind.com>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Comment 6 Tomás Cohen Arazi 2023-10-31 14:06:53 UTC
Pushed to master for 23.11.

Nice work everyone, thanks!
Comment 7 Fridolin Somers 2023-11-08 08:25:33 UTC
Pushed to 23.05.x for 23.05.06
Comment 8 Matt Blenkinsop 2023-11-13 15:29:25 UTC
Nice work everyone!

Pushed to oldstable for 22.11.x