mirror of
https://github.com/cookiecutter/cookiecutter-django.git
synced 2024-11-26 03:24:01 +03:00
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:
parent
1ad866770a
commit
ed798e9527
|
@ -9,8 +9,8 @@
|
|||
<div class="row">
|
||||
<div class="col-md-5">
|
||||
<h2>{% trans "Change Password" %}</h2>
|
||||
|
||||
<form method="POST" action="" class="password_change">
|
||||
|
||||
<form method="POST" action="./" class="password_change">
|
||||
{% csrf_token %}
|
||||
{{ form|crispy }}
|
||||
<button class="btn" type="submit" name="action">{% trans "Change Password" %}</button>
|
||||
|
|
|
@ -7,9 +7,9 @@
|
|||
{% block content %}
|
||||
<h2>{% trans "Delete Password" %}</h2>
|
||||
<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 %}
|
||||
<button class="btn" type="submit">{% trans "delete my password" %}</button>
|
||||
</form>
|
||||
{% endblock %}
|
||||
{% endraw %}
|
||||
{% endraw %}
|
||||
|
|
|
@ -15,18 +15,18 @@
|
|||
{% if user.is_authenticated %}
|
||||
{% include "account/snippets/already_logged_in.html" %}
|
||||
{% 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>
|
||||
|
||||
<form method="POST" action="" class="password_reset">
|
||||
|
||||
<form method="POST" action="./" class="password_reset">
|
||||
{% csrf_token %}
|
||||
{{ form|crispy }}
|
||||
<button class="btn" type="submit">{% trans "Reset My Password" %}</button>
|
||||
</form>
|
||||
|
||||
|
||||
<p>{% blocktrans %}Please contact us if you have any trouble resetting your password.{% endblocktrans %}</p>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
{% endblock %}
|
||||
|
||||
|
@ -35,4 +35,4 @@
|
|||
$("#id_email").focus();
|
||||
</script>
|
||||
{% endblock %}
|
||||
{% endraw %}
|
||||
{% endraw %}
|
||||
|
|
|
@ -11,13 +11,13 @@
|
|||
<div class="row">
|
||||
<div class="col-xs-12">
|
||||
<h2>{% if token_fail %}{% trans "Bad Token" %}{% else %}{% trans "Change Password" %}{% endif %}</h2>
|
||||
|
||||
|
||||
{% if token_fail %}
|
||||
{% 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>
|
||||
{% else %}
|
||||
{% if form %}
|
||||
<form method="POST" action="">
|
||||
<form method="POST" action="./">
|
||||
{% csrf_token %}
|
||||
{{ form|crispy }}
|
||||
<button type="submit" name="action">{% trans "change password" %}</button>
|
||||
|
@ -27,7 +27,7 @@
|
|||
{% endif %}
|
||||
{% endif %}
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
{% endblock %}
|
||||
{% endraw %}
|
||||
|
|
|
@ -10,8 +10,8 @@
|
|||
<div class="row">
|
||||
<div class="col-md-5">
|
||||
<h2>{% trans "Set Password" %}</h2>
|
||||
|
||||
<form method="POST" action="" class="password_set">
|
||||
|
||||
<form method="POST" action="./" class="password_set">
|
||||
{% csrf_token %}
|
||||
{{ form|crispy }}
|
||||
<input type="submit" name="action" value="{% trans "Set Password" %}"/>
|
||||
|
@ -20,4 +20,4 @@
|
|||
</div>
|
||||
</div>
|
||||
{% endblock %}
|
||||
{% endraw %}
|
||||
{% endraw %}
|
||||
|
|
Loading…
Reference in New Issue
Block a user