Commits

adr...@bcc190cf-cafb-0310-a4f2-bffc1f526a37  committed c53d318

Fixed #2410 -- Added HTML ID attribute to <form> on admin change-list pages, for easy targetting with JavaScript and CSS

  • Participants
  • Parent commits 03128c5

Comments (0)

Files changed (1)

File django/contrib/admin/templates/admin/change_form.html

   {% if has_absolute_url %}<li><a href="../../../r/{{ content_type_id }}/{{ object_id }}/" class="viewsitelink">{% trans "View on site" %}</a></li>{% endif%}
   </ul>
 {% endif %}{% endif %}
-<form {% if has_file_field %}enctype="multipart/form-data" {% endif %}action="{{ form_url }}" method="post">{% block form_top %}{% endblock %}
+<form {% if has_file_field %}enctype="multipart/form-data" {% endif %}action="{{ form_url }}" method="post" id="{{ opts.module_name }}_form">{% block form_top %}{% endblock %}
 <div>
 {% if is_popup %}<input type="hidden" name="_popup" value="1" />{% endif %}
 {% if opts.admin.save_on_top %}{% submit_row %}{% endif %}