[damned-lies] Use request.path as the action on all forms that return to themselves



commit 15eafe4e6cedf7b5ffb3c52d335f000e6a53b23d
Author: Gil Forcada <gforcada gnome org>
Date:   Thu Nov 1 00:31:45 2012 +0100

    Use request.path as the action on all forms that return to themselves

 templates/admin/delete_release_confirmation.html   |    2 +-
 templates/module_edit_branches.html                |    2 +-
 templates/people/person_detail_change_form.html    |    2 +-
 templates/people/person_password_change_form.html  |    2 +-
 templates/people/person_team_join_form.html        |    2 +-
 templates/registration/password_reset_confirm.html |    2 +-
 templates/registration/password_reset_form.html    |    2 +-
 templates/teams/team_detail.html                   |    2 +-
 templates/teams/team_edit.html                     |    2 +-
 9 files changed, 9 insertions(+), 9 deletions(-)
---
diff --git a/templates/admin/delete_release_confirmation.html b/templates/admin/delete_release_confirmation.html
index b5ca495..6c8f19f 100644
--- a/templates/admin/delete_release_confirmation.html
+++ b/templates/admin/delete_release_confirmation.html
@@ -15,7 +15,7 @@
     <ul>{% for obj in queryset %}
     <li>{{ obj }}</li>
     {% endfor %}</ul>
-    <form action="" method="post">{% csrf_token %}
+    <form action="{{ request.path }}" method="post">{% csrf_token %}
     <div>
     {% for obj in queryset %}
     <input type="hidden" name="{{ action_checkbox_name }}" value="{{ obj.pk }}" />
diff --git a/templates/module_edit_branches.html b/templates/module_edit_branches.html
index 32713c5..cb5db95 100644
--- a/templates/module_edit_branches.html
+++ b/templates/module_edit_branches.html
@@ -13,7 +13,7 @@
   <p><a href="{{ module.homepage }}">{{ module.homepage }}</a></p>
 {% endif %}
 
-<form action="#" method="POST" class="djform">
+<form action="{{ request.path }}" method="POST" class="djform">
 {% csrf_token %}
 <table>
 <tr><td><h4>{% trans "Branch" %}</h4></td><td><h4>{% trans "Release" %}</h4></td><td><h4>{% trans "Category" %}</h4></td></tr>
diff --git a/templates/people/person_detail_change_form.html b/templates/people/person_detail_change_form.html
index 6f95d8a..440cd15 100644
--- a/templates/people/person_detail_change_form.html
+++ b/templates/people/person_detail_change_form.html
@@ -6,7 +6,7 @@
 
 <h2>{% trans "Change your details" %}</h2>
 
-<form action="" method="POST" class="djform">
+<form action="{{ request.path }}" method="POST" class="djform">
   {% csrf_token %}
   <table>
     {{ form.as_table }}
diff --git a/templates/people/person_password_change_form.html b/templates/people/person_password_change_form.html
index ae33883..827388c 100644
--- a/templates/people/person_password_change_form.html
+++ b/templates/people/person_password_change_form.html
@@ -7,7 +7,7 @@
 
 <p>{% trans "Please enter your old password, for security's sake, and then enter your new password twice so we can verify you typed it in correctly." %}</p>
 
-<form action="" method="post" class="djform">
+<form action="{{ request.path }}"  method="post" class="djform">
   {% csrf_token %}
   <table>
   <tr>
diff --git a/templates/people/person_team_join_form.html b/templates/people/person_team_join_form.html
index 5a7a7ec..6d073b4 100644
--- a/templates/people/person_team_join_form.html
+++ b/templates/people/person_team_join_form.html
@@ -7,7 +7,7 @@
 
 <h2>{% trans "Join a new team" %}</h2>
 
-<form action="" method="POST">
+<form action="{{ request.path }}" method="POST">
   {% csrf_token %}
   <p><em>{% trans "I would like to join the following team as 'translator':" %}</em><br />
     {{ form.teams }}
diff --git a/templates/registration/password_reset_confirm.html b/templates/registration/password_reset_confirm.html
index 316708f..2527874 100644
--- a/templates/registration/password_reset_confirm.html
+++ b/templates/registration/password_reset_confirm.html
@@ -11,7 +11,7 @@
 
 <p>{% trans "Please enter your new password twice so we can verify you typed it in correctly." %}</p>
 
-<form action="" method="post">
+<form action="{{ request.path }}" method="post">
 {% csrf_token %}
 {% if form.new_password1.errors %}{{ form.new_password1.errors }}{% endif %}
 <p class="aligned wide"><label for="id_new_password1">{% trans 'New password:' %}</label>{{ form.new_password1 }}</p>
diff --git a/templates/registration/password_reset_form.html b/templates/registration/password_reset_form.html
index 89c33de..5e2e3f1 100644
--- a/templates/registration/password_reset_form.html
+++ b/templates/registration/password_reset_form.html
@@ -10,7 +10,7 @@
 
 <p>{% trans "Forgotten your password? Enter your e-mail address below, and we'll e-mail instructions for setting a new one." %}</p>
 
-<form action="" method="post">{% csrf_token %}
+<form action="{{ request.path }}" method="post">{% csrf_token %}
 {% if form.email.errors %}{{ form.email.errors }}{% endif %}
 <p><label for="id_email">{% trans 'E-mail address:' %}</label> {{ form.email }} <input type="submit" value="{% trans 'Reset my password' %}" /></p>
 </form>
diff --git a/templates/teams/team_detail.html b/templates/teams/team_detail.html
index 8642524..41ac42f 100644
--- a/templates/teams/team_detail.html
+++ b/templates/teams/team_detail.html
@@ -83,7 +83,7 @@ $(document).ready(function() {
         <h3>{{ group.title }}</h3>
 
         {% if group.form %}
-        <form action="#" method="POST">
+        <form action="{{ request.path }}" method="POST">
         {% csrf_token %}
         <ul class="foot">
         {% for field in group.form.get_fields %}
diff --git a/templates/teams/team_edit.html b/templates/teams/team_edit.html
index e3be824..6d30e33 100644
--- a/templates/teams/team_edit.html
+++ b/templates/teams/team_edit.html
@@ -15,7 +15,7 @@ $(document).ready(function() {
 <div class="maxwidth">
 <h1>{% blocktrans with team.get_description as lang %}{{ lang }} Translation Team{% endblocktrans %}</h1>
 
-<form action="#" method="POST" class="djform">
+<form action="{{ request.path }}" method="POST" class="djform">
 {% csrf_token %}
 <table>
   {% if form.coordinatorship %}



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]