fix(template): fix form actions attribute in accounts template.

If the action is "empty" google chrome doesn't submit the form.
This commit is contained in:
Saurabh Kumar 2014-02-26 20:02:58 +05:30
parent 1ad866770a
commit ed798e9527
5 changed files with 16 additions and 16 deletions

View File

@ -9,8 +9,8 @@
<div class="row"> <div class="row">
<div class="col-md-5"> <div class="col-md-5">
<h2>{% trans "Change Password" %}</h2> <h2>{% trans "Change Password" %}</h2>
<form method="POST" action="" class="password_change"> <form method="POST" action="./" class="password_change">
{% csrf_token %} {% csrf_token %}
{{ form|crispy }} {{ form|crispy }}
<button class="btn" type="submit" name="action">{% trans "Change Password" %}</button> <button class="btn" type="submit" name="action">{% trans "Change Password" %}</button>

View File

@ -7,9 +7,9 @@
{% block content %} {% block content %}
<h2>{% trans "Delete Password" %}</h2> <h2>{% trans "Delete Password" %}</h2>
<p>{% blocktrans %}You may delete your password since you are currently logged in using OpenID.{% endblocktrans %}</p> <p>{% blocktrans %}You may delete your password since you are currently logged in using OpenID.{% endblocktrans %}</p>
<form method="post" action=""> <form method="post" action="./">
{% csrf_token %} {% csrf_token %}
<button class="btn" type="submit">{% trans "delete my password" %}</button> <button class="btn" type="submit">{% trans "delete my password" %}</button>
</form> </form>
{% endblock %} {% endblock %}
{% endraw %} {% endraw %}

View File

@ -15,18 +15,18 @@
{% if user.is_authenticated %} {% if user.is_authenticated %}
{% include "account/snippets/already_logged_in.html" %} {% include "account/snippets/already_logged_in.html" %}
{% endif %} {% endif %}
<p>{% trans "Forgotten your password? Enter your e-mail address below, and we'll send you an e-mail allowing you to reset it." %}</p> <p>{% trans "Forgotten your password? Enter your e-mail address below, and we'll send you an e-mail allowing you to reset it." %}</p>
<form method="POST" action="" class="password_reset"> <form method="POST" action="./" class="password_reset">
{% csrf_token %} {% csrf_token %}
{{ form|crispy }} {{ form|crispy }}
<button class="btn" type="submit">{% trans "Reset My Password" %}</button> <button class="btn" type="submit">{% trans "Reset My Password" %}</button>
</form> </form>
<p>{% blocktrans %}Please contact us if you have any trouble resetting your password.{% endblocktrans %}</p> <p>{% blocktrans %}Please contact us if you have any trouble resetting your password.{% endblocktrans %}</p>
</div> </div>
</div> </div>
</div> </div>
{% endblock %} {% endblock %}
@ -35,4 +35,4 @@
$("#id_email").focus(); $("#id_email").focus();
</script> </script>
{% endblock %} {% endblock %}
{% endraw %} {% endraw %}

View File

@ -11,13 +11,13 @@
<div class="row"> <div class="row">
<div class="col-xs-12"> <div class="col-xs-12">
<h2>{% if token_fail %}{% trans "Bad Token" %}{% else %}{% trans "Change Password" %}{% endif %}</h2> <h2>{% if token_fail %}{% trans "Bad Token" %}{% else %}{% trans "Change Password" %}{% endif %}</h2>
{% if token_fail %} {% if token_fail %}
{% url 'account_reset_password' as passwd_reset_url %} {% url 'account_reset_password' as passwd_reset_url %}
<p>{% blocktrans %}The password reset link was invalid, possibly because it has already been used. Please request a <a href="{{ passwd_reset_url }}">new password reset</a>.{% endblocktrans %}</p> <p>{% blocktrans %}The password reset link was invalid, possibly because it has already been used. Please request a <a href="{{ passwd_reset_url }}">new password reset</a>.{% endblocktrans %}</p>
{% else %} {% else %}
{% if form %} {% if form %}
<form method="POST" action=""> <form method="POST" action="./">
{% csrf_token %} {% csrf_token %}
{{ form|crispy }} {{ form|crispy }}
<button type="submit" name="action">{% trans "change password" %}</button> <button type="submit" name="action">{% trans "change password" %}</button>
@ -27,7 +27,7 @@
{% endif %} {% endif %}
{% endif %} {% endif %}
</div> </div>
</div> </div>
</div> </div>
{% endblock %} {% endblock %}
{% endraw %} {% endraw %}

View File

@ -10,8 +10,8 @@
<div class="row"> <div class="row">
<div class="col-md-5"> <div class="col-md-5">
<h2>{% trans "Set Password" %}</h2> <h2>{% trans "Set Password" %}</h2>
<form method="POST" action="" class="password_set"> <form method="POST" action="./" class="password_set">
{% csrf_token %} {% csrf_token %}
{{ form|crispy }} {{ form|crispy }}
<input type="submit" name="action" value="{% trans "Set Password" %}"/> <input type="submit" name="action" value="{% trans "Set Password" %}"/>
@ -20,4 +20,4 @@
</div> </div>
</div> </div>
{% endblock %} {% endblock %}
{% endraw %} {% endraw %}