Index: lams_admin/conf/language/lams/ApplicationResources.properties =================================================================== diff -u -r2062745d4734a2543b83d689762d932d7dcbc0db -r5a724cb4b6c1d9ac1c533e5128b37d00143f1f85 --- lams_admin/conf/language/lams/ApplicationResources.properties (.../ApplicationResources.properties) (revision 2062745d4734a2543b83d689762d932d7dcbc0db) +++ lams_admin/conf/language/lams/ApplicationResources.properties (.../ApplicationResources.properties) (revision 5a724cb4b6c1d9ac1c533e5128b37d00143f1f85) @@ -95,7 +95,7 @@ admin.user.actions =Actions admin.user.import =Import users admin.list.disabled.users =List disabled accounts -label.excel.spreadsheet =Upload spreadsheet +label.excel.spreadsheet =File label.spreadsheet =spreadsheet label.download.template =Download the template role.AUTHOR =Author @@ -528,6 +528,8 @@ admin.user.changePassword =Change password config.show.timezone.warning =Show warning when user's LAMS timezone does not match their computer/device. label.password.must.lcase =at least 1 lower case letter - - +button.select.importfile =Select file to import +label.upload.info =Uploaded file must be an Excel file and not exceed size of {0} +errors.maxfilesize =Uploaded file exceeded maximum size: {0} +error.attachment.not.xls =File is not an Excel .xls file. #======= End labels: Exported 527 labels for en AU ===== Index: lams_admin/conf/language/lams/ApplicationResources_en_AU.properties =================================================================== diff -u -r5d62f3e3ddf8ecead3be4c6bcabfa9a6d1596f20 -r5a724cb4b6c1d9ac1c533e5128b37d00143f1f85 --- lams_admin/conf/language/lams/ApplicationResources_en_AU.properties (.../ApplicationResources_en_AU.properties) (revision 5d62f3e3ddf8ecead3be4c6bcabfa9a6d1596f20) +++ lams_admin/conf/language/lams/ApplicationResources_en_AU.properties (.../ApplicationResources_en_AU.properties) (revision 5a724cb4b6c1d9ac1c533e5128b37d00143f1f85) @@ -95,7 +95,7 @@ admin.user.actions =Actions admin.user.import =Import users admin.list.disabled.users =List disabled accounts -label.excel.spreadsheet =Upload spreadsheet +label.excel.spreadsheet =File label.spreadsheet =spreadsheet label.download.template =Download the template role.AUTHOR =Author Index: lams_admin/web/import/importGroups.jsp =================================================================== diff -u -rb37f7b42698f0aa6bd5b346a8e9bb4085964c0a7 -r5a724cb4b6c1d9ac1c533e5128b37d00143f1f85 --- lams_admin/web/import/importGroups.jsp (.../importGroups.jsp) (revision b37f7b42698f0aa6bd5b346a8e9bb4085964c0a7) +++ lams_admin/web/import/importGroups.jsp (.../importGroups.jsp) (revision 5a724cb4b6c1d9ac1c533e5128b37d00143f1f85) @@ -2,22 +2,43 @@ <%@ page import="org.lamsfoundation.lams.admin.service.IImportService" %> <%@ page import="java.util.List" %> <%@ page import="org.lamsfoundation.lams.usermanagement.OrganisationType" %> +<%@ page import="org.lamsfoundation.lams.util.Configuration"%> +<%@ page import="org.lamsfoundation.lams.util.ConfigurationKeys"%> +<%@ page import="org.lamsfoundation.lams.util.FileValidatorUtil" %> - + + +<%=Configuration.get(ConfigurationKeys.UPLOAD_FILE_LARGE_MAX_SIZE)%> +<%=FileValidatorUtil.formatSize(Configuration.getAsInt(ConfigurationKeys.UPLOAD_FILE_LARGE_MAX_SIZE))%> +<%=Configuration.get(ConfigurationKeys.EXE_EXTENSIONS)%> + + + + + + function verifyAndSubmit() { + if ( "undefined" === typeof bCancel || ! bCancel ) { + var fileSelect = document.getElementById('file'); + var files = fileSelect.files; + if (files.length == 0) { + clearFileError(); + showFileError(''); + return false; + } else { + var file = files[0]; + if ( ! validateShowErrorSpreadsheetType(file, '', false) + || ! validateShowErrorFileSize(file, '${UPLOAD_FILE_MAX_SIZE}', '') ) { + return false; + } + } + document.getElementById('fileUpload_Busy').style.display = ''; + } + } +

