Refactor exam question fragment to reposition flag button within the button row for improved layout and accessibility during HTMX updates.
This commit is contained in:
@@ -1,6 +1,5 @@
|
|||||||
<div class="exam-question-fragment">
|
<div class="exam-question-fragment">
|
||||||
<!-- Flag button lives inside the fragment so it updates together with other question controls -->
|
<!-- Flag button lives inside the fragment so it updates together with other question controls -->
|
||||||
{% include 'physics/partials/exam_flag_button.html' %}
|
|
||||||
<form method="POST" class="post-form"
|
<form method="POST" class="post-form"
|
||||||
hx-post="{% if cid %}{% url 'physics:exam_take' pk=exam.pk sk=pos cid=cid passcode=passcode %}{% else %}{% url 'physics:exam_take_user' pk=exam.pk sk=pos %}{% endif %}"
|
hx-post="{% if cid %}{% url 'physics:exam_take' pk=exam.pk sk=pos cid=cid passcode=passcode %}{% else %}{% url 'physics:exam_take_user' pk=exam.pk sk=pos %}{% endif %}"
|
||||||
hx-target="#question-fragment" hx-swap="innerHTML">
|
hx-target="#question-fragment" hx-swap="innerHTML">
|
||||||
@@ -57,6 +56,8 @@
|
|||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div class="mt-2">
|
<div class="mt-2">
|
||||||
|
<div class="d-flex align-items-center justify-content-between">
|
||||||
|
<div class="btn-row">
|
||||||
{% if previous > -1 %}
|
{% if previous > -1 %}
|
||||||
<button type="submit" name="previous" class="save btn btn-secondary" title="Click to save your answer(s) and go to the previous question" onclick="try{ window.currentQuestionPos = {{ previous }}; if(typeof updateQuestionMenu==='function') updateQuestionMenu(); }catch(e){}">Previous</button>
|
<button type="submit" name="previous" class="save btn btn-secondary" title="Click to save your answer(s) and go to the previous question" onclick="try{ window.currentQuestionPos = {{ previous }}; if(typeof updateQuestionMenu==='function') updateQuestionMenu(); }catch(e){}">Previous</button>
|
||||||
{% endif %}
|
{% endif %}
|
||||||
@@ -80,6 +81,12 @@
|
|||||||
<button type="submit" id="overview-button" name="finish" class="save btn btn-default" title="Click to go to the overview page (your answers will be saved).">Overview</button>
|
<button type="submit" id="overview-button" name="finish" class="save btn btn-default" title="Click to go to the overview page (your answers will be saved).">Overview</button>
|
||||||
<button type="submit" id="goto-button" value="test" name="goto" class="hide">goto</button>
|
<button type="submit" id="goto-button" value="test" name="goto" class="hide">goto</button>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
<div class="flag-container ms-3">
|
||||||
|
{% include 'physics/partials/exam_flag_button.html' %}
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
</form>
|
</form>
|
||||||
|
|
||||||
<script>
|
<script>
|
||||||
|
|||||||
Reference in New Issue
Block a user