Let's you upload a file with a notice and have it shown with other attachments.

This commit is contained in:
Robin Millette
2009-05-26 21:20:04 -04:00
parent 4edb1c6e0c
commit af700ea277
8 changed files with 91 additions and 13 deletions

View File

@@ -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;