summaryrefslogtreecommitdiffstats
path: root/template/en/default/attachment/create.html.tmpl
blob: 180fc5c49e5f3b710c6e6de3ae88444460402545 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
[%# 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 <myk@mozilla.org>
  #                 Joel Peshkin <bugreport@peshkin.net>
  #                 Erik Stambaugh <erik@dasbistro.com>
  #                 Marc Schumann <wurblzap@gmail.com>
  #%]

[% PROCESS global/variables.none.tmpl %]

[%# Define strings that will serve as the title and header of this page %]
[% title = BLOCK %]Create New Attachment for [% terms.Bug %] #[% bugid %][% END %]
[% h1 = BLOCK %]Create New Attachment for
  [%+ "$terms.Bug $bugid" FILTER bug_link(bugid) FILTER none %][% END %]
[% h2 = BLOCK %][% bugsummary FILTER html %][% END %]

[% PROCESS global/header.html.tmpl
  title = title
  h1 = h1
  h2 = h2
  onload="setContentTypeDisabledState(document.entryform);"
  style_urls = [ 'skins/standard/create_attachment.css' ]
  javascript_urls = [ "js/attachment.js" ]
%]

<form name="entryform" method="post" action="attachment.cgi" enctype="multipart/form-data">
  <input type="hidden" name="bugid" value="[% bugid %]">
  <input type="hidden" name="action" value="insert">

  <table class="attachment_entry">
    [% PROCESS attachment/createformcontents.html.tmpl %]

    [%# Additional fields for attachments on existing bugs: %]
    <tr>
      <th>Obsoletes:</th>
      <td>
        <em>(optional) Check each existing attachment made obsolete by your new attachment.</em><br>
        [% IF attachments.size %]
          [% FOREACH attachment = attachments %]
            [% IF ((attachment.isprivate == 0) || (Param("insidergroup")
              && UserInGroup(Param("insidergroup")))) %]
              <input type="checkbox" id="[% attachment.id %]"
                   name="obsolete" value="[% attachment.id %]">
              <a href="attachment.cgi?id=[% attachment.id %]&amp;action=edit">[% attachment.id %]: [% attachment.description FILTER html %]</a><br>
            [% END %]
          [% END %]
        [% ELSE %]
            [no attachments can be made obsolete]
        [% END %]
      </td>
    </tr>

    [% IF (user.id != bugassignee_id) AND user.groups.editbugs %]
      <tr>
        <th>Reassignment:</th>
        <td>
          <em>If you want to assign this [% terms.bug %] to yourself,
              check the box below.</em><br>
          <input type="checkbox" id="takebug" name="takebug" value="1">
          <label for="takebug">take [% terms.bug %]</label>
        </td>
      </tr>
    [% END %]
    <tr>
      <th><label for="comment">Comment:</label></th>
      <td>
        <em>(optional) Add a comment about this attachment to the [% terms.bug %].</em><br>
        [% INCLUDE global/textarea.html.tmpl
          name    = 'comment'
          id      = 'comment'
          minrows = 6
          maxrows = 15
          cols    = constants.COMMENT_COLS
          wrap    = 'soft'
        %]
      </td>
    </tr>
    [% IF (Param("insidergroup") && UserInGroup(Param("insidergroup"))) %]
      <tr>
        <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" onClick="updateCommentPrivacy(this)">
        <label for="isprivate">Private</label>
        </td>
      </tr>
    [% END %]
    <tr>
      <th>&nbsp;</th>
      <td><input type="submit" value="Submit"></td>
    </tr>
  </table>

</form>

[% PROCESS global/footer.html.tmpl %]