Fix for Bug 6458 - incorrect parsing result in translation processing
Correction for opac-messaging.tt tops tag attribute markup from being passed to the template directly in favor of using template logic. Signed-off-by: Chris Cormack <chrisc@catalyst.net.nz>
This commit is contained in:
parent
362b82c51d
commit
4324377c55
2 changed files with 40 additions and 13 deletions
|
@ -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);
|
||||
}
|
||||
|
|
|
@ -59,29 +59,56 @@
|
|||
<td>-</td>
|
||||
[% END %]
|
||||
[% IF ( messaging_preference.transport_sms ) %]
|
||||
[% IF ( SMSSendDriver ) %]<td><input type="checkbox"
|
||||
id="sms[% messaging_preference.message_attribute_id %]"
|
||||
name="[% messaging_preference.message_attribute_id %]"
|
||||
value="sms" [% messaging_preference.transport_sms %] onclick = "document.opacmessaging.none[% messaging_preference.message_attribute_id %].checked=false;" /></td>[% END %]
|
||||
[% IF ( SMSSendDriver ) %]
|
||||
<td>
|
||||
[% IF ( messaging_preference.transports_sms ) %]
|
||||
<input type="checkbox"
|
||||
id="sms[% messaging_preference.message_attribute_id %]"
|
||||
name="[% messaging_preference.message_attribute_id %]"
|
||||
value="sms" checked="checked" onclick = "document.opacmessaging.none[% messaging_preference.message_attribute_id %].checked=false;" />
|
||||
[% ELSE %]
|
||||
<input type="checkbox"
|
||||
id="sms[% messaging_preference.message_attribute_id %]"
|
||||
name="[% messaging_preference.message_attribute_id %]"
|
||||
value="sms" onclick = "document.opacmessaging.none[% messaging_preference.message_attribute_id %].checked=false;" />
|
||||
[% END %]
|
||||
</td>
|
||||
[% END %]
|
||||
[% ELSE %]
|
||||
<td>-</td>
|
||||
<td>-</td>
|
||||
[% END %]
|
||||
|
||||
[% IF ( messaging_preference.transport_email ) %]
|
||||
<td><input type="checkbox"
|
||||
id="email[% messaging_preference.message_attribute_id %]"
|
||||
name="[% messaging_preference.message_attribute_id %]"
|
||||
value="email" [% messaging_preference.transport_email %] onclick = "document.opacmessaging.none[% messaging_preference.message_attribute_id %].checked=false;" />
|
||||
<td>
|
||||
[% IF ( messaging_preference.transports_email ) %]
|
||||
<input type="checkbox"
|
||||
id="email[% messaging_preference.message_attribute_id %]"
|
||||
name="[% messaging_preference.message_attribute_id %]"
|
||||
value="email" checked="checked" onclick = "document.opacmessaging.none[% messaging_preference.message_attribute_id %].checked=false;" />
|
||||
[% ELSE %]
|
||||
<input type="checkbox"
|
||||
id="email[% messaging_preference.message_attribute_id %]"
|
||||
name="[% messaging_preference.message_attribute_id %]"
|
||||
value="email" onclick = "document.opacmessaging.none[% messaging_preference.message_attribute_id %].checked=false;" />
|
||||
[% END %]
|
||||
</td>
|
||||
[% ELSE %]
|
||||
<td>-</td>
|
||||
[% END %]
|
||||
|
||||
[% IF ( messaging_preference.has_digest ) %]
|
||||
<td><input type="checkbox"
|
||||
<td>
|
||||
[% IF ( messaging_preference.digest ) %]
|
||||
<input type="checkbox"
|
||||
id="digest[% messaging_preference.message_attribute_id %]"
|
||||
value="[% messaging_preference.message_attribute_id %]"
|
||||
name="digest" [% messaging_preference.digest %] onclick = "document.opacmessaging.none[% messaging_preference.message_attribute_id %].checked=false;" />
|
||||
name="digest" checked="checked" onclick = "document.opacmessaging.none[% messaging_preference.message_attribute_id %].checked=false;" />
|
||||
[% ELSE %]
|
||||
<input type="checkbox"
|
||||
id="digest[% messaging_preference.message_attribute_id %]"
|
||||
value="[% messaging_preference.message_attribute_id %]"
|
||||
name="digest" onclick = "document.opacmessaging.none[% messaging_preference.message_attribute_id %].checked=false;" />
|
||||
[% END %]
|
||||
</td>
|
||||
[% ELSE %]
|
||||
<td>-</td>
|
||||
|
|
Loading…
Reference in a new issue