|
@@ -109,14 +109,18 @@ function initLocalStorage() {
|
|
|
/**
|
|
|
* Funkcja pozwala na wyświetlenie okienka importu
|
|
|
*/
|
|
|
-function showViewUploadFile( event, headerTitle, enumType ) {
|
|
|
+function showViewUploadFile( event, headerTitle, enumType, csvFileExample ) {
|
|
|
event.preventDefault();
|
|
|
|
|
|
var enumType = enumType;
|
|
|
-
|
|
|
+ var csvFileExample = csvFileExample;
|
|
|
+ if( csvFileExample !== undefined) {
|
|
|
+ csvFileExample = '<div><a href="'+csvFileExample+'" title="Pobierz przykład" download target="_balnk">Pobierz przykład</a></div>';
|
|
|
+ }
|
|
|
swal({
|
|
|
title: 'Importuj plik csv',
|
|
|
input: 'file',
|
|
|
+ html: csvFileExample,
|
|
|
inputAttributes: {
|
|
|
'accept': 'text/csv',
|
|
|
'aria-label': 'Upload csv file'
|
|
@@ -177,7 +181,6 @@ function parseCsvFile( fileData, enumType ) {
|
|
|
return
|
|
|
}
|
|
|
|
|
|
-
|
|
|
// zapisanie danych
|
|
|
var responseSaveData = saveFormCsvFileAjaxAction(enumType);
|
|
|
|