Bugzilla – Attachment 194272 Details for
Bug 4858
Ability to Charge for Print Notices
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 4858: Refine OPAC print notice UX for patrons without an email address
2c96178.patch (text/plain), 11.50 KB, created by
Martin Renvoize (ashimema)
on 2026-03-02 09:28:01 UTC
(
hide
)
Description:
Bug 4858: Refine OPAC print notice UX for patrons without an email address
Filename:
MIME Type:
Creator:
Martin Renvoize (ashimema)
Created:
2026-03-02 09:28:01 UTC
Size:
11.50 KB
patch
obsolete
>From 2c96178684cba0bf118388eafa2b737c6b0ae1b6 Mon Sep 17 00:00:00 2001 >From: Martin Renvoize <martin.renvoize@openfifth.co.uk> >Date: Mon, 2 Mar 2026 09:07:49 +0000 >Subject: [PATCH] Bug 4858: Refine OPAC print notice UX for patrons without an > email address > >When a patron has no email address on file: >- Print transport checkboxes are forced checked and disabled (print is the > system fallback when no email exists); a hidden input ensures the print > preference is submitted despite the checkbox being disabled. >- Email transport checkboxes are disabled (there is no address to send to). > >Merge the two separate alert blocks (warning before the form, info after the >table) into a single alert at the top of the page. Use alert-warning styling >when the patron has no email address (charges will apply, no choice) and >alert-info styling when they do have an email (charges are avoidable by >selecting email delivery). > >Also move the has_print_transport calculation before the form so the >unified alert can use it. > >Sponsored-by: OpenFifth <https://openfifth.co.uk\> >Signed-off-by: Jackie Usher <jackie.usher@westsussex.gov.uk> >--- > .../bootstrap/en/modules/opac-messaging.tt | 94 +++++++++++-------- > 1 file changed, 57 insertions(+), 37 deletions(-) > >diff --git a/koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-messaging.tt b/koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-messaging.tt >index 5bb3499c809..a3cbadfa746 100644 >--- a/koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-messaging.tt >+++ b/koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-messaging.tt >@@ -44,17 +44,39 @@ > ><p><strong>Settings updated</strong></p></div > > > [% END %] >- [% IF print_notice_charging && !patron_has_email %] >- <div class="alert alert-warning"> >- <h4><i class="fa fa-exclamation-triangle"></i> Print Notice Charges</h4> >- <p><strong>Important:</strong> Print notices incur a charge of [% print_notice_charge_amount | $Price %] each to cover postage and processing costs.</p> >- <p>To avoid these charges, please:</p> >- <ul> >- <li>Provide an email address in your <a href="/cgi-bin/koha/opac-memberentry.pl">account details</a></li> >- <li>Select email delivery for your notice preferences below</li> >- <li>Uncheck any print notice options if they are enabled</li> >- </ul> >- </div> >+ [% IF Koha.Preference( 'EnhancedMessagingPreferencesOPAC' ) %] >+ [% SET has_print_transport = 0 %] >+ [% FOREACH pref IN messaging_preferences %] >+ [% IF pref.transport_print %][% SET has_print_transport = 1 %][% LAST %][% END %] >+ [% END %] >+ [% END %] >+ >+ [% IF print_notice_charging && has_print_transport %] >+ [% IF patron_has_email %] >+ <div class="alert alert-info"> >+ <h4><i class="fa fa-info-circle"></i> Print notice charges may apply</h4> >+ <p>Notices can be sent by post at a charge of [% print_notice_charge_amount | $Price %] each.</p> >+ <p><strong>To avoid these charges, please:</strong></p> >+ <ul> >+ <li>Ensure print delivery is <strong>not</strong> selected for any notice type below.</li> >+ <li>Select <strong>email</strong> or any other non-print transport all notices below.</li> >+ </ul> >+ </div> >+ [% ELSE %] >+ <div class="alert alert-warning"> >+ <h4><i class="fa fa-exclamation-triangle"></i> Print notice charges will apply</h4> >+ <p><strong>To avoid these charges, please:</strong></p> >+ <p >+ >We do not have an email address on file for your account. Your notices will be sent by post at a charge of >+ [% IF print_notice_charge_amount %][% print_notice_charge_amount | $Price %][% ELSE %]0.00[% END %] each.</p >+ > >+ <p><strong>To avoid these charges, please:</strong></p> >+ <ul> >+ <li>Add an email address to your <a href="/cgi-bin/koha/opac-memberentry.pl">account</a> </li >+ ><li>Select email as your prefered delivery for each notice type</li> >+ </ul> >+ </div> >+ [% END %] > [% END %] > > <form action="/cgi-bin/koha/opac-messaging.pl" method="post" name="opacmessaging"> >@@ -62,10 +84,6 @@ > <input type="hidden" name="op" value="cud-modify" /> > > [% IF Koha.Preference( 'EnhancedMessagingPreferencesOPAC' ) %] >- [% SET has_print_transport = 0 %] >- [% FOREACH pref IN messaging_preferences %] >- [% IF pref.transport_print %][% SET has_print_transport = 1 %][% LAST %][% END %] >- [% END %] > <table class="table table-bordered table-condensed table-striped"> > <caption class="sr-only">Your messaging settings</caption> > <thead> >@@ -242,7 +260,17 @@ > > [% IF ( messaging_preference.transport_email ) %] > <td class="selectcol"> >- [% IF ( messaging_preference.transports_email ) %] >+ [% IF !patron_has_email %] >+ <input >+ type="checkbox" >+ aria-label="Email messaging unavailable (no email address on file)" >+ class="pmp_email" >+ id="email[% messaging_preference.message_attribute_id | html %]" >+ name="[% messaging_preference.message_attribute_id | html %]" >+ value="email" >+ disabled="disabled" >+ /> >+ [% ELSIF ( messaging_preference.transports_email ) %] > <input > type="checkbox" > aria-label="Unselect email messaging" >@@ -270,7 +298,19 @@ > [% IF has_print_transport %] > [% IF ( messaging_preference.transport_print ) %] > <td class="selectcol"> >- [% IF ( messaging_preference.transports_print ) %] >+ [% IF !patron_has_email %] >+ <input type="hidden" name="[% messaging_preference.message_attribute_id | html %]" value="print" /> >+ <input >+ type="checkbox" >+ aria-label="Print messaging required (no email address on file)" >+ class="pmp_print" >+ id="print[% messaging_preference.message_attribute_id | html %]" >+ name="[% messaging_preference.message_attribute_id | html %]" >+ value="print" >+ checked="checked" >+ disabled="disabled" >+ /> >+ [% ELSIF ( messaging_preference.transports_print ) %] > <input > type="checkbox" > aria-label="Unselect print messaging" >@@ -331,26 +371,6 @@ > </table> > [% END %] > >- [% IF print_notice_charging %] >- <div class="alert alert-info"> >- <h5><i class="fa fa-info-circle"></i> About Print Notice Charges</h5> >- <p>Print notices incur a charge of [% IF print_notice_charge_amount %][% print_notice_charge_amount | $Price %][% ELSE %]0.00[% END %] each to cover postage and processing costs.</p> >- <p><strong>To avoid these charges:</strong></p> >- <ul> >- [% IF !patron_has_email %] >- <li><strong>Add an email address</strong> to your <a href="/cgi-bin/koha/opac-memberentry.pl">account details</a></li> >- [% END %] >- <li>Select "Email" instead of "Print" for your notice preferences above</li> >- <li>Uncheck any enabled print notice preferences above</li> >- </ul> >- [% IF patron_has_email %] >- <p class="text-success">â You have an email address on file. Make sure to select email delivery for notices to avoid print charges.</p> >- [% ELSE %] >- <p class="text-warning"><strong>â Important:</strong> You don't have an email address on file. Print notices may be automatically selected for your account.</p> >- [% END %] >- </div> >- [% END %] >- > [% IF ( SMSSendDriver || Koha.Preference('TranslateNotices') ) %] > <fieldset class="rows d-print-none"> > <ol> >-- >2.53.0 >
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 4858
:
186491
|
186492
|
186493
|
186494
|
186495
|
186496
|
186497
|
186498
|
186499
|
186500
|
186501
|
186502
|
194257
|
194258
|
194259
|
194260
|
194261
|
194262
|
194263
|
194264
|
194265
|
194266
|
194267
|
194268
|
194269
|
194270
|
194271
| 194272