Commit ae92fc16 authored by Sunil Joshi's avatar Sunil Joshi Committed by Frédéric Buclin

Bug 532478: When attaching a file to a bug, display the max size allowed for attachments

r/a=LpSolit
parent aade844e
...@@ -6,6 +6,8 @@ ...@@ -6,6 +6,8 @@
# defined by the Mozilla Public License, v. 2.0. # 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"> <tr class="attachment_data">
<th><label for="data">File</label>:</th> <th><label for="data">File</label>:</th>
<td> <td>
...@@ -14,6 +16,7 @@ ...@@ -14,6 +16,7 @@
javascript:TUI_toggle_class('attachment_data')" javascript:TUI_toggle_class('attachment_data')"
>paste text as attachment</a>).<br> >paste text as attachment</a>).<br>
<input type="file" id="data" name="data" size="50" onchange="DataFieldHandler()"> <input type="file" id="data" name="data" size="50" onchange="DataFieldHandler()">
<br><em>(File size limit: [% max_limit FILTER html %] KB)</em>
</td> </td>
</tr> </tr>
<tr class="attachment_text_field"> <tr class="attachment_text_field">
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment