Commits

Luke Plant committed 6d8aefa

Added a 'name' attribute to the 'Save' button on admin change form

This makes it much easier/possible for testing tools e.g. twill to find
the 'Save' submit button.

  • Participants
  • Parent commits 69cd14b

Comments (0)

Files changed (1)

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

 {% if show_save_as_new %}<input type="submit" value="{% trans 'Save as new' %}" name="_saveasnew" {{ onclick_attrib }}/>{%endif%}
 {% if show_save_and_add_another %}<input type="submit" value="{% trans 'Save and add another' %}" name="_addanother" {{ onclick_attrib }} />{% endif %}
 {% if show_save_and_continue %}<input type="submit" value="{% trans 'Save and continue editing' %}" name="_continue" {{ onclick_attrib }}/>{% endif %}
-{% if show_save %}<input type="submit" value="{% trans 'Save' %}" class="default" {{ onclick_attrib }}/>{% endif %}
+{% if show_save %}<input type="submit" value="{% trans 'Save' %}" class="default" name="_save" {{ onclick_attrib }}/>{% endif %}
 </div>