From 65b0ca3923839caf369f13db4d697ff87684a307 Mon Sep 17 00:00:00 2001 From: John Beppu Date: Tue, 3 Feb 2009 16:02:01 -0600 Subject: [PATCH] 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 Signed-off-by: Galen Charlton --- .../prog/en/modules/opac-userupdate.tmpl | 61 +++++++++++++++++++ opac/opac-userupdate.pl | 15 +++++ 2 files changed, 76 insertions(+) diff --git a/koha-tmpl/opac-tmpl/prog/en/modules/opac-userupdate.tmpl b/koha-tmpl/opac-tmpl/prog/en/modules/opac-userupdate.tmpl index d0498dbdc0..405d75b82c 100644 --- a/koha-tmpl/opac-tmpl/prog/en/modules/opac-userupdate.tmpl +++ b/koha-tmpl/opac-tmpl/prog/en/modules/opac-userupdate.tmpl @@ -40,6 +40,67 @@
  • " name="emailaddress" />
  • + +
    +Items Borrowed Notifications +
      +
    1. + + + + + + +
    2. +
    3. + + + + + + +
    4. +
    5. + + + + + + +
    6. +
    +
    + +
    +Items Returned Notifications +
      +
    1. + + + + + + +
    2. +
    3. + + + + + + +
    4. +
    5. + + + + + + +
    6. +
    +
    +
    diff --git a/opac/opac-userupdate.pl b/opac/opac-userupdate.pl index ad9a225526..bbe02d7ae4 100755 --- a/opac/opac-userupdate.pl +++ b/opac/opac-userupdate.pl @@ -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; -- 2.39.5