summaryrefslogtreecommitdiffstats
path: root/template/en/default/attachment
diff options
context:
space:
mode:
authorKohei Yoshino <kohei.yoshino@gmail.com>2018-06-21 16:28:21 +0200
committerDylan William Hardison <dylan@hardison.net>2018-06-21 16:28:21 +0200
commit52100a9f4f2e5b5d3249934143fb9a7097f156f9 (patch)
tree54e797edabafd916669de10ae97b4fa4e952ee7c /template/en/default/attachment
parentfca89e2f4c4a0660d0ce8947f2de375ec20f124b (diff)
downloadbugzilla-52100a9f4f2e5b5d3249934143fb9a7097f156f9.tar.gz
bugzilla-52100a9f4f2e5b5d3249934143fb9a7097f156f9.tar.xz
Bug 1469333 - Check attachment file size client-side and inform user of too large file before uploading it
Diffstat (limited to 'template/en/default/attachment')
-rw-r--r--template/en/default/attachment/createformcontents.html.tmpl5
1 files changed, 3 insertions, 2 deletions
diff --git a/template/en/default/attachment/createformcontents.html.tmpl b/template/en/default/attachment/createformcontents.html.tmpl
index 41a02a913..61ddceac3 100644
--- a/template/en/default/attachment/createformcontents.html.tmpl
+++ b/template/en/default/attachment/createformcontents.html.tmpl
@@ -37,7 +37,8 @@
<em>Enter the path to the file on your computer</em> (or
<a id="attachment_data_controller">
paste text as attachment</a>).<br>
- <input type="file" id="data" name="data" size="50">
+ <input type="file" id="data" name="data" size="50" aria-errormessage="data-error" aria-invalid="false">
+ <div id="data-error" class="warning" aria-live="assertive"><div>
</td>
</tr>
<tr class="attachment_text_field">
@@ -69,7 +70,7 @@
[%# Reset this whenever the page loads so that the JS state is up to date %]
<script [% script_nonce FILTER none %]>
$(function() {
- $("#file").on("change", function() {
+ $("#data").on("change", function() {
DataFieldHandler();
// Fire event to keep take-bug in sync.
$("#ispatch").change();