Commit 4eb82e4c authored by David Lawrence's avatar David Lawrence

Bug 626292: "Make description private" checkbox should set bz_private class on the comment box

r/a=mkanat
parent 7f5eb650
...@@ -443,11 +443,11 @@ function boldOnChange(e, field_id){ ...@@ -443,11 +443,11 @@ function boldOnChange(e, field_id){
} }
} }
function updateCommentTagControl(checkbox, form) { function updateCommentTagControl(checkbox, field) {
if (checkbox.checked) { if (checkbox.checked) {
form.comment.className='bz_private'; YAHOO.util.Dom.addClass(field, 'bz_private');
} else { } else {
form.comment.className=''; YAHOO.util.Dom.removeClass(field, 'bz_private');
} }
} }
......
...@@ -589,7 +589,8 @@ TUI_hide_default('attachment_text_field'); ...@@ -589,7 +589,8 @@ TUI_hide_default('attachment_text_field');
<td colspan="3"> <td colspan="3">
&nbsp;&nbsp; &nbsp;&nbsp;
<input type="checkbox" id="comment_is_private" name="comment_is_private" <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"> <label for="comment_is_private">
Make description private (visible only to members of the Make description private (visible only to members of the
<strong>[% Param('insidergroup') FILTER html %]</strong> group) <strong>[% Param('insidergroup') FILTER html %]</strong> group)
......
...@@ -60,6 +60,7 @@ ...@@ -60,6 +60,7 @@
[% IF user.is_insider %] [% IF user.is_insider %]
if (document.getElementById('isprivate_' + real_id).checked) { if (document.getElementById('isprivate_' + real_id).checked) {
document.getElementById('newcommentprivacy').checked = 'checked'; document.getElementById('newcommentprivacy').checked = 'checked';
updateCommentTagControl(document.getElementById('newcommentprivacy'), 'comment');
} }
[% END %] [% END %]
...@@ -130,7 +131,7 @@ ...@@ -130,7 +131,7 @@
//--> //-->
</script> </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="delta_ts" value="[% bug.delta_ts %]">
<input type="hidden" name="longdesclength" value="[% bug.comments.size %]"> <input type="hidden" name="longdesclength" value="[% bug.comments.size %]">
...@@ -1066,7 +1067,7 @@ ...@@ -1066,7 +1067,7 @@
[% IF user.is_insider %] [% IF user.is_insider %]
<input type="checkbox" name="comment_is_private" value="1" <input type="checkbox" name="comment_is_private" value="1"
id="newcommentprivacy" id="newcommentprivacy"
onClick="updateCommentTagControl(this, form)"> onClick="updateCommentTagControl(this, 'comment')">
<label for="newcommentprivacy"> <label for="newcommentprivacy">
Make comment private (visible only to members of the Make comment private (visible only to members of the
<strong>[% Param('insidergroup') FILTER html %]</strong> group) <strong>[% Param('insidergroup') FILTER html %]</strong> group)
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment