Add hx-disabled-elt attribute to exam status buttons for improved user experience

This commit is contained in:
Ross
2025-10-20 23:11:31 +01:00
parent 07f121fb69
commit 132f3c48c9
2 changed files with 6 additions and 1 deletions
@@ -105,7 +105,7 @@
<input type="hidden" name="type" value="sbas" />
<input type="hidden" name="exam_id" value="{{ exam.pk }}" />
<div class="col-12 col-md-8 small text-muted">Select questions on the list above (checkboxes) then click one of the actions below.</div>
<div class="col-12 col-md-4 d-flex gap-2 justify-content-md-end">
<div class="col-12 col-md-8 d-flex gap-2 justify-content-md-end">
<button class="btn btn-sm btn-outline-success" type="submit" name="set_open_access" value="true" hx-include="input[name='selection']:checked">Set Open Access = True</button>
<button class="btn btn-sm btn-outline-danger" type="submit" name="set_open_access" value="false" hx-include="input[name='selection']:checked">Set Open Access = False</button>
<button class="btn btn-sm btn-secondary" type="button" data-bs-toggle="collapse" data-bs-target="#open-access-bulk">Close</button>
@@ -12,6 +12,8 @@
hx-target="#publish-results-status"
title="Click to unpublish results"
aria-label="Unpublish results"
hx-disabled-elt="this"
>Published</button>
{% else %}
<button
@@ -21,6 +23,7 @@
hx-target="#publish-results-status"
title="Click to publish results"
aria-label="Publish results"
hx-disabled-elt="this"
>Unpublished</button>
{% endif %}
</div>
@@ -40,6 +43,7 @@
hx-target="#exam-active-status"
title="Click to deactivate this exam"
aria-label="Deactivate exam"
hx-disabled-elt="this"
>Active</button>
{% else %}
<button
@@ -49,6 +53,7 @@
hx-target="#exam-active-status"
title="Click to activate this exam"
aria-label="Activate exam"
hx-disabled-elt="this"
>Inactive</button>
{% endif %}
</div>