aboutsummaryrefslogtreecommitdiff
path: root/qc_app/templates/index.html
blob: 74e46943503b582ee35c588f718bd1fe0e3721ef (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
57
58
59
60
61
62
63
64
{%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" class="form-col-1" />
    <label for="filetype_average" class="form-col-2">average</label>

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

  <fieldset>
    <label for="file_upload" class="form-col-1">select file</label>
    <input type="file" name="qc_text_file" id="file_upload"
	   accept="text/plain, text/tab-separated-values, application/zip"
	   class="form-col-2"/>
  </fieldset>

  <fieldset>
    <input type="submit" value="upload file" class="btn btn-main form-col-2" />
  </fieldset>
</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%}