}
}
-function updateCommentTagControl(checkbox, form) {
+function updateCommentTagControl(checkbox, field) {
if (checkbox.checked) {
- form.comment.className='bz_private';
+ YAHOO.util.Dom.addClass(field, 'bz_private');
} else {
- form.comment.className='';
+ YAHOO.util.Dom.removeClass(field, 'bz_private');
}
}
<td colspan="3">
<input type="checkbox" id="comment_is_private" name="comment_is_private"
- [% ' checked="checked"' IF comment_is_private %]>
+ [% ' checked="checked"' IF comment_is_private %]
+ onClick="updateCommentTagControl(this, 'comment')">
<label for="comment_is_private">
Make description private (visible only to members of the
<strong>[% Param('insidergroup') FILTER html %]</strong> group)
[% IF user.is_insider %]
if (document.getElementById('isprivate_' + real_id).checked) {
document.getElementById('newcommentprivacy').checked = 'checked';
+ updateCommentTagControl(document.getElementById('newcommentprivacy'), 'comment');
}
[% END %]
//-->
</script>
-<form name="changeform" method="post" action="process_bug.cgi">
+<form name="changeform" id="changeform" method="post" action="process_bug.cgi">
<input type="hidden" name="delta_ts" value="[% bug.delta_ts %]">
<input type="hidden" name="longdesclength" value="[% bug.comments.size %]">
[% IF user.is_insider %]
<input type="checkbox" name="comment_is_private" value="1"
id="newcommentprivacy"
- onClick="updateCommentTagControl(this, form)">
+ onClick="updateCommentTagControl(this, 'comment')">
<label for="newcommentprivacy">
Make comment private (visible only to members of the
<strong>[% Param('insidergroup') FILTER html %]</strong> group)