forked from glrodasz/questionr
/
index.html
55 lines (51 loc) · 1.99 KB
/
index.html
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
<!doctype html>
<html lang="en">
<head>
<meta charset="utf-8">
<title>Questions</title>
</head>
<body>
<main class="container">
<div class="question panel panel-default">
<div class="question__content"></div>
<div class="question__footer panel-footer clearfix">
<span class="question__footer__counter"></span>
<div class="question__footer__buttons-container">
<button id="prev-button" class="prev question-btn question-btn--warning btn">Prev</button>
<button id="next-button" class="next question-btn question-btn--success btn">Next</button>
<button id="finish-button" class="finish question-btn question-btn--finish btn">Finish</button>
</div>
</div>
</div>
</main>
<script type="text/template" id="question-template" class="template">
<div class="panel-heading question__content__heading"
<% if (image != null) { %>
style="background: url('<%= image %>') center center no-repeat;
background-size: cover;"
<% } %>>
<h2 class="question__content__heading__title"><%= description %></h2>
</div>
<div class="panel-body question__content__body">
<% _.each( answersList.toJSON(), function( answer ){ %>
<% if (multiple) { %>
<div class="checkbox">
<label>
<input data-id="<%= answer.cid %>" class="question-answers__input" type="checkbox" value="<%= answer.value %>" <% if (answer.checked) { %>checked<% } %>>
<span class="question__content__body__text"><%= answer.description %></span>
</label>
</div>
<% } else {%>
<div class="radio">
<label>
<input data-id="<%= answer.cid %>" class="question-answers__input" name="<%= name %>" type="radio" value="<%= answer.value %>" <% if (answer.checked) { %>checked<% } %>>
<span class="question__content__body__text"><%= answer.description %></span>
</label>
</div>
<% } %>
<% }); %>
</div>
</script>
<script src="dist/main.js"></script>
</body>
</html>