From aabd7148eeeb26a905ee2d618aa750e88c55c437 Mon Sep 17 00:00:00 2001 From: Owen Leonard Date: Thu, 25 Aug 2011 15:11:09 -0400 Subject: [PATCH] Fix for Bug 6458 - incorrect parsing result in translation processing Content-Type: text/plain; charset="utf-8" Correction for opac-messaging.tt tops tag attribute markup from being passed to the template directly in favor of using template logic. --- C4/Form/MessagingPreferences.pm | 4 +- .../opac-tmpl/prog/en/modules/opac-messaging.tt | 49 +++++++++++++++---- 2 files changed, 40 insertions(+), 13 deletions(-) diff --git a/C4/Form/MessagingPreferences.pm b/C4/Form/MessagingPreferences.pm index 4bc742d..85ae9e8 100644 --- a/C4/Form/MessagingPreferences.pm +++ b/C4/Form/MessagingPreferences.pm @@ -140,9 +140,9 @@ sub set_form_values { } ( 0..30 ); # FIXME: 30 is a magic number. } foreach my $transport ( @{$pref->{'transports'}} ) { - $option->{'transport_'.$transport} = 'checked="checked"'; + $option->{'transports_'.$transport} = 1; } - $option->{'digest'} = 'checked="checked"' if $pref->{'wants_digest'}; + $option->{'digest'} = 1 if $pref->{'wants_digest'}; } $template->param(messaging_preferences => $messaging_options); } diff --git a/koha-tmpl/opac-tmpl/prog/en/modules/opac-messaging.tt b/koha-tmpl/opac-tmpl/prog/en/modules/opac-messaging.tt index ebb1e26..4c51f48 100644 --- a/koha-tmpl/opac-tmpl/prog/en/modules/opac-messaging.tt +++ b/koha-tmpl/opac-tmpl/prog/en/modules/opac-messaging.tt @@ -59,29 +59,56 @@ - [% END %] [% IF ( messaging_preference.transport_sms ) %] - [% IF ( SMSSendDriver ) %][% END %] + [% IF ( SMSSendDriver ) %] + + [% IF ( messaging_preference.transports_sms ) %] + + [% ELSE %] + + [% END %] + + [% END %] [% ELSE %] - - + - [% END %] [% IF ( messaging_preference.transport_email ) %] - + + [% IF ( messaging_preference.transports_email ) %] + + [% ELSE %] + + [% END %] [% ELSE %] - [% END %] [% IF ( messaging_preference.has_digest ) %] - + [% IF ( messaging_preference.digest ) %] + + name="digest" checked="checked" onclick = "document.opacmessaging.none[% messaging_preference.message_attribute_id %].checked=false;" /> + [% ELSE %] + + [% END %] [% ELSE %] - -- 1.7.3