add_stimuli.html 1.41 KB
Newer Older
Timo Heikkilä's avatar
Timo Heikkilä committed
1
2
3
4
5
6
7
8
9
10
11
12
{% extends "base.html" %}
{% block content %}
<h1 class="container mt-5 display-4 text-center"><br>Add more stimuli:</h1>
<br>
<p class="lead"></p>
  {% from "_formhelpers.html" import render_field %}
  <form  id="EditPageForm" action="" method="POST" role="form" enctype="multipart/form-data">
  {% if stimulus_type == 'text' %}
    <div class="form-group">
    <legend>Paste the new texts to the textarea and mark the end of each stimulus with a /n. Do not place the marker at the end of the last text. Example: Text1/n Text2/n Text3</legend>
    <textarea class="form-control" rows="10" id="text" name="text"></textarea>
    </div>
Timo Heikkilä's avatar
Timo Heikkilä committed
13
14
  {% endif %}
  {% if stimulus_type == 'video' or stimulus_type == 'audio' or stimulus_type == 'picture'  %}
Timo Heikkilä's avatar
Timo Heikkilä committed
15
16
17
18
19
20
    <div class="input-group mb-3">
    <legend>Add files:</legend>
    <div class="input-group-prepend">
    <span class="input-group-text">Upload:</span>
    </div>
    <div class="custom-file">
Timo Heikkilä's avatar
Timo Heikkilä committed
21
    <input type="file" class="custom-file-input" id="file" name="file" accept="audio/*,image/*, .mp4" multiple> 
22
23
24

    <!-- TODO add hidden type field  { stimulus_type } else this will be None!! -->

Timo Heikkilä's avatar
Timo Heikkilä committed
25
26
27
    <label class="custom-file-label" for="upload_file">Choose file</label>
    </div>
    </div>
Timo Heikkilä's avatar
Timo Heikkilä committed
28
29
30
  {% endif %}
  

Timo Heikkilä's avatar
Timo Heikkilä committed
31
32
33
34
35
36
37
   <br>  
   <button type="submit" class="btn btn-primary">Submit</button>
   <a class="btn btn-primary" href="{{ request.referrer }}" role="button">Cancel</a>
</form>
{% endblock %}