summaryrefslogtreecommitdiffstats
path: root/template/en/default/bug/create
diff options
context:
space:
mode:
authorlpsolit%gmail.com <>2006-06-18 08:24:34 +0200
committerlpsolit%gmail.com <>2006-06-18 08:24:34 +0200
commit05fe02cdd0cf84e61df2f89afec751c279d30f35 (patch)
treebc942082af5b4611ad278b506ff6eccb0b5e309d /template/en/default/bug/create
parent0d2869cdc8bf59db57e80e7e3a0c0c377fc0ffb5 (diff)
downloadbugzilla-05fe02cdd0cf84e61df2f89afec751c279d30f35.tar.gz
bugzilla-05fe02cdd0cf84e61df2f89afec751c279d30f35.tar.xz
Bug 5179: Need to be able to put attachment on new bug - Patch by Marc Schumann <wurblzap@gmail.com> r=LpSolit a=justdave
Diffstat (limited to 'template/en/default/bug/create')
-rw-r--r--template/en/default/bug/create/create.html.tmpl52
1 files changed, 51 insertions, 1 deletions
diff --git a/template/en/default/bug/create/create.html.tmpl b/template/en/default/bug/create/create.html.tmpl
index a0b186072..38656b813 100644
--- a/template/en/default/bug/create/create.html.tmpl
+++ b/template/en/default/bug/create/create.html.tmpl
@@ -19,12 +19,15 @@
# Contributor(s): Gervase Markham <gerv@gerv.net>
# Ville Skyttä <ville.skytta@iki.fi>
# Shane H. W. Travis <travis@sedsystems.ca>
+ # Marc Schumann <wurblzap@gmail.com>
#%]
[% PROCESS "global/field-descs.none.tmpl" %]
[% PROCESS global/header.html.tmpl
title = "Enter $terms.Bug: $product.name"
+ style_urls = [ 'skins/standard/create_attachment.css' ]
+ javascript_urls = [ "js/attachment.js" ]
onload="set_assign_to();"
%]
@@ -86,10 +89,24 @@ function set_assign_to() {
[% END %]
}
}
+
+function handleWantsAttachment(wants_attachment) {
+ if (wants_attachment) {
+ document.getElementById('attachment_false').style.display = 'none';
+ document.getElementById('attachment_true').style.display = 'block';
+ }
+ else {
+ document.getElementById('attachment_false').style.display = 'block';
+ document.getElementById('attachment_true').style.display = 'none';
+ clearAttachmentFields();
+ }
+}
+
-->
</script>
-<form name="Create" id="Create" method="post" action="post_bug.cgi">
+<form name="Create" id="Create" method="post" action="post_bug.cgi"
+ enctype="multipart/form-data">
<input type="hidden" name="product" value="[% product.name FILTER html %]">
<input type="hidden" name="token" value="[% token FILTER html %]">
@@ -316,6 +333,7 @@ function set_assign_to() {
[%- END %]
[% INCLUDE global/textarea.html.tmpl
name = 'comment'
+ id = 'comment'
minrows = 10
maxrows = 25
cols = constants.COMMENT_COLS
@@ -341,6 +359,38 @@ function set_assign_to() {
<input type="hidden" name="commentprivacy" value="0">
[% END %]
+ <tr>
+ <th align="right" valign="top">Attachment:</th>
+ <td colspan="3">
+ <script type="text/javascript">
+ <!--
+ document.write( '<div id="attachment_false">'
+ + '<input type="button" value="Add an attachment" '
+ + 'onClick="handleWantsAttachment(true)"> '
+ + '<em style="display: none">This button has no '
+ + 'functionality for you because your browser does '
+ + 'not support CSS or does not use it.</em>'
+ + '</div>'
+ + '<div id="attachment_true" style="display: none">'
+ + '<input type="button" '
+ + 'value="Don\'t add an attachment " '
+ + 'onClick="handleWantsAttachment(false)">');
+ //-->
+ </script>
+ <fieldset>
+ <legend>Add an attachment</legend>
+ <table class="attachment_entry">
+ [% PROCESS attachment/createformcontents.html.tmpl %]
+ </table>
+ </fieldset>
+ <script type="text/javascript">
+ <!--
+ document.write('</div>');
+ //-->
+ </script>
+ </td>
+ </tr>
+
[% IF UserInGroup('editbugs') %]
[% IF use_keywords %]
<tr>