new fields added but can't send video anymore
This commit is contained in:
@@ -25,6 +25,18 @@ required
|
||||
{% endif %}
|
||||
{%- endmacro %}
|
||||
|
||||
{% macro inputconfig(question) -%}
|
||||
{% if ("min" in question) %}
|
||||
min={{question["min"]}}
|
||||
{% endif %}
|
||||
{% if ("max" in question) %}
|
||||
max={{question["max"]}}
|
||||
{% endif %}
|
||||
{% if ("step" in question) %}
|
||||
step={{question["step"]}}
|
||||
{% endif %}
|
||||
{%- endmacro %}
|
||||
|
||||
{% macro input(name, value='', type='text', size=20) -%}
|
||||
<input type="{{ type }}" name="{{ name }}" value="{{
|
||||
value|e }}" size="{{ size }}">
|
||||
@@ -45,11 +57,12 @@ required
|
||||
</head>
|
||||
|
||||
<body>
|
||||
<div class="centercontent">
|
||||
<div class="container">
|
||||
<h2>Stimulus part</h2>
|
||||
{% if (stimulus_type == "single_video") %}
|
||||
{{ single_video(**stimulus_configuration) }}
|
||||
{% elif (False) %}
|
||||
{% elif (stimulus_type == "empty") %}
|
||||
|
||||
{% else %}
|
||||
<p>Error: Block {{ stimulus["type"] }} could not be loaded!</p>
|
||||
@@ -63,26 +76,65 @@ required
|
||||
{% if (questions[question]["type"] == "likert") %}
|
||||
<div class="likercontainer">
|
||||
<div class="likert">
|
||||
{{ questions[question]['text']}}
|
||||
{% for point in questions[question]["points"] %}
|
||||
<label><input name="likertscale" type="radio"
|
||||
<label>
|
||||
<input name="{{ questions[question]['name']}}" type="radio" id="{{ questions[question]['name'] }}"
|
||||
value="{{ questions[question]['points'][point]['value'] }}"
|
||||
{{required(questions[question])}} /><span>{{ questions[question]['points'][point]['text']
|
||||
}}</span></label>
|
||||
}}</span>
|
||||
</label>
|
||||
{% endfor %}
|
||||
</div>
|
||||
</div>
|
||||
|
||||
{% elif (questions[question]["type"] == "textinput") %}
|
||||
<div class="textarea-container">
|
||||
<label class="textarea-label" for="{{ questions[question]['name'] }}">Additional Feedback: </label>
|
||||
<textarea id="{{ questions[question]['name'] }}" name="{{ questions[question]['name'] }}" rows="6"
|
||||
<label class="textarea-label">
|
||||
{{ questions[question]['text']}}
|
||||
<textarea id="{{ questions[question]['name'] }}" name="{{ questions[question]['name'] }}" rows="6"
|
||||
cols="60" maxlength="{{ questions[question]['size'] }}"
|
||||
{{required(questions[question])}}></textarea>
|
||||
</label>
|
||||
</div>
|
||||
|
||||
{% elif (questions[question]["type"] == "dateinput") %}
|
||||
<label>
|
||||
{{ questions[question]['text']}}
|
||||
<input type="date" name="{{ questions[question]['name']}}" id="{{ questions[question]['name'] }}" {{required(questions[question])}}>
|
||||
</label>
|
||||
|
||||
{% elif (questions[question]["type"] == "numberinput") %}
|
||||
<label>
|
||||
{{ questions[question]['text']}}
|
||||
<input type="number" name="{{ questions[question]['name']}}" id="{{ questions[question]['name'] }}" {{inputconfig(questions[question])}} {{required(questions[question])}}>
|
||||
</label>
|
||||
|
||||
{% elif (questions[question]["type"] == "emailinput") %}
|
||||
<label>
|
||||
{{ questions[question]['text']}}
|
||||
<input type="email" name="{{ questions[question]['name']}}" id="{{ questions[question]['name'] }}" {{required(questions[question])}}>
|
||||
</label>
|
||||
|
||||
{% elif (questions[question]["type"] == "dropdowninput") %}
|
||||
<label>
|
||||
{{ questions[question]['text']}}
|
||||
<select name="{{ questions[question]['name']}}" {{required(questions[question])}}>
|
||||
<option value="" disabled selected>{{ questions[question]['defaulttext']}}</option>
|
||||
{% for point in questions[question]["points"] %}
|
||||
<option name="{{ point }}" id="{{ point }}"
|
||||
value="{{ questions[question]['points'][point]['value'] }}"
|
||||
{{required(questions[question])}}><span>{{ questions[question]['points'][point]['text']
|
||||
}}</span></option>
|
||||
|
||||
{% endfor %}
|
||||
</select>
|
||||
</label>
|
||||
|
||||
{% elif (questions[question]["type"] == "videoinput") %}
|
||||
<h2>Gib Feedback als Video</h2>
|
||||
<div class="centertext">
|
||||
|
||||
{{ questions[question]['text']}}
|
||||
<button type="button" class="videocontrols" id="buttonCamera" onclick="cameraButton()">
|
||||
<img id="buttonCameraIcon" src="{{ url_for('static', filename='icons/camera-icon.png')}}"
|
||||
alt="Camera Icon">
|
||||
@@ -91,7 +143,7 @@ required
|
||||
</div>
|
||||
<div class="spacer" aria-hidden="true" style="height:30px"></div>
|
||||
<div class="centertext">
|
||||
|
||||
|
||||
<button type="button" class="videocontrols" id="buttonRecord" style="display:none"
|
||||
onclick="recordButton()">
|
||||
<img id="buttonRecordIcon" src="{{ url_for('static', filename='icons/record-icon.png')}}"
|
||||
@@ -123,6 +175,7 @@ required
|
||||
</div>
|
||||
</form>
|
||||
</div>
|
||||
</div>
|
||||
</body>
|
||||
|
||||
</html>
|
||||
Reference in New Issue
Block a user