handle ajax error when file uploaded #397

ajax error didn't trigger bedita error message due to a jQuery object undefined in ajax_error.tpl when file was uploaded