aboutsummaryrefslogtreecommitdiff
path: root/qc_app/templates/index.html
blob: 18eb7845541315986db211ddaa8cc2d79b08fd6b (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
{%extends "base.html"%}

{%block title%}Upload File{%endblock%}

{%block contents%}
<h1 class="heading">upload file</h1>

<form action="{{url_for('entry.upload_file')}}"
      method="POST" enctype="multipart/form-data">
  {%with messages = get_flashed_messages(with_categories=True) %}
  {%if messages %}
  <div class="alerts">
    {%for category, message in messages %}
    <span class="alert {{category}}">{{message}}</span>
    {%endfor%}
  </div>
  {%endif%}
  {%endwith%}

  <fieldset>
    <legend>file type</legend>

    <input type="radio" name="filetype" value="average" id="filetype_average"
	   required="required" />
    <label for="filetype_average">average</label>

    <input type="radio" name="filetype" value="standard-error"
	   id="filetype_standard_error" required="required" />
    <label for="filetype_standard_error">standard error</label>
  </fieldset>

  <label for="file_upload">select file</label>
  <input type="file" name="qc_text_file" id="file_upload"
	 accept="text/tab-separated-values, application/zip" />

  <input type="submit" value="upload file" class="btn btn-main" />
</form>

<div id="progress-indicator" class="hidden">
  <h3>Uploading file</h3>
  <p id="progress-filename">the-file</p>
  <progress id="progress-bar" value="0" max="100">
    0
  </progress>
  <p id="progress-text">Uploading 0%</p>
  <p id="progress-extra-text">Processing</p>
</div>
{%endblock%}


{%block javascript%}
<script type="text/javascript" src="static/js/upload_progress.js"></script>
<script type="text/javascript">
  setup_upload_handlers();
</script>
{%endblock%}