Skip to content

Commit

Permalink
Focus the ticket picker view on page load
Browse files Browse the repository at this point in the history
  • Loading branch information
DragoonAethis committed Feb 25, 2023
1 parent 57c499d commit 57fdc06
Show file tree
Hide file tree
Showing 2 changed files with 18 additions and 0 deletions.
9 changes: 9 additions & 0 deletions templates/events/crew/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -13,4 +13,13 @@ <h1>{% translate "Need a new ticket?" %}</h1>
{% crispy form %}
</div>
</div>

<script>
addEventListener("DOMContentLoaded", (event) => {
var ticketPicker = document.getElementById('id_query');
if (ticketPicker) {
ticketPicker.focus();
}
});
</script>
{% endblock %}
9 changes: 9 additions & 0 deletions templates/events/crew/list.html
Original file line number Diff line number Diff line change
Expand Up @@ -31,4 +31,13 @@
</table>
</div>
</div>

<script>
addEventListener("DOMContentLoaded", (event) => {
var ticketPicker = document.getElementById('id_query');
if (ticketPicker) {
ticketPicker.focus();
}
});
</script>
{% endblock %}

0 comments on commit 57fdc06

Please sign in to comment.