aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorFrédéric Buclin <LpSolit@gmail.com>2010-04-19 21:25:01 +0200
committerFrédéric Buclin <LpSolit@gmail.com>2010-04-19 21:25:01 +0200
commit702d430118ec7aaa70de10d30901dd3443875186 (patch)
treed78cf7b17ff225c3d8baecea4e7a1f598e2846e2
parentd26192f57f78ae55f51bfac72e4b275516acb940 (diff)
downloadbugs-702d430118ec7aaa70de10d30901dd3443875186.tar
bugs-702d430118ec7aaa70de10d30901dd3443875186.tar.gz
bugs-702d430118ec7aaa70de10d30901dd3443875186.tar.bz2
bugs-702d430118ec7aaa70de10d30901dd3443875186.tar.xz
bugs-702d430118ec7aaa70de10d30901dd3443875186.zip
Bug 560215: maxattachmentsize = 0 means that you cannot attach any file to bugs
r=mkanat a=LpSolit
-rw-r--r--template/en/default/admin/params/attachment.html.tmpl5
-rw-r--r--template/en/default/attachment/list.html.tmpl8
-rw-r--r--template/en/default/bug/create/create.html.tmpl2
3 files changed, 10 insertions, 5 deletions
diff --git a/template/en/default/admin/params/attachment.html.tmpl b/template/en/default/admin/params/attachment.html.tmpl
index 879aa65b1..e6f6cb778 100644
--- a/template/en/default/admin/params/attachment.html.tmpl
+++ b/template/en/default/admin/params/attachment.html.tmpl
@@ -66,9 +66,8 @@
maxattachmentsize => "The maximum size (in kilobytes) of attachments. " _
"$terms.Bugzilla will not accept attachments greater than this number " _
- "of kilobytes in size. To accept attachments of any size " _
- "(subject to the limitations of your server software), set this " _
- "value to zero.",
+ "of kilobytes in size. Setting this parameter to 0 will prevent " _
+ "attaching files to ${terms.bugs}.",
maxlocalattachment => "The maximum size (in megabytes) of attachments identified by " _
"the user as 'Big Files' to be stored locally on the webserver. " _
diff --git a/template/en/default/attachment/list.html.tmpl b/template/en/default/attachment/list.html.tmpl
index 53f20f236..89eef1836 100644
--- a/template/en/default/attachment/list.html.tmpl
+++ b/template/en/default/attachment/list.html.tmpl
@@ -19,6 +19,8 @@
# Frédéric Buclin <LpSolit@gmail.com>
#%]
+[% RETURN UNLESS attachments.size || Param("maxattachmentsize") %]
+
<script type="text/javascript">
<!--
function toggle_display(link) {
@@ -155,8 +157,10 @@ function toggle_display(link) {
[% END %]
</span>
[% END %]
- <a href="attachment.cgi?bugid=[% bugid %]&amp;action=enter">Add an attachment</a>
- (proposed patch, testcase, etc.)
+ [% IF Param("maxattachmentsize") %]
+ <a href="attachment.cgi?bugid=[% bugid %]&amp;action=enter">Add an attachment</a>
+ (proposed patch, testcase, etc.)
+ [% END %]
</td>
</tr>
</table>
diff --git a/template/en/default/bug/create/create.html.tmpl b/template/en/default/bug/create/create.html.tmpl
index 5db1eddf3..e983b611b 100644
--- a/template/en/default/bug/create/create.html.tmpl
+++ b/template/en/default/bug/create/create.html.tmpl
@@ -548,6 +548,7 @@ TUI_hide_default('expert_fields');
</tr>
[% END %]
+ [% IF Param("maxattachmentsize") %]
<tr>
<th>Attachment:</th>
<td colspan="3">
@@ -582,6 +583,7 @@ TUI_hide_default('expert_fields');
</script>
</td>
</tr>
+ [% END %]
</tbody>
<tbody class="expert_fields">