lp1777677 Test Notification Permission & String change
authorKyle Huckins <khuckins@catalyte.io>
Wed, 12 Dec 2018 21:05:38 +0000 (21:05 +0000)
committerGalen Charlton <gmc@equinoxinitiative.org>
Fri, 11 Sep 2020 19:51:31 +0000 (15:51 -0400)
- Update permission requirement to OPAC_LOGIN
- Update strings to be more end-user friendly

Signed-off-by: Kyle Huckins <khuckins@catalyte.io>
Signed-off-by: Terran McCanna <tmccanna@georgialibraries.org>
Signed-off-by: Chris Sharp <csharp@georgialibraries.org>
Signed-off-by: Galen Charlton <gmc@equinoxinitiative.org>

Open-ILS/src/perlmods/lib/OpenILS/Application/Actor.pm
Open-ILS/src/sql/Pg/950.data.seed-values.sql
Open-ILS/src/sql/Pg/upgrade/XXXX.data.lp1777677-action-triggers-test-notification.sql
Open-ILS/src/templates/opac/myopac/prefs.tt2
Open-ILS/src/templates/opac/myopac/prefs_notify.tt2
Open-ILS/src/templates/opac/myopac/test_notification.tt2

index b703f79..35abb96 100644 (file)
@@ -4363,7 +4363,7 @@ sub fire_test_notification {
     my $e = new_editor(authtoken => $auth);
     return $e->event unless $e->checkauth;
     return $e->event unless $$args{home_ou};
-    return $e->die_event unless $e->allowed('UPDATE_USER', $$args{home_ou});
+    return $e->die_event unless $e->allowed('OPAC_LOGIN', $$args{home_ou});
 
     my $event_hook = $$args{event_def_type} or return $e->event;
     my $usr = $e->retrieve_actor_user($$args{target});
index 78a8b3c..af65b92 100644 (file)
@@ -17252,9 +17252,9 @@ $$
 [%- sms_carrier = helpers.get_user_setting(target.id, 'opac.default_sms_carrier') -%]
 From: [%- helpers.get_org_setting(target.home_ou.id, 'org.bounced_emails') || lib.email || params.sender_email || default_sender %]
 To: [%- helpers.get_sms_gateway_email(sms_carrier,sms_number) %]
-Subject: Test SMS
+Subject: Test Text Message
 
-This is a test confirming your default SMS information at [% lib.name %].
+This is a test confirming your mobile number for [% lib.name %] is correct.
 
 Sincerely,
 [% lib.name %]
index 30f8364..4c22110 100644 (file)
@@ -58,9 +58,9 @@ $$
 [%- sms_carrier = helpers.get_user_setting(target.id, 'opac.default_sms_carrier') -%]
 From: [%- helpers.get_org_setting(target.home_ou.id, 'org.bounced_emails') || lib.email || params.sender_email || default_sender %]
 To: [%- helpers.get_sms_gateway_email(sms_carrier,sms_number) %]
-Subject: Test SMS
+Subject: Test Text Message
 
-This is a test confirming your default SMS information at [% lib.name %].
+This is a test confirming your mobile number for [% lib.name %] is correct.
 
 Sincerely,
 [% lib.name %]
index e609908..f722020 100644 (file)
@@ -93,7 +93,7 @@
             </tr>
             <tr id="test_notification_banner" style="display:none">
                 <td colspan="4">
-                    [% INCLUDE "opac/myopac/test_notification.tt2" %]
+                    [% INCLUDE "opac/myopac/test_notification.tt2" message_type = "email" %]
                 </td>
             </tr>
             <tr>
index a868c40..a778425 100644 (file)
                     [% setting = 'opac.default_sms_notify' %]
                     <tr id="test_notification_banner" style="display:none">
                         <td colspan="4">
-                            [% INCLUDE "opac/myopac/test_notification.tt2" %]
+                            [% INCLUDE "opac/myopac/test_notification.tt2" message_type = "sms" %]
                         </td>
                     </tr>
                     <tr>
index a092924..7f5d92e 100644 (file)
@@ -1,8 +1,12 @@
 <div class="color_4">
-    [% l('Notification Sent') %]
+    [% l('Message Sent') %]
 </div>
 <div>
-    [% l('If you do not receive a notification, contact your Library for more information.') %]
+    [% l('If you do not receive ') %] [% IF message_type == "email" %] 
+        [% l(a'n email') %] 
+    [% ELSIF message_type == "sms" %] 
+        [% l(' text') %] 
+    [% END %] [% l('message, contact your Library for more information.') %]
 </div>
 
 <div>[% ctx.user.home_ou.name %]</div>