From b7778f561b94997bee694689b84ba257442901b7 Mon Sep 17 00:00:00 2001 From: Kyle Huckins Date: Wed, 12 Dec 2018 21:05:38 +0000 Subject: [PATCH] lp1777677 Test Notification Permission & String change - Update permission requirement to OPAC_LOGIN - Update strings to be more end-user friendly Signed-off-by: Kyle Huckins Signed-off-by: Terran McCanna Signed-off-by: Chris Sharp Signed-off-by: Galen Charlton --- Open-ILS/src/perlmods/lib/OpenILS/Application/Actor.pm | 2 +- Open-ILS/src/sql/Pg/950.data.seed-values.sql | 4 ++-- .../XXXX.data.lp1777677-action-triggers-test-notification.sql | 4 ++-- Open-ILS/src/templates/opac/myopac/prefs.tt2 | 2 +- Open-ILS/src/templates/opac/myopac/prefs_notify.tt2 | 2 +- Open-ILS/src/templates/opac/myopac/test_notification.tt2 | 8 ++++++-- 6 files changed, 13 insertions(+), 9 deletions(-) diff --git a/Open-ILS/src/perlmods/lib/OpenILS/Application/Actor.pm b/Open-ILS/src/perlmods/lib/OpenILS/Application/Actor.pm index b703f7934b..35abb96dab 100644 --- a/Open-ILS/src/perlmods/lib/OpenILS/Application/Actor.pm +++ b/Open-ILS/src/perlmods/lib/OpenILS/Application/Actor.pm @@ -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}); diff --git a/Open-ILS/src/sql/Pg/950.data.seed-values.sql b/Open-ILS/src/sql/Pg/950.data.seed-values.sql index 78a8b3c14d..af65b92d7a 100644 --- a/Open-ILS/src/sql/Pg/950.data.seed-values.sql +++ b/Open-ILS/src/sql/Pg/950.data.seed-values.sql @@ -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 %] diff --git a/Open-ILS/src/sql/Pg/upgrade/XXXX.data.lp1777677-action-triggers-test-notification.sql b/Open-ILS/src/sql/Pg/upgrade/XXXX.data.lp1777677-action-triggers-test-notification.sql index 30f8364fd0..4c22110dad 100644 --- a/Open-ILS/src/sql/Pg/upgrade/XXXX.data.lp1777677-action-triggers-test-notification.sql +++ b/Open-ILS/src/sql/Pg/upgrade/XXXX.data.lp1777677-action-triggers-test-notification.sql @@ -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 %] diff --git a/Open-ILS/src/templates/opac/myopac/prefs.tt2 b/Open-ILS/src/templates/opac/myopac/prefs.tt2 index e609908534..f722020c3c 100644 --- a/Open-ILS/src/templates/opac/myopac/prefs.tt2 +++ b/Open-ILS/src/templates/opac/myopac/prefs.tt2 @@ -93,7 +93,7 @@ - [% INCLUDE "opac/myopac/test_notification.tt2" %] + [% INCLUDE "opac/myopac/test_notification.tt2" message_type = "email" %] diff --git a/Open-ILS/src/templates/opac/myopac/prefs_notify.tt2 b/Open-ILS/src/templates/opac/myopac/prefs_notify.tt2 index a868c40f94..a7784256be 100644 --- a/Open-ILS/src/templates/opac/myopac/prefs_notify.tt2 +++ b/Open-ILS/src/templates/opac/myopac/prefs_notify.tt2 @@ -127,7 +127,7 @@ [% setting = 'opac.default_sms_notify' %] - [% INCLUDE "opac/myopac/test_notification.tt2" %] + [% INCLUDE "opac/myopac/test_notification.tt2" message_type = "sms" %] diff --git a/Open-ILS/src/templates/opac/myopac/test_notification.tt2 b/Open-ILS/src/templates/opac/myopac/test_notification.tt2 index a092924170..7f5d92e459 100644 --- a/Open-ILS/src/templates/opac/myopac/test_notification.tt2 +++ b/Open-ILS/src/templates/opac/myopac/test_notification.tt2 @@ -1,8 +1,12 @@
- [% l('Notification Sent') %] + [% l('Message Sent') %]
- [% 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.') %]
[% ctx.user.home_ou.name %]
-- 2.11.0