{
// Only add the upload capabilities for new item submissions
upload = div.addList("submit-upload-new", List.TYPE_FORM);
upload.setHead(T_head);
File file = upload.addItem().addFile("file");
file.setLabel(T_file);
file.setHelp(T_file_help);
file.setRequired();
// if no files found error was thrown by processing class, display it!
if (this.errorFlag==org.dspace.submit.step.UploadStep.STATUS_NO_FILES_ERROR)
{
file.addError(T_file_error);
}
// if an upload error was thrown by processing class, display it!
if (this.errorFlag == org.dspace.submit.step.UploadStep.STATUS_UPLOAD_ERROR)
{
file.addError(T_upload_error);
}
// if virus checking was attempted and failed in error then let the user know
if (this.errorFlag == org.dspace.submit.step.UploadStep.STATUS_VIRUS_CHECKER_UNAVAILABLE)
{
file.addError(T_virus_checker_error);
}
// if virus checking was attempted and a virus found then let the user know
if (this.errorFlag == org.dspace.submit.step.UploadStep.STATUS_CONTAINS_VIRUS)
{
file.addError(T_virus_error);
}
Text description = upload.addItem().addText("description");
description.setLabel(T_description);
description.setHelp(T_description_help);