summaryrefslogtreecommitdiffstats
path: root/template/en/default/global
diff options
context:
space:
mode:
authorFrédéric Buclin <LpSolit@gmail.com>2010-07-08 18:58:33 +0200
committerFrédéric Buclin <LpSolit@gmail.com>2010-07-08 18:58:33 +0200
commit3c61e66fe3d24f183628a7396a3fcd720a95abeb (patch)
tree8745d0af24240755abea97ea45469715d813c803 /template/en/default/global
parent3c64c526467444023b172c6c299aed34e9687ec0 (diff)
downloadbugzilla-3c61e66fe3d24f183628a7396a3fcd720a95abeb.tar.gz
bugzilla-3c61e66fe3d24f183628a7396a3fcd720a95abeb.tar.xz
Bug 490930: Always store attachments locally if they are over X size (and below some threshold!), don't ever display "Big File" checkbox
r=mkanat a=LpSolit
Diffstat (limited to 'template/en/default/global')
-rw-r--r--template/en/default/global/code-error.html.tmpl6
-rw-r--r--template/en/default/global/user-error.html.tmpl20
2 files changed, 7 insertions, 19 deletions
diff --git a/template/en/default/global/code-error.html.tmpl b/template/en/default/global/code-error.html.tmpl
index 177d47621..43644f703 100644
--- a/template/en/default/global/code-error.html.tmpl
+++ b/template/en/default/global/code-error.html.tmpl
@@ -37,11 +37,7 @@
[% DEFAULT title = "Internal Error" %]
[% error_message = BLOCK %]
- [% IF error == "attachment_local_storage_disabled" %]
- [% title = "Local Storage Disabled" %]
- You cannot store attachments locally. This feature is disabled.
-
- [% ELSIF error == "attachment_url_disabled" %]
+ [% IF error == "attachment_url_disabled" %]
[% title = "Attachment URL Disabled" %]
You cannot attach a URL. This feature is currently disabled.
diff --git a/template/en/default/global/user-error.html.tmpl b/template/en/default/global/user-error.html.tmpl
index b57792fd2..490941807 100644
--- a/template/en/default/global/user-error.html.tmpl
+++ b/template/en/default/global/user-error.html.tmpl
@@ -574,9 +574,13 @@
[% ELSIF error == "file_too_large" %]
[% title = "File Too Large" %]
+ [%# Convert maxlocalattachment from Mb to Kb %]
+ [% max_local = Param('maxlocalattachment') * 1024 %]
+ [% max_limit = [Param('maxattachmentsize'), max_local] %]
The file you are trying to attach is [% filesize FILTER html %]
- kilobytes (KB) in size. Non-patch attachments cannot be more than
- [%+ Param('maxattachmentsize') %] KB. <br>
+ kilobytes (KB) in size. Attachments cannot be more than
+ [%# Hack to get the max value between both limits %]
+ [%+ max_limit.nsort.last FILTER html %] KB. <br>
We recommend that you store your attachment elsewhere
[% IF Param("allow_attach_url") %]
and then specify the URL to this file on the attachment
@@ -1023,11 +1027,6 @@
[% title = "Invalid Keyword Name" %]
You may not use commas or whitespace in a keyword name.
- [% ELSIF error == "local_file_too_large" %]
- [% title = "Local File Too Large" %]
- Local file uploads must not exceed
- [% Param('maxlocalattachment') %] MB in size.
-
[% ELSIF error == "login_needed_for_password_change" %]
[% title = "Login Name Required" %]
You must enter a login name when requesting to change your password.
@@ -1312,13 +1311,6 @@
The password must be at least
[%+ constants.USER_PASSWORD_MIN_LENGTH FILTER html %] characters long.
- [% ELSIF error == "patch_too_large" %]
- [% title = "File Too Large" %]
- The file you are trying to attach is [% filesize FILTER html %]
- kilobytes (KB) in size.
- Patches cannot be more than [% Param('maxattachmentsize') %] KB in size.
- Try splitting your patch into several pieces.
-
[% ELSIF error == "product_access_denied" %]
Either the product
[%+ IF id.defined %]