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});
[%- 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 %]
[%- 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 %]
</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>
[% 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>
<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>