29 lines
1.0 KiB
HTML

<!DOCTYPE html>
<html lang="zh">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>{{ scale.title }}</title>
<link rel="stylesheet" href="/static/styles.css">
</head>
<body>
<h1>{{ scale.title }}</h1>
<p>{{ scale.instructions }}</p>
<form action="/result/{{ scale_id }}" method="post">
{% for id, question in scale.questions.items() %}
<label for="{{ id }}">{{ id }}. {{ question }}</label>
<div class="scale-button">
{% for option in range(scale.range[0], scale.range[1]+1) %}
<input type="radio" id="{{ id }}_{{ option }}" name="{{ id }}" value="{{ option }}" {% if not ( 'optional'
in question and question.optional) %}required{% endif %}>
<label for="{{ id }}_{{ option }}">{{ option }}</label>
{% endfor %}
</div>
{% endfor %}
<input type="submit" value="提交">
</form>
</body>
</html>