diff --git a/CHANGELOG.md b/CHANGELOG.md index 674c8907e8..c8ca3d4167 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,13 +1,12 @@ # Zanata change log summary -## zanata-3.1.0 - * Add descriptions on project type selectors - ## zanata-3.0.0 + * Add descriptions on project type selectors * Allow adapter parameters to be set on source document upload * Add attention key shortcut: Alt+X * Add attention shortcut to copy from source: Alt+X,G * Move raw document storage to file system + * Implement virus scanning using ClamAV (clamdscan) ## zanata-2.3.1 * Bug fixes: diff --git a/zanata-war/src/main/resources/messages.properties b/zanata-war/src/main/resources/messages.properties index 63f1f89432..1800717ab4 100644 --- a/zanata-war/src/main/resources/messages.properties +++ b/zanata-war/src/main/resources/messages.properties @@ -316,6 +316,7 @@ jsf.iteration.files.DocumentDeleted=Document succesfully deleted. jsf.iteration.files.ProcessDlgTitle=Processing project files... jsf.iteration.files.UploadDocument=Upload Document +jsf.iteration.files.FilenameWithSemicolonNotSupported=Zanata does not support filenames that contain a semicolon. jsf.SupportedUploadFormats=Supported types: .pot .dtd .txt .odt .fodt .odp .fodp .ods .fods .odg .fodg .odb .odf jsf.SourceLanguage=Source Language jsf.iteration.files.DocumentPath=Document Path diff --git a/zanata-war/src/main/webapp/iteration/source_files.xhtml b/zanata-war/src/main/webapp/iteration/source_files.xhtml index 121aabdabb..a8bafd02e7 100644 --- a/zanata-war/src/main/webapp/iteration/source_files.xhtml +++ b/zanata-war/src/main/webapp/iteration/source_files.xhtml @@ -51,8 +51,18 @@ } function checkIfGeneralFileSelected() { - checkIfFileSelected(#{rich:element('generalDocFileUpload')}, - #{rich:element('generalDocSubmitUploadButton')}); + var fileInput = #{rich:element('generalDocFileUpload')}; + var submitButton = #{rich:element('generalDocSubmitUploadButton')}; + var errorMessage = document.getElementById('invalidFilenameError'); + checkIfFileSelected(fileInput, submitButton); + var fileName = fileInput.value; + var hasSemicolon = fileName !== undefined && fileName.lastIndexOf(';') !== -1; + if (hasSemicolon) { + errorMessage.style.display = ''; + submitButton.disabled = true; + } else { + errorMessage.style.display = 'none'; + } } @@ -300,21 +310,28 @@ onchange="checkIfGeneralFileSelected();" data="#{projectIterationFilesAction.documentFileUpload.fileContents}" fileName="#{projectIterationFilesAction.documentFileUpload.fileName}"/> -
- - - -
- - - - -
+ +
+ + + +
+
+ + + + +