- -
@@ -68,15 +89,12 @@

- + - - - - - -
+ + +
  Index: lams_admin/web/import/importexcel.jsp =================================================================== diff -u -rb4832c8bcb4683af57e8aaad5612e193af6f3ef0 -r5a724cb4b6c1d9ac1c533e5128b37d00143f1f85 --- lams_admin/web/import/importexcel.jsp (.../importexcel.jsp) (revision b4832c8bcb4683af57e8aaad5612e193af6f3ef0) +++ lams_admin/web/import/importexcel.jsp (.../importexcel.jsp) (revision 5a724cb4b6c1d9ac1c533e5128b37d00143f1f85) @@ -2,18 +2,46 @@ <%@ page import="org.lamsfoundation.lams.admin.service.IImportService"%> <%@ page import="org.lamsfoundation.lams.util.Configuration"%> <%@ page import="org.lamsfoundation.lams.util.ConfigurationKeys"%> +<%@ page import="org.lamsfoundation.lams.util.FileValidatorUtil" %> + + <%=Configuration.get(ConfigurationKeys.PASSWORD_POLICY_MINIMUM_CHARACTERS)%> <%=Configuration.get(ConfigurationKeys.PASSWORD_POLICY_UPPERCASE)%> <%=Configuration.get(ConfigurationKeys.PASSWORD_POLICY_LOWERCASE)%> <%=Configuration.get(ConfigurationKeys.PASSWORD_POLICY_NUMERICS)%> <%=Configuration.get(ConfigurationKeys.PASSWORD_POLICY_SYMBOLS)%> +<%=Configuration.get(ConfigurationKeys.UPLOAD_FILE_LARGE_MAX_SIZE)%> +<%=FileValidatorUtil.formatSize(Configuration.getAsInt(ConfigurationKeys.UPLOAD_FILE_LARGE_MAX_SIZE))%> +<%=Configuration.get(ConfigurationKeys.EXE_EXTENSIONS)%> + + + + + +

+ enctype="multipart/form-data" onsubmit="return goToStatus();"> - - - - - -
+ + +

Index: lams_admin/web/import/status.jsp =================================================================== diff -u -r2fab2e212d7c46f61829635d0834821eb5484837 -r5a724cb4b6c1d9ac1c533e5128b37d00143f1f85 --- lams_admin/web/import/status.jsp (.../status.jsp) (revision 2fab2e212d7c46f61829635d0834821eb5484837) +++ lams_admin/web/import/status.jsp (.../status.jsp) (revision 5a724cb4b6c1d9ac1c533e5128b37d00143f1f85) @@ -5,36 +5,26 @@ - + - - -
-
-

-

- : -

- - - -

 

- -
-

-

+ <% Integer importTotal = (Integer)SessionManager.getSession().getAttribute(IImportService.STATUS_IMPORT_TOTAL); Integer imported = (Integer)SessionManager.getSession().getAttribute(IImportService.STATUS_IMPORTED); @@ -44,12 +34,22 @@ progress = (new Float(percent)).toString(); progress = (progress.length() >= 5 ? progress.substring(0,5) : progress); } catch (Exception e) {} - if (progress.length()>0) out.println(progress+" % completed..."); + out.println((progress.length()>0?progress:"0")+"% completed..."); %> -
- + + + + + + +
+

+

${progressMessage}

-
+ + + + \ No newline at end of file