From ac196cddcc977556f17957bd54c649a8a088ac5a Mon Sep 17 00:00:00 2001 From: Owen Leonard Date: Tue, 21 Oct 2008 14:57:27 -0500 Subject: [PATCH] Hiding SMS messaging preferences if there is no SMSSendDriver defined in system preferences. Signed-off-by: Galen Charlton --- .../prog/en/modules/members/messaging.tmpl | 30 ++++++++++++------- members/messaging.pl | 3 +- 2 files changed, 21 insertions(+), 12 deletions(-) diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/members/messaging.tmpl b/koha-tmpl/intranet-tmpl/prog/en/modules/members/messaging.tmpl index 955ce67644..82f54d284d 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/modules/members/messaging.tmpl +++ b/koha-tmpl/intranet-tmpl/prog/en/modules/members/messaging.tmpl @@ -1,6 +1,21 @@ Koha › Patrons › <!-- TMPL_IF NAME="unknowuser" -->Patron does not exist<!-- TMPL_ELSE -->Patron Details for <!-- TMPL_VAR NAME="firstname" --> <!-- TMPL_VAR NAME="surname" --> (<!-- TMPL_VAR NAME="cardnumber" -->)<!-- /TMPL_IF --> + @@ -54,7 +69,7 @@

Manage patron messaging settings

- + @@ -71,11 +86,11 @@ - + @@ -110,19 +125,12 @@ - +
Days in advanceSMSEmailDigests only?RSSDo not notify
Days in advanceSMSEmailDigests only?RSSDo not notify
- " name="" value="sms" onclick = "document.messaging.none.checked=false;" /> - - - " - onclick = "if ( document.messaging.none.checked == true ) { - document.messaging.sms.checked=false; - document.messaging.email.checked=false; - document.messaging.digest.checked=false; - document.messaging.rss.checked=false; }" />" />

" />

- -
Cancel
diff --git a/members/messaging.pl b/members/messaging.pl index c3479f4307..850ba03d99 100755 --- a/members/messaging.pl +++ b/members/messaging.pl @@ -143,10 +143,11 @@ $template->param( messagingview => 1, DHTMLcalendar_dateformat => C4::Dates->DHTMLcalendar(), borrowernumber => $borrowernumber, branchcode => $borrower->{'branchcode'}, - branchname => GetBranchName($borrower->{'branchcode'}), + branchname => GetBranchName($borrower->{'branchcode'}), dateformat => C4::Context->preference("dateformat"), categoryname => $borrower->{'description'}, $borrower->{'categorycode'} => 1, + SMSSendDriver => C4::Context->preference("SMSSendDriver") ); $messaging_preferences->{'SMSnumber'}{'value'} = defined $borrower->{'smsalertnumber'} -- 2.39.5