summaryrefslogtreecommitdiff
path: root/js/jquery.form.js
diff options
context:
space:
mode:
authorRobin Millette <millette@controlyourself.ca>2009-05-26 21:20:04 -0400
committerRobin Millette <millette@controlyourself.ca>2009-05-26 21:20:04 -0400
commitaf700ea27703bbec5aa1078a84f9fd44c0260322 (patch)
treea227167390948f5791b8190435fbb9cfdbd0bc38 /js/jquery.form.js
parent4edb1c6e0cfcaee256757ed20b4ff8d482158906 (diff)
Let's you upload a file with a notice and have it shown with other attachments.
Diffstat (limited to 'js/jquery.form.js')
-rw-r--r--js/jquery.form.js4
1 files changed, 2 insertions, 2 deletions
diff --git a/js/jquery.form.js b/js/jquery.form.js
index cb8b5a660..936b847ab 100644
--- a/js/jquery.form.js
+++ b/js/jquery.form.js
@@ -157,7 +157,7 @@ $.fn.ajaxSubmit = function(options) {
function fileUpload() {
var form = $form[0];
- if ($(':input[@name=submit]', form).length) {
+ if ($(':input[name=submit]', form).length) {
alert('Error: Form elements must not be named "submit".');
return;
}
@@ -570,7 +570,7 @@ $.fn.clearForm = function() {
$.fn.clearFields = $.fn.clearInputs = function() {
return this.each(function() {
var t = this.type, tag = this.tagName.toLowerCase();
- if (t == 'text' || t == 'password' || tag == 'textarea')
+ if (t == 'file' || t == 'text' || t == 'password' || tag == 'textarea')
this.value = '';
else if (t == 'checkbox' || t == 'radio')
this.checked = false;