From 3686361d3e935a80fe2da6905cd7b0fe1d89ff5c Mon Sep 17 00:00:00 2001 From: Owen Leonard Date: Tue, 21 Oct 2008 15:15:26 -0500 Subject: [PATCH] Hiding SMS settings in OPAC if SMSSendDriver is not defined. Fixes Bug 2455, remove SMS column from patron messaging preferences if SMSSendDriver is not defined Signed-off-by: Galen Charlton --- .../prog/en/modules/opac-messaging.tmpl | 52 ++++++++++++------- opac/opac-messaging.pl | 3 +- 2 files changed, 34 insertions(+), 21 deletions(-) diff --git a/koha-tmpl/opac-tmpl/prog/en/modules/opac-messaging.tmpl b/koha-tmpl/opac-tmpl/prog/en/modules/opac-messaging.tmpl index f292fb1ec0..6410ec4b8f 100644 --- a/koha-tmpl/opac-tmpl/prog/en/modules/opac-messaging.tmpl +++ b/koha-tmpl/opac-tmpl/prog/en/modules/opac-messaging.tmpl @@ -1,5 +1,20 @@ Koha OnlineKoha Online Catalog › Updating Details for + @@ -19,30 +34,32 @@ -
Manage your Messaging settings +
-

Settings Updated

+

Settings Updated

- - +
# days in advancesmsemailDigests only?rssdo not notify
+ - + - - @@ -52,7 +69,7 @@ @@ -62,7 +79,7 @@ @@ -72,22 +89,17 @@ - +
 Days in advanceSMSEmailDigests only?RSSDo not notify
+ - " name="" - value="sms" onclick = "document.opacmessaging.none.checked=false;"> + value="sms" onclick = "document.opacmessaging.none.checked=false;" /> -" name="" - value="email" onclick = "document.opacmessaging.none.checked=false;"> + value="email" onclick = "document.opacmessaging.none.checked=false;" /> -" value="" - name="digest" onclick = "document.opacmessaging.none.checked=false;"> + name="digest" onclick = "document.opacmessaging.none.checked=false;" /> -" name="" - value="rss" onclick = "document.opacmessaging.none.checked=false;"> + value="rss" onclick = "document.opacmessaging.none.checked=false;" /> - " - onclick = "if ( document.opacmessaging.none.checked == true ) { - document.opacmessaging.sms.checked=false; - document.opacmessaging.email.checked=false; - document.opacmessaging.digest.checked=false; - document.opacmessaging.rss.checked=false; }" />" />
-SMS number: " /> +
  1. " />
diff --git a/opac/opac-messaging.pl b/opac/opac-messaging.pl index 86da193094..20dc9c507b 100755 --- a/opac/opac-messaging.pl +++ b/opac/opac-messaging.pl @@ -117,6 +117,7 @@ PREF: foreach my $option ( @$messaging_options ) { $template->param( BORROWER_INFO => [ $borrower ], messagingview => 1, messaging_preferences => $messaging_options, - SMSnumber => defined $borrower->{'smsalertnumber'} ? $borrower->{'smsalertnumber'} : $borrower->{'mobile'} ); + SMSnumber => defined $borrower->{'smsalertnumber'} ? $borrower->{'smsalertnumber'} : $borrower->{'mobile'}, + SMSSendDriver => C4::Context->preference("SMSSendDriver") ); output_html_with_http_headers $query, $cookie, $template->output;