]> git.ipfire.org Git - thirdparty/bugzilla.git/commitdiff
Bug 460909 - Mass edit bug form does not allow adding private comments
authordkl%redhat.com <>
Wed, 17 Dec 2008 17:39:02 +0000 (17:39 +0000)
committerdkl%redhat.com <>
Wed, 17 Dec 2008 17:39:02 +0000 (17:39 +0000)
Patch by Dave Lawrence <dkl@redhat.com> - r/a=LpSolit

js/field.js
template/en/default/bug/edit.html.tmpl
template/en/default/list/edit-multiple.html.tmpl

index daa3904825b8115386bc56c131015a8a4164c620..21fda4d5a3e790b09f97a8bc7c2cdc260ef016cc 100644 (file)
@@ -324,6 +324,14 @@ function boldOnChange(e, field_id){
     }
 }
 
+function updateCommentTagControl(checkbox, form) {
+    if (checkbox.checked) {
+        form.comment.className='bz_private';
+    } else {
+        form.comment.className='';
+    }
+}
+
 /**
  * Says that a field should only be displayed when another field has
  * a certain value. May only be called after the controller has already
index ff621173fb925d82684da957aae21ae365e47d84..73efa0b6cf707f1b315598c27729713fd483ed03 100644 (file)
 
 [% END %]
 
-  function updateCommentTagControl(checkbox, form) {
-      if (checkbox.checked) {
-          form.comment.className='bz_private';
-      } else {
-          form.comment.className='';
-      }
-  }
-
   //-->
   </script>
 
index 190628fa9d950186d0f1be1dc25d4d028291124d..d49709dbcf5b9ec66d6640df8d506655c52def0b 100644 (file)
 
 </table>
 
-<b><label for="comment">Additional Comments:</label></b><br>
+<b><label for="comment">Additional Comments:</label></b>
+[% IF user.is_insider %]
+  <input type="checkbox" name="commentprivacy" value="1"
+         id="newcommentprivacy"
+         onClick="updateCommentTagControl(this, form)"/>
+  <label for="newcommentprivacy">Private</label>
+[% END %]
+<br>
 [% INCLUDE global/textarea.html.tmpl
   name    = 'comment'
   id      = 'comment'