summaryrefslogtreecommitdiff
path: root/day9/task5/index.html
diff options
context:
space:
mode:
authorAndrew <saintruler@gmail.com>2019-07-08 00:58:50 +0400
committerAndrew <saintruler@gmail.com>2019-07-08 00:58:50 +0400
commita47e9946ba94b2c8b6d0f29f937e47f929d2edae (patch)
tree8c32462b42a6648dfe8e6e9a73f70e3ae749bcbd /day9/task5/index.html
parent5dc61e9d6a760e3a86b0bb459c0a628941069d95 (diff)
WIP: Добавлена кнопка для загрузки файлов.
Diffstat (limited to 'day9/task5/index.html')
-rw-r--r--day9/task5/index.html27
1 files changed, 17 insertions, 10 deletions
diff --git a/day9/task5/index.html b/day9/task5/index.html
index 036e6e1..84236b2 100644
--- a/day9/task5/index.html
+++ b/day9/task5/index.html
@@ -17,18 +17,25 @@
<table id="table"></table>
- <button type="button" class="newEntryBtn" id="newEntryBtn"
- onclick="showCreateForm()"
- onmouseenter="addNewRowOnHover()"
- onmouseleave="addNewRowOnEndHover()"
- > + </button>
-<!-- > <img src="/static/images/upload_icon.png" alt=""> </div>-->
-
- <form enctype="multipart/form-data" action="/api/upload" method="post">
- <input type="file" name="filename" accept="text/csv">
- <button type="submit">Submit</button>
+ <form action="/api/upload" method="post" enctype="multipart/form-data">
+ <input type="file" name="csvFile" id="csvFileInput"
+ accept="text/csv" style="display: none;"
+ onchange="form.submit()">
</form>
+ <button class="fixedButton uploadFileBtn" id="uploadFileBtn"
+ onmouseenter="uploadFileOnHover()"
+ onmouseleave="uploadFileOnEndHover()"
+ onclick="triggerUploadFile()">
+ </button>
+
+ <button class="fixedButton newEntryBtn" id="newEntryBtn"
+ onclick="showCreateForm()"
+ onmouseenter="addNewRowOnHover()"
+ onmouseleave="addNewRowOnEndHover()">
+ +
+ </button>
+
<script src="/static/js/main.js"></script>
<script src="/static/js/config.js"></script>