Import - Export ⚙️ implementation for payroll

This commit is contained in:
gamonoid
2017-10-08 19:31:27 +02:00
parent ddb46d8443
commit 088817172f
11 changed files with 619 additions and 35 deletions

View File

@@ -40,20 +40,20 @@ function checkFileType (elementName, fileTypes) {
if (fileElement.value.lastIndexOf(".") > 0) {
fileExtension = fileElement.value.substring(fileElement.value.lastIndexOf(".") + 1, fileElement.value.length);
}
fileExtension = fileExtension.toLowerCase();
var allowed = fileTypes.split(",");
if (allowed.indexOf(fileExtension) < 0) {
fileElement.value = "";
alert('Selected file type is not supported');
clearFileElement(elementName);
return false;
}
return true;
}
function clearFileElement (elementName) {
@@ -76,4 +76,4 @@ function clearFileElement (elementName) {
</div>
<script type="text/javascript">document.body.style.overflow = 'hidden';</script>
</body>
</html>
</html>