Skip to content

Commit

Permalink
Merge pull request #38 from Hackathon2020/hotfix-overview
Browse files Browse the repository at this point in the history
overview should work again
  • Loading branch information
jobleier committed Mar 22, 2020
2 parents bf40fbe + 929bb8b commit cb6c881
Showing 1 changed file with 4 additions and 26 deletions.
30 changes: 4 additions & 26 deletions project/flaskr/templates/questionnair/page.html
Original file line number Diff line number Diff line change
Expand Up @@ -103,31 +103,9 @@ <h1>Überblick</h1>
<div class="row qr-container justify-content-center align-items-center qrcode" id="qrcode">
</div>

</div> <!-- page_2 -->
<div class="page" id=page_19>
<!-- TODO: Get overview from Answers -->
<div class="header">
<p>Formular akzeptieren?</p>
</div>
<div class="content-container jumbotron overflow-auto" style="height: 80vh;">
{% for question in questions %}
<div class="displayBlock">
<hr>
<p><b>{{question.question_text}}</b><br/>Placeholder</p>
</div>
{% endfor %}

<div class="displayBlock">
<hr>
</div>
</div>
<div class="buttons">
<button class="buttonNo"><i class="fas fa-times"></i></button>
<button class="buttonYes"><i class="fas fa-check"></i></button>
</div>
</div>
</div>
</div> <!-- container -->
</div> <!-- background-container>
</div> <!-- background-container-->

<!-- Navigation through the pages -->
<script>
Expand All @@ -146,7 +124,7 @@ <h1>Überblick</h1>
document.questionaire = JSON.parse(questionaire_json.split('&#34;').join('"'))

document.page_number = 0
document.max_page_number = {{questions | length}} + 3//document.getElementsByClassName("page").length - 2
document.max_page_number = document.getElementsByClassName("page").length - 2
function hideCurrentPage() {
document.getElementById("page_" + document.page_number).style.display = "none"
}
Expand All @@ -158,7 +136,7 @@ <h1>Überblick</h1>

showCurrentPage()
document.getElementById("nextButton").onclick = function(){
if (document.page_number <= document.max_page_number) {
if (document.page_number < document.max_page_number) {
hideCurrentPage()
document.page_number += 1
if (document.max_page_number === document.page_number) {
Expand Down

0 comments on commit cb6c881

Please sign in to comment.