From 05fe02cdd0cf84e61df2f89afec751c279d30f35 Mon Sep 17 00:00:00 2001 From: "lpsolit%gmail.com" <> Date: Sun, 18 Jun 2006 06:24:34 +0000 Subject: Bug 5179: Need to be able to put attachment on new bug - Patch by Marc Schumann r=LpSolit a=justdave --- template/en/default/attachment/create.html.tmpl | 210 ++------------------- .../attachment/createformcontents.html.tmpl | 100 ++++++++++ template/en/default/bug/create/create.html.tmpl | 52 ++++- template/en/default/global/messages.html.tmpl | 6 + 4 files changed, 174 insertions(+), 194 deletions(-) create mode 100644 template/en/default/attachment/createformcontents.html.tmpl (limited to 'template') diff --git a/template/en/default/attachment/create.html.tmpl b/template/en/default/attachment/create.html.tmpl index 6da5b0c19..180fc5c49 100644 --- a/template/en/default/attachment/create.html.tmpl +++ b/template/en/default/attachment/create.html.tmpl @@ -19,6 +19,7 @@ # Contributor(s): Myk Melez # Joel Peshkin # Erik Stambaugh + # Marc Schumann #%] [% PROCESS global/variables.none.tmpl %] @@ -33,180 +34,19 @@ title = title h1 = h1 h2 = h2 - style = " - table.attachment_entry th { - text-align: right; - vertical-align: baseline; - white-space: nowrap; - } - - table.attachment_entry td { - text-align: left; - vertical-align: baseline; - padding-bottom: 5px; - } - - table#flags th, table#flags td { - text-align: left; - vertical-align: baseline; - font-size: small; - } - " - onload="setContentTypeDisabledState();" + onload="setContentTypeDisabledState(document.entryform);" + style_urls = [ 'skins/standard/create_attachment.css' ] + javascript_urls = [ "js/attachment.js" ] %] -[% IF Param("allow_attach_url") %] - -[% END %] - - -
- - - - - [% IF Param("maxlocalattachment") %] - - - - - [% END %] - [% IF Param("allow_attach_url") %] - - - - - [% END %] - - - - - - - - - - - - - [% IF (Param("insidergroup") && UserInGroup(Param("insidergroup"))) %] - - - - - [% END %] + [%# Additional fields for attachments on existing bugs: %] [% END %] - - - - + [% IF (Param("insidergroup") && UserInGroup(Param("insidergroup"))) %] + + + + + [% END %] @@ -267,23 +110,4 @@ - - [% PROCESS global/footer.html.tmpl %] diff --git a/template/en/default/attachment/createformcontents.html.tmpl b/template/en/default/attachment/createformcontents.html.tmpl new file mode 100644 index 000000000..2056490c9 --- /dev/null +++ b/template/en/default/attachment/createformcontents.html.tmpl @@ -0,0 +1,100 @@ +[%# 1.0@bugzilla.org %] +[%# The contents of this file are subject to the Mozilla Public + # License Version 1.1 (the "License"); you may not use this file + # except in compliance with the License. You may obtain a copy of + # the License at http://www.mozilla.org/MPL/ + # + # Software distributed under the License is distributed on an "AS + # IS" basis, WITHOUT WARRANTY OF ANY KIND, either express or + # implied. See the License for the specific language governing + # rights and limitations under the License. + # + # The Original Code is the Bugzilla Bug Tracking System. + # + # The Initial Developer of the Original Code is Netscape Communications + # Corporation. Portions created by Netscape are + # Copyright (C) 1998 Netscape Communications Corporation. All + # Rights Reserved. + # + # Contributor(s): Myk Melez + # Joel Peshkin + # Erik Stambaugh + # Marc Schumann + #%] + + + + + +[% IF Param("maxlocalattachment") %] + + + + +[% END %] +[% IF Param("allow_attach_url") %] + + + + +[% END %] + + + + + + + + + + + + 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 # Ville Skyttä # Shane H. W. Travis + # Marc Schumann #%] [% 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(); + } +} + --> -
+ @@ -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() { [% END %] +
+ + + + [% IF UserInGroup('editbugs') %] [% IF use_keywords %] diff --git a/template/en/default/global/messages.html.tmpl b/template/en/default/global/messages.html.tmpl index 6730e8835..bb8a08fdd 100644 --- a/template/en/default/global/messages.html.tmpl +++ b/template/en/default/global/messages.html.tmpl @@ -100,6 +100,12 @@ The user account [% otheruser.login FILTER html %] has been deleted successfully. + [% ELSIF message_tag == "attachment_creation_failed" %] + The [% terms.bug %] was created successfully, but attachment creation + failed. + Please add your attachment by clicking the "Create a New Attachment" link + below. + [% ELSIF message_tag == "buglist_adding_field" %] [% title = "Adding field to search page..." %] [% link = "Click here if the page does not redisplay automatically." %] -- cgit v1.2.3-24-g4f1b
- Enter the path to the file on your computer.
- -
BigFile: - - -
- URL to be attached instead.
- -
- Describe the attachment briefly.
- -
-
Content Type: - If the attachment is a patch, check the box below.
- -

+ [% PROCESS attachment/createformcontents.html.tmpl %] - Otherwise, choose a method for determining the content type.
- -
- - -
- - - -
Privacy: - If the attachment is private, check the box below.
- - -
Obsoletes: @@ -237,14 +77,6 @@
- [% IF flag_types.size > 0 %] - [% PROCESS "flag/list.html.tmpl" bug_id=bugid attach_id=attachid %]
- [% END %] -
@@ -259,6 +91,17 @@ %]
Privacy: + If the attachment is private, check the box below.
+ + +
 
: + Enter the path to the file on your computer.
+ +
BigFile: + + +
: + URL to be attached instead.
+ +
: + Describe the attachment briefly.
+ +
Content Type: + If the attachment is a patch, check the box below.
+ +

+ + Otherwise, choose a method for determining the content type.
+ +
+ + : +
+ + : + +
+ [% IF flag_types && flag_types.size > 0 %] + [% PROCESS "flag/list.html.tmpl" bug_id=bugid attach_id=attachid %]
+ [% END %] +
Attachment: + +
+ Add an attachment + + [% PROCESS attachment/createformcontents.html.tmpl %] +
+
+ +