Messaging Preferences for OPAC
- Added ability to request a messaging config change. (Apparently, users aren't allowed to directly change these settings.) Signed-off-by: Daniel Sweeney <daniel.sweeney@liblime.com> Signed-off-by: Galen Charlton <galen.charlton@liblime.com>
This commit is contained in:
parent
2302621702
commit
65b0ca3923
2 changed files with 76 additions and 0 deletions
|
@ -40,6 +40,67 @@
|
|||
<li><label for="emailaddress">Email:</label> <input id="emailaddress" type="text" value="<!-- TMPL_VAR name="email" -->" name="emailaddress" /></li>
|
||||
</ol>
|
||||
</fieldset>
|
||||
|
||||
<fieldset class="brief">
|
||||
<legend>Items Borrowed Notifications</legend>
|
||||
<ol>
|
||||
<li>
|
||||
<label for="items_borrowed_email">Email:</label>
|
||||
<!-- TMPL_IF items_borrowed_email -->
|
||||
<input type="checkbox" name="items_borrowed_email" value="1" checked="checked">
|
||||
<!-- TMPL_ELSE -->
|
||||
<input type="checkbox" name="items_borrowed_email" value="1">
|
||||
<!-- /TMPL_IF -->
|
||||
</li>
|
||||
<li>
|
||||
<label for="items_borrowed_sms">Text Message:</label>
|
||||
<!-- TMPL_IF items_borrowed_sms -->
|
||||
<input type="checkbox" name="items_borrowed_sms" value="1" checked="checked">
|
||||
<!-- TMPL_ELSE -->
|
||||
<input type="checkbox" name="items_borrowed_sms" value="1">
|
||||
<!-- /TMPL_IF -->
|
||||
</li>
|
||||
<li>
|
||||
<label for="items_borrowed_feed">XML Syndication Feed:</label>
|
||||
<!-- TMPL_IF items_borrowed_feed -->
|
||||
<input type="checkbox" name="items_borrowed_feed" value="1" checked="checked">
|
||||
<!-- TMPL_ELSE -->
|
||||
<input type="checkbox" name="items_borrowed_feed" value="1">
|
||||
<!-- /TMPL_IF -->
|
||||
</li>
|
||||
</ol>
|
||||
</fieldset>
|
||||
|
||||
<fieldset class="brief">
|
||||
<legend>Items Returned Notifications</legend>
|
||||
<ol>
|
||||
<li>
|
||||
<label for="items_returned_email">Email:</label>
|
||||
<!-- TMPL_IF items_returned_email -->
|
||||
<input type="checkbox" name="items_returned_email" value="1" checked="checked">
|
||||
<!-- TMPL_ELSE -->
|
||||
<input type="checkbox" name="items_returned_email" value="1">
|
||||
<!-- /TMPL_IF -->
|
||||
</li>
|
||||
<li>
|
||||
<label for="items_returned_sms">Text Message:</label>
|
||||
<!-- TMPL_IF items_returned_sms -->
|
||||
<input type="checkbox" name="items_returned_sms" value="1" checked="checked">
|
||||
<!-- TMPL_ELSE -->
|
||||
<input type="checkbox" name="items_returned_sms" value="1">
|
||||
<!-- /TMPL_IF -->
|
||||
</li>
|
||||
<li>
|
||||
<label for="items_returned_feed">XML Syndication Feed:</label>
|
||||
<!-- TMPL_IF items_returned_feed -->
|
||||
<input type="checkbox" name="items_returned_feed" value="1" checked="checked">
|
||||
<!-- TMPL_ELSE -->
|
||||
<input type="checkbox" name="items_returned_feed" value="1">
|
||||
<!-- /TMPL_IF -->
|
||||
</li>
|
||||
</ol>
|
||||
</fieldset>
|
||||
|
||||
</div>
|
||||
<div class="yui-u">
|
||||
<fieldset class="brief">
|
||||
|
|
|
@ -130,6 +130,21 @@ if (C4::Context->preference('ExtendedPatronAttributes')) {
|
|||
}
|
||||
}
|
||||
|
||||
my $checkin_prefs = C4::Members::Messaging::GetMessagingPreferences({
|
||||
borrowernumber => $borrowernumber,
|
||||
message_name => 'Item Checkout'
|
||||
});
|
||||
for (@{ $checkin_prefs->{transports} }) {
|
||||
$borr->{"items_returned_$_"} = 1;
|
||||
}
|
||||
my $checkout_prefs = C4::Members::Messaging::GetMessagingPreferences({
|
||||
borrowernumber => $borrowernumber,
|
||||
message_name => 'Item Check-in'
|
||||
});
|
||||
for (@{ $checkout_prefs->{transports} }) {
|
||||
$borr->{"items_borrowed_$_"} = 1;
|
||||
}
|
||||
|
||||
my @bordat;
|
||||
$bordat[0] = $borr;
|
||||
|
||||
|
|
Loading…
Reference in a new issue