Skip to content

Commit

Permalink
Ensure the default action when editing a delivery is "update" not "de…
Browse files Browse the repository at this point in the history
…lete"

Closes #250 on github.
  • Loading branch information
sde1000 committed Jun 16, 2023
1 parent 6942c11 commit 848aa9c
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions quicktill/tillweb/templates/tillweb/edit-delivery.html
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,13 @@
new stock items can be placed at appropriate places in the table.
{% endcomment %}
<form action="" method="post">{% csrf_token %}
{% comment %}
We add a hidden button at the start to be the default submit button
that will be used if the user hits "Enter"
{% endcomment %}
<button style="position: absolute; left: -9999px" tabindex="-1" type="submit" name="default_hack" value="submit_update">
</button>

{% for hidden_field in form.hidden_fields %}
{{ hidden_field }}
{% endfor %}
Expand Down

0 comments on commit 848aa9c

Please sign in to comment.