Skip to content

Commit

Permalink
Fixing focus on add templates that triggers an error when no id for l…
Browse files Browse the repository at this point in the history
…abel isnt set
  • Loading branch information
omji committed Dec 11, 2017
1 parent 4ec3eed commit bc49520
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion setup.py
Expand Up @@ -15,7 +15,7 @@

setup(
name='django-tabbed-admin',
version='1.0.2',
version='1.0.3',
author='Guillaume Pousseo',
author_email='guillaumepousseo@revsquare.com',
description='Easily add tabs to django admin forms.',
Expand Down
2 changes: 1 addition & 1 deletion tabbed_admin/templates/tabbed_admin/change_form.html
Expand Up @@ -92,7 +92,7 @@

{% block submit_buttons_bottom %}{% submit_row %}{% endblock %}

{% if adminform and add %}
{% if adminform and add and adminform.first_field and adminform.first_field.id_for_label %}
<script type="text/javascript">document.getElementById("{{ adminform.first_field.id_for_label }}").focus();</script>
{% endif %}

Expand Down

0 comments on commit bc49520

Please sign in to comment.