summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--template/en/default/bug/comments.html.tmpl16
-rw-r--r--template/en/default/bug/edit.html.tmpl11
2 files changed, 26 insertions, 1 deletions
diff --git a/template/en/default/bug/comments.html.tmpl b/template/en/default/bug/comments.html.tmpl
index 289593b7a..163f3408d 100644
--- a/template/en/default/bug/comments.html.tmpl
+++ b/template/en/default/bug/comments.html.tmpl
@@ -23,6 +23,21 @@
[% PROCESS bug/time.html.tmpl %]
+ <script type="text/javascript">
+ <!--
+ function updateCommentPrivacy(checkbox, id) {
+ var text_elem = document.getElementById('comment_text_'+id);
+ if (checkbox.checked) {
+ text_elem.parentNode.className='bz_private';
+ } else {
+ text_elem.parentNode.className='';
+ }
+ document.refresh();
+ }
+ //-->
+ </script>
+
+
[% DEFAULT start_at = 0 mode = "show" %]
[% isinsider = Param("insidergroup") && UserInGroup(Param("insidergroup")) %]
[% sort_order = user.settings.comment_sort_order.value %]
@@ -112,6 +127,7 @@
value="[% comment.isprivate %]">
<input type="hidden" name="when-[% count %]" value="[% comment.when %]">
<input type="checkbox" name="isprivate-[% count %]" value="1"
+ onClick="updateCommentPrivacy(this, [% count %])"
id="isprivate-[% count %]"
[% " checked=\"checked\"" IF comment.isprivate %]> Private
</i>
diff --git a/template/en/default/bug/edit.html.tmpl b/template/en/default/bug/edit.html.tmpl
index 38b01f06e..940e320bd 100644
--- a/template/en/default/bug/edit.html.tmpl
+++ b/template/en/default/bug/edit.html.tmpl
@@ -114,6 +114,14 @@
[% END %]
+ function updateCommentTagControl(checkbox, form) {
+ if (checkbox.checked) {
+ form.comment.className='bz_private';
+ } else {
+ form.comment.className='';
+ }
+ }
+
//-->
</script>
@@ -542,7 +550,8 @@
<b>Additional <u>C</u>omments:</b>
[% IF Param("insidergroup") && UserInGroup(Param("insidergroup")) %]
<input type="checkbox" name="commentprivacy" value="1"
- id="newcommentprivacy"> Private
+ id="newcommentprivacy"
+ onClick="updateCommentTagControl(this, form)"> Private
[% END %]
<br>
<a name="add_comment"></a>