From ca7db466d69eea4c28cd409b09261ad0669cad4f Mon Sep 17 00:00:00 2001 From: Galen Charlton Date: Wed, 20 May 2009 11:35:51 -0500 Subject: [PATCH] bug 3222: changes to messaging preferences form Moved the messaging preferences form to a new include, messaging-preference-form.inc, so that it can be used to set messaging prefs both for a patron and for a patron category. Signed-off-by: Daniel Sweeney Signed-off-by: Galen Charlton --- .../en/includes/messaging-preference-form.inc | 80 ++++++++++++++++ .../prog/en/modules/members/messaging.tmpl | 92 ++----------------- members/messaging.pl | 4 +- opac/opac-messaging.pl | 4 +- 4 files changed, 91 insertions(+), 89 deletions(-) create mode 100644 koha-tmpl/intranet-tmpl/prog/en/includes/messaging-preference-form.inc diff --git a/koha-tmpl/intranet-tmpl/prog/en/includes/messaging-preference-form.inc b/koha-tmpl/intranet-tmpl/prog/en/includes/messaging-preference-form.inc new file mode 100644 index 0000000000..59f7b32e2d --- /dev/null +++ b/koha-tmpl/intranet-tmpl/prog/en/includes/messaging-preference-form.inc @@ -0,0 +1,80 @@ + + + + +" /> + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + --> + + + + +
Days in advanceSMSEmailDigests only?Do not notify
+ -" + name="" + value="sms" onclick = "$('#none'+'').attr('checked','');" /> + -" + name="" + value="email" onclick = "$('#none'+'').attr('checked','');" /> + -" + value="" + name="digest" onclick = "$('#none'+'').attr('checked','');" /> + -" + name="" + value="rss" onclick = "$('#none'+'').attr('checked','');" /> + -" />
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 dfe61d51ae..116e06ecd9 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/modules/members/messaging.tmpl +++ b/koha-tmpl/intranet-tmpl/prog/en/modules/members/messaging.tmpl @@ -1,21 +1,6 @@ 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 --> - @@ -57,84 +42,23 @@ -
- - -" /> + -

Settings Updated

- The patron settings have been updated
+

Settings Updated

+ The patron settings have been updated
- -

Manage patron messaging settings

- - - - - - - - - - - - - - - - - - - - - - - - - - - +

Manage patron messaging settings

- - - - - --> + - - - -
Days in advanceSMSEmailDigests only?Do not notify
- -" - name="" - value="sms" onclick = "document.messaging.none.checked=false;" /> - -" - name="" - value="email" onclick = "document.messaging.none.checked=false;" /> - -" - value="" - name="digest" onclick = "document.messaging.none.checked=false;" /> - -" - name="" - value="rss" onclick = "document.messaging.none.checked=false;" /> - -" />

" />

-
Cancel
+
+ @@ -145,8 +69,6 @@
Message Queue
- - diff --git a/members/messaging.pl b/members/messaging.pl index 850ba03d99..3b598cade7 100755 --- a/members/messaging.pl +++ b/members/messaging.pl @@ -119,9 +119,9 @@ PREF: foreach my $option ( @$messaging_options ) { selected => $_ == $pref->{'days_in_advance'} ? 'SELECTED' :'' } } ( 0..30 ); # FIXME: 30 is a magic number. } foreach my $transport ( @{$pref->{'transports'}} ) { - $option->{'transport-'.$transport} = 'CHECKED'; + $option->{'transport-'.$transport} = 'checked="checked"'; } - $option->{'digest'} = 'CHECKED' if $pref->{'wants_digest'}; + $option->{'digest'} = 'checked="checked"' if $pref->{'wants_digest'}; } if ( $borrower->{'category_type'} eq 'C') { diff --git a/opac/opac-messaging.pl b/opac/opac-messaging.pl index 20dc9c507b..3292e4405e 100755 --- a/opac/opac-messaging.pl +++ b/opac/opac-messaging.pl @@ -107,10 +107,10 @@ PREF: foreach my $option ( @$messaging_options ) { } } foreach my $transport ( @{$pref->{'transports'}} ) { - $option->{'transport-'.$transport} = 'CHECKED'; + $option->{'transport-'.$transport} = 'checked="checked"'; } - $option->{'digest'} = $pref->{'wants_digest'} ? 'CHECKED' : ''; + $option->{'digest'} = $pref->{'wants_digest'} ? 'checked="checked"' : ''; } # warn( Data::Dumper->Dump( [ $messaging_options ], [ 'messaging_options' ] ) ); -- 2.39.5