]> git.ipfire.org Git - thirdparty/bugzilla.git/commitdiff
Bug 532478: When attaching a file to a bug, display the max size allowed for attachments
authorSunil Joshi <joshi_sunil@in.com>
Sat, 13 Oct 2012 15:49:05 +0000 (17:49 +0200)
committerFrédéric Buclin <LpSolit@gmail.com>
Sat, 13 Oct 2012 15:49:05 +0000 (17:49 +0200)
r/a=LpSolit

template/en/default/attachment/createformcontents.html.tmpl

index c8016841cb60279df0f2ee924b5949643e382a21..48e4f4af0a228c280a6133514d915b333edb125b 100644 (file)
@@ -6,6 +6,8 @@
   # defined by the Mozilla Public License, v. 2.0.
   #%]
 
+[% max_local = Param('maxlocalattachment') * 1024 %]
+[% max_limit = Param('maxattachmentsize')> max_local ? Param('maxattachmentsize') : max_local %]
 <tr class="attachment_data">
   <th><label for="data">File</label>:</th>
   <td>
@@ -14,6 +16,7 @@
                                              javascript:TUI_toggle_class('attachment_data')"
     >paste text as attachment</a>).<br>
     <input type="file" id="data" name="data" size="50" onchange="DataFieldHandler()">
+    <br><em>(File size limit: [% max_limit FILTER html %] KB)</em>
   </td>
 </tr>
 <tr class="attachment_text_field">