Fixed #25565 -- Removed action="" from admin forms (invalid in HTML5).

This commit is contained in:
Ville Skyttä 2015-10-18 11:42:42 +03:00 committed by Tim Graham
parent df0a446fd4
commit 6ff500127a
7 changed files with 7 additions and 7 deletions

View File

@ -81,7 +81,7 @@
{% endif %} {% endif %}
{% endblock %} {% endblock %}
<form id="changelist-form" action="" method="post"{% if cl.formset.is_multipart %} enctype="multipart/form-data"{% endif %} novalidate>{% csrf_token %} <form id="changelist-form" method="post"{% if cl.formset.is_multipart %} enctype="multipart/form-data"{% endif %} novalidate>{% csrf_token %}
{% if cl.formset %} {% if cl.formset %}
<div>{{ cl.formset.management_form }}</div> <div>{{ cl.formset.management_form }}</div>
{% endif %} {% endif %}

View File

@ -33,7 +33,7 @@
{% include "admin/includes/object_delete_summary.html" %} {% include "admin/includes/object_delete_summary.html" %}
<h2>{% trans "Objects" %}</h2> <h2>{% trans "Objects" %}</h2>
<ul>{{ deleted_objects|unordered_list }}</ul> <ul>{{ deleted_objects|unordered_list }}</ul>
<form action="" method="post">{% csrf_token %} <form method="post">{% csrf_token %}
<div> <div>
<input type="hidden" name="post" value="yes" /> <input type="hidden" name="post" value="yes" />
{% if is_popup %}<input type="hidden" name="{{ is_popup_var }}" value="1" />{% endif %} {% if is_popup %}<input type="hidden" name="{{ is_popup_var }}" value="1" />{% endif %}

View File

@ -34,7 +34,7 @@
{% for deletable_object in deletable_objects %} {% for deletable_object in deletable_objects %}
<ul>{{ deletable_object|unordered_list }}</ul> <ul>{{ deletable_object|unordered_list }}</ul>
{% endfor %} {% endfor %}
<form action="" method="post">{% csrf_token %} <form method="post">{% csrf_token %}
<div> <div>
{% for obj in queryset %} {% for obj in queryset %}
<input type="hidden" name="{{ action_checkbox_name }}" value="{{ obj.pk|unlocalize }}" /> <input type="hidden" name="{{ action_checkbox_name }}" value="{{ obj.pk|unlocalize }}" />

View File

@ -1,6 +1,6 @@
{% load i18n admin_static %} {% load i18n admin_static %}
{% if cl.search_fields %} {% if cl.search_fields %}
<div id="toolbar"><form id="changelist-search" action="" method="get"> <div id="toolbar"><form id="changelist-search" method="get">
<div><!-- DIV needed for valid HTML --> <div><!-- DIV needed for valid HTML -->
<label for="searchbar"><img src="{% static "admin/img/search.svg" %}" alt="Search" /></label> <label for="searchbar"><img src="{% static "admin/img/search.svg" %}" alt="Search" /></label>
<input type="text" size="40" name="{{ search_var }}" value="{{ cl.query }}" id="searchbar" /> <input type="text" size="40" name="{{ search_var }}" value="{{ cl.query }}" id="searchbar" />

View File

@ -14,7 +14,7 @@
{% block content %}<div id="content-main"> {% block content %}<div id="content-main">
<form action="" method="post">{% csrf_token %} <form method="post">{% csrf_token %}
<div> <div>
{% if form.errors %} {% if form.errors %}
<p class="errornote"> <p class="errornote">

View File

@ -16,7 +16,7 @@
<p>{% trans "Please enter your new password twice so we can verify you typed it in correctly." %}</p> <p>{% trans "Please enter your new password twice so we can verify you typed it in correctly." %}</p>
<form action="" method="post">{% csrf_token %} <form method="post">{% csrf_token %}
{{ form.new_password1.errors }} {{ form.new_password1.errors }}
<p class="aligned wide"><label for="id_new_password1">{% trans 'New password:' %}</label>{{ form.new_password1 }}</p> <p class="aligned wide"><label for="id_new_password1">{% trans 'New password:' %}</label>{{ form.new_password1 }}</p>
{{ form.new_password2.errors }} {{ form.new_password2.errors }}

View File

@ -14,7 +14,7 @@
<p>{% trans "Forgotten your password? Enter your email address below, and we'll email instructions for setting a new one." %}</p> <p>{% trans "Forgotten your password? Enter your email address below, and we'll email instructions for setting a new one." %}</p>
<form action="" method="post">{% csrf_token %} <form method="post">{% csrf_token %}
{{ form.email.errors }} {{ form.email.errors }}
<p><label for="id_email">{% trans 'Email address:' %}</label> {{ form.email }} <input type="submit" value="{% trans 'Reset my password' %}" /></p> <p><label for="id_email">{% trans 'Email address:' %}</label> {{ form.email }} <input type="submit" value="{% trans 'Reset my password' %}" /></p>
</form> </form>