]> git.ipfire.org Git - thirdparty/bugzilla.git/commitdiff
Bug 313256: Update CSS for attachment comment in real time to private comments -...
authorlpsolit%gmail.com <>
Thu, 9 Mar 2006 06:41:51 +0000 (06:41 +0000)
committerlpsolit%gmail.com <>
Thu, 9 Mar 2006 06:41:51 +0000 (06:41 +0000)
template/en/default/attachment/create.html.tmpl

index ae64190e08dbd270883ec0b77877d2294ff2ee60..6da5b0c19de01c97579c9fcbcf9de1a5d6fd2cf0 100644 (file)
 
     </script>
 [% END %]
+<script type="text/javascript">
+    function updateCommentPrivacy(checkbox) {
+        var text_elem = document.getElementById('comment');
+        if (checkbox.checked) {
+            text_elem.className='bz_private';
+        } else {
+            text_elem.className='';
+        }
+    }
+
+</script>
 
 
 <form name="entryform" method="post" action="attachment.cgi" enctype="multipart/form-data">
         <th>Privacy:</th>
         <td>
           <em>If the attachment is private, check the box below.</em><br>
-          <input type="checkbox" name="isprivate" id="isprivate" value="1">
+          <input type="checkbox" name="isprivate" id="isprivate"
+          value="1" onClick="updateCommentPrivacy(this)">
         <label for="isprivate">Private</label>
         </td>
       </tr>