Skip to content

Commit

Permalink
Don't show delete shortcut on add form
Browse files Browse the repository at this point in the history
  • Loading branch information
knyghty committed Jun 3, 2024
1 parent 681d961 commit aa8f79e
Showing 1 changed file with 7 additions and 5 deletions.
12 changes: 7 additions & 5 deletions django_admin_keyboard_shortcuts/templates/admin/change_form.html
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
{% block extra_shortcuts %}
{{ block.super }}
<section>
<h3>Change Form</h3>
<h3>{% if change %}Change{% else %}Add{% endif %} Form</h3>
<ul>
<li>
<div class="shortcut-description">Save and go to change list</div>
Expand All @@ -23,10 +23,12 @@ <h3>Change Form</h3>
<div class="shortcut-description">Save and continue editing</div>
<div class="shortcut-keys"><kbd class="alt">Alt</kbd> + <kbd>c</kbd></div>
</li>
<li>
<div class="shortcut-description">Delete</div>
<div class="shortcut-keys"><kbd class="alt">Alt</kbd> + <kbd>d</kbd></div>
</li>
{% if change %}
<li>
<div class="shortcut-description">Delete</div>
<div class="shortcut-keys"><kbd class="alt">Alt</kbd> + <kbd>d</kbd></div>
</li>
{% endif %}
</ul>
</section>
{% endblock extra_shortcuts %}

0 comments on commit aa8f79e

Please sign in to comment.