Fix the templates so they don't blow up cookiecutter

This commit is contained in:
Daniel Greenfeld 2013-08-16 15:17:18 +02:00
parent d47f30c9fc
commit a6a4f2272d
37 changed files with 125 additions and 140 deletions

View File

@ -1,4 +1,3 @@
{% extends "base.html" %} {% raw %}{% extends "base.html" %}
{% block title %}{% block head_title %}{% endblock head_title %}{% endblock title %} {% block title %}{% block head_title %}{% endblock head_title %}{% endblock title %}
{% endraw %}

View File

@ -1,58 +1,62 @@
{% extends "account/base.html" %} {% raw %}{% extends "account/base.html" %}
{% load i18n %} {% load i18n %}
{% load url from future %} {% load url from future %}
{% load crispy_forms_tags %}
{% block head_title %}{% trans "Account" %}{% endblock %} {% block head_title %}{% trans "Account" %}{% endblock %}
{% block content %} {% block content %}
<h1>{% trans "E-mail Addresses" %}</h1> <div class="container">
{% if user.emailaddress_set.all %} <div class="row">
<p>{% trans 'The following e-mail addresses are associated with your account:' %}</p> <div class="col-md-5">
<h2>{% trans "E-mail Addresses" %}</h2>
<form action="{% url 'account_email' %}" class="email_list" method="post"> {% if user.emailaddress_set.all %}
{% csrf_token %} <p>{% trans 'The following e-mail addresses are associated with your account:' %}</p>
<fieldset class="blockLabels">
<form action="{% url 'account_email' %}" class="email_list" method="post">
{% csrf_token %}
<fieldset class="blockLabels">
{% for emailaddress in user.emailaddress_set.all %} {% for emailaddress in user.emailaddress_set.all %}
<div class="ctrlHolder"> <div class="ctrlHolder">
<label for="email_radio_{{forloop.counter}}" class="{% if emailaddress.primary %}primary_email{%endif%}"> <label for="email_radio_{{forloop.counter}}" class="{% if emailaddress.primary %}primary_email{%endif%}">
<input id="email_radio_{{forloop.counter}}" type="radio" name="email" {% if emailaddress.primary %}checked="checked"{%endif %} value="{{emailaddress.email}}"/> <input id="email_radio_{{forloop.counter}}" type="radio" name="email" {% if emailaddress.primary %}checked="checked"{%endif %} value="{{emailaddress.email}}"/>
{{ emailaddress.email }} {{ emailaddress.email }}
{% if emailaddress.verified %} {% if emailaddress.verified %}
<span class="verified">{% trans "Verified" %}</span> <span class="verified">{% trans "Verified" %}</span>
{% else %} {% else %}
<span class="unverified">{% trans "Unverified" %}</span> <span class="unverified">{% trans "Unverified" %}</span>
{% endif %} {% endif %}
{% if emailaddress.primary %}<span class="primary">{% trans "Primary" %}</span>{% endif %} {% if emailaddress.primary %}<span class="primary">{% trans "Primary" %}</span>{% endif %}
</label> </label>
</div> </div>
{% endfor %} {% endfor %}
<div class="buttonHolder"> <div class="buttonHolder">
<button class="secondaryAction" type="submit" name="action_primary" >{% trans 'Make Primary' %}</button> <button class="secondaryAction" type="submit" name="action_primary" >{% trans 'Make Primary' %}</button>
<button class="secondaryAction" type="submit" name="action_send" >{% trans 'Re-send Verification' %}</button> <button class="secondaryAction" type="submit" name="action_send" >{% trans 'Re-send Verification' %}</button>
<button class="primaryAction" type="submit" name="action_remove" >{% trans 'Remove' %}</button> <button class="primaryAction" type="submit" name="action_remove" >{% trans 'Remove' %}</button>
</div> </div>
</fieldset> </fieldset>
</form> </form>
{% else %} {% else %}
<p><strong>{% trans 'Warning:'%}</strong> {% trans "You currently do not have any e-mail address set up. You should really add an e-mail address so you can receive notifications, reset your password, etc." %}</p> <p><strong>{% trans 'Warning:'%}</strong> {% trans "You currently do not have any e-mail address set up. You should really add an e-mail address so you can receive notifications, reset your password, etc." %}</p>
{% endif %} {% endif %}
<h2>{% trans "Add E-mail Address" %}</h2> <h2>{% trans "Add E-mail Address" %}</h2>
<form method="post" action="" class="add_email uniForm"> <form method="post" action="" class="add_email">
{% csrf_token %} {% csrf_token %}
{{ form.as_p}} {{ form|crispy }}
<button name="action_add" type="submit">{% trans "Add E-mail" %}</button> <button class="btn" name="action_add" type="submit">{% trans "Add E-mail" %}</button>
</form> </form>
{% endblock %} {% endblock %}
@ -72,3 +76,4 @@
})(); })();
</script> </script>
{% endblock %} {% endblock %}
{% endraw %}

View File

@ -1,4 +0,0 @@
{% load account %}{% user_display user as user_display %}{% load i18n %}{% autoescape off %}{% blocktrans with current_site.name as site_name %}User {{ user_display }} at {{ site_name }} has given this as an email address.
To confirm this is correct, go to {{ activate_url }}
{% endblocktrans %}{% endautoescape %}

View File

@ -1 +0,0 @@
{% include "account/email/email_confirmation_message.txt" %}

View File

@ -1 +0,0 @@
{% include "account/email/email_confirmation_subject.txt" %}

View File

@ -1,4 +0,0 @@
{% load i18n %}
{% autoescape off %}
{% blocktrans %}Confirm E-mail Address{% endblocktrans %}
{% endautoescape %}

View File

@ -1,9 +0,0 @@
{% load i18n %}{% blocktrans with site.domain as site_domain and user.username as username %}You're receiving this e-mail because you or someone else has requested a password for your user account at {{site_domain}}.
It can be safely ignored if you did not request a password reset. Click the link below to reset your password.
{{password_reset_url}}
In case you forgot, your username is {{username}}.
Thanks for using our site!
{% endblocktrans %}

View File

@ -1,4 +0,0 @@
{% load i18n %}
{% autoescape off %}
{% blocktrans %}Password Reset E-mail{% endblocktrans %}
{% endautoescape %}

View File

@ -1,4 +1,4 @@
{% extends "account/base.html" %} {% raw %}{% extends "account/base.html" %}
{% load url from future %} {% load url from future %}
{% load i18n %} {% load i18n %}
@ -10,7 +10,7 @@
{% block content %} {% block content %}
<div class="container"> <div class="container">
<div class="row"> <div class="row">
<div class="col-md-5"> <div class="col-12">
<h2>{% trans "Confirm E-mail Address" %}</h2> <h2>{% trans "Confirm E-mail Address" %}</h2>
{% if confirmation %} {% if confirmation %}
@ -21,7 +21,7 @@
<form method="post" action="{% url 'account_confirm_email' confirmation.key %}"> <form method="post" action="{% url 'account_confirm_email' confirmation.key %}">
{% csrf_token %} {% csrf_token %}
<button type="submit">{% trans 'Confirm' %}</button> <button class="submit" type="submit">{% trans 'Confirm' %}</button>
</form> </form>
{% else %} {% else %}
@ -35,3 +35,4 @@
</div> </div>
</div> </div>
{% endblock %} {% endblock %}
{% endraw %}

View File

@ -1,4 +1,4 @@
{% extends "account/base.html" %} {% raw %}{% extends "account/base.html" %}
{% load i18n %} {% load i18n %}
{% load account %} {% load account %}
@ -7,11 +7,16 @@
{% block content %} {% block content %}
<div class="container">
<div class="row">
<div class="col-12">
<h2>{% trans "Confirm E-mail Address" %}</h2>
<h1>{% trans "Confirm E-mail Address" %}</h1> {% user_display email_address.user as user_display %}
{% user_display email_address.user as user_display %} <p>{% blocktrans with email_address.email as email %}You have confirmed that <a href="mailto:{{email}}">{{ email }}</a> is an e-mail address for user {{ user_display }}.{% endblocktrans %}</p>
</div>
<p>{% blocktrans with email_address.email as email %}You have confirmed that <a href="mailto:{{email}}">{{ email }}</a> is an e-mail address for user {{ user_display }}.{% endblocktrans %}</p> </div>
</div>
{% endblock %} {% endblock %}
{% endraw %}

View File

@ -1,4 +1,4 @@
{% extends "account/base.html" %} {% raw %}{% extends "account/base.html" %}
{% load i18n %} {% load i18n %}
{% load account %} {% load account %}
@ -47,4 +47,4 @@
</div> </div>
</div> </div>
{% endblock %} {% endblock %}
{% endraw %}

View File

@ -1,4 +1,4 @@
{% extends "account/base.html" %} {% raw %}{% extends "account/base.html" %}
{% load url from future %} {% load url from future %}
{% load i18n %} {% load i18n %}
@ -26,3 +26,4 @@
</div> </div>
{% endblock %} {% endblock %}
{% endraw %}

View File

@ -1,2 +0,0 @@
{% load i18n %}
{% blocktrans %}You cannot remove your primary e-mail address ({{email}}).{% endblocktrans %}

View File

@ -1,2 +0,0 @@
{% load i18n %}
{% blocktrans %}Confirmation e-mail sent to {{email}}.{% endblocktrans %}

View File

@ -1,2 +0,0 @@
{% load i18n %}
{% blocktrans %}You have confirmed {{email}}.{% endblocktrans %}

View File

@ -1,2 +0,0 @@
{% load i18n %}
{% blocktrans %}Removed e-mail address {{email}}.{% endblocktrans %}

View File

@ -1,4 +0,0 @@
{% load account %}
{% load i18n %}
{% user_display user as name %}
{% blocktrans %}Successfully signed in as {{name}}.{% endblocktrans %}

View File

@ -1,2 +0,0 @@
{% load i18n %}
{% blocktrans %}You have signed out.{% endblocktrans %}

View File

@ -1,3 +0,0 @@
{% load i18n %}
{% blocktrans %}Password successfully changed.{% endblocktrans %}

View File

@ -1,3 +0,0 @@
{% load i18n %}
{% blocktrans %}Password successfully set.{% endblocktrans %}

View File

@ -1,2 +0,0 @@
{% load i18n %}
{% blocktrans %}Primary e-mail address set.{% endblocktrans %}

View File

@ -1,2 +0,0 @@
{% load i18n %}
{% blocktrans %}Your primary e-mail address must be verified.{% endblocktrans %}

View File

@ -1,20 +1,22 @@
{% extends "account/base.html" %} {% raw %}{% extends "account/base.html" %}
{% load i18n %} {% load i18n %}
{% load cripsy_forms_tags %}
{% block head_title %}{% trans "Change Password" %}{% endblock %} {% block head_title %}{% trans "Change Password" %}{% endblock %}
{% block content %} {% block content %}
<div class="container"> <div class="container">
<div class="row"> <div class="row">
<div class="col-md-5"> <div class="col-md-5">
<h1>{% trans "Change Password" %}</h1> <h2>{% trans "Change Password" %}</h2>
<form method="POST" action="" class="password_change"> <form method="POST" action="" class="password_change">
{% csrf_token %} {% csrf_token %}
{{ form.as_p }} {{ form|crispy }}
<button type="submit" name="action">{% trans "Change Password" %}</button> <button class="btn" type="submit" name="action">{% trans "Change Password" %}</button>
</form> </form>
</div> </div>
</div> </div>
</div> </div>
{% endblock %} {% endblock %}
{% endraw %}

View File

@ -1,14 +1,15 @@
{% extends "account/base.html" %} {% raw %}{% extends "account/base.html" %}
{% load i18n %} {% load i18n %}
{% block head_title %}{% trans "Delete Password" %}{% endblock %} {% block head_title %}{% trans "Delete Password" %}{% endblock %}
{% block content %} {% block content %}
<h1>{% trans "Delete Password" %}</h1> <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 %}
<input type="submit" value="{% trans "delete my password" %}"> <button class="btn" type="submit">{% trans "delete my password" %}</button>
</form> </form>
{% endblock %} {% endblock %}
{% endraw %}

View File

@ -1,10 +1,11 @@
{% extends "account/base.html" %} {% raw %}{% extends "account/base.html" %}
{% load i18n %} {% load i18n %}
{% block head_title %}{% trans "Password Deleted" %}{% endblock %} {% block head_title %}{% trans "Password Deleted" %}{% endblock %}
{% block content %} {% block content %}
<h1>{% trans "Password Deleted" %}</h1> <h2>{% trans "Password Deleted" %}</h2>
<p>{% blocktrans %}Your password has been deleted.{% endblocktrans %}</p> <p>{% blocktrans %}Your password has been deleted.{% endblocktrans %}</p>
{% endblock %} {% endblock %}
{% endraw %}

View File

@ -1,4 +1,4 @@
{% extends "account/base.html" %} {% raw %}{% extends "account/base.html" %}
{% load i18n %} {% load i18n %}
{% load account %} {% load account %}
@ -11,7 +11,7 @@
<div class="row"> <div class="row">
<div class="col-md-5"> <div class="col-md-5">
<h1>{% trans "Password Reset" %}</h1> <h2>{% trans "Password Reset" %}</h2>
{% if user.is_authenticated %} {% if user.is_authenticated %}
{% include "account/snippets/already_logged_in.html" %} {% include "account/snippets/already_logged_in.html" %}
{% endif %} {% endif %}
@ -35,3 +35,4 @@
$("#id_email").focus(); $("#id_email").focus();
</script> </script>
{% endblock %} {% endblock %}
{% endraw %}

View File

@ -1,4 +1,4 @@
{% extends "account/base.html" %} {% raw %}{% extends "account/base.html" %}
{% load i18n %} {% load i18n %}
{% load account %} {% load account %}
@ -6,11 +6,18 @@
{% block head_title %}{% trans "Password Reset" %}{% endblock %} {% block head_title %}{% trans "Password Reset" %}{% endblock %}
{% block content %} {% block content %}
<h1>{% trans "Password Reset" %}</h1> <div class="container">
<div class="row">
{% if user.is_authenticated %} <div class="col-12">
{% include "account/snippets/already_logged_in.html" %} <h2>{% trans "Password Reset" %}</h2>
{% endif %}
{% if user.is_authenticated %}
<p>{% blocktrans %}We have sent you an e-mail. Please contact us if you do not receive it within a few minutes.{% endblocktrans %}</p> {% include "account/snippets/already_logged_in.html" %}
{% endif %}
<p>{% blocktrans %}We have sent you an e-mail. Please contact us if you do not receive it within a few minutes.{% endblocktrans %}</p>
</div>
</div>
</div>
{% endblock %} {% endblock %}
{% endraw %}

View File

@ -1,24 +1,33 @@
{% extends "account/base.html" %} {% raw %}{% extends "account/base.html" %}
{% load url from future %} {% load url from future %}
{% load i18n %} {% load i18n %}
{% load cripsy_forms_tags %}
{% block head_title %}{% trans "Change Password" %}{% endblock %} {% block head_title %}{% trans "Change Password" %}{% endblock %}
{% block content %} {% block content %}
<h1>{% if token_fail %}{% trans "Bad Token" %}{% else %}{% trans "Change Password" %}{% endif %}</h1> <div class="container">
<div class="row">
<div class="col-12">
<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="" class="uniForm"> <form method="POST" action="">
{% csrf_token %} {% csrf_token %}
{{ form.as_p }} {{ form|crispy }}
<input type="submit" name="action" value="{% trans "change password" %}"/> <button type="submit" name="action">{% trans "change password" %}</button>
</form> </form>
{% else %} {% else %}
<p>{% trans 'Your password is now changed.' %}</p> <p>{% trans 'Your password is now changed.' %}</p>
{% endif %} {% endif %}
{% endif %} {% endif %}
</div>
</div>
</div>
{% endblock %} {% endblock %}
{% endraw %}

View File

@ -1,4 +1,4 @@
{% extends "account/base.html" %} {% raw %}{% extends "account/base.html" %}
{% load url from future %} {% load url from future %}
{% load i18n %} {% load i18n %}
@ -14,3 +14,4 @@
</div> </div>
</div> </div>
{% endblock %} {% endblock %}
{% endraw %}

View File

@ -1,3 +1,4 @@
{% raw %}
{% extends "account/base.html" %} {% extends "account/base.html" %}
{% load i18n crispy_forms_tags %} {% load i18n crispy_forms_tags %}
@ -19,3 +20,4 @@
</div> </div>
</div> </div>
{% endblock %} {% endblock %}
{% endraw %}

View File

@ -1,4 +1,4 @@
{% extends "account/base.html" %} {% raw %}{% extends "account/base.html" %}
{% load url from future %} {% load url from future %}
{% load i18n %} {% load i18n %}
@ -24,3 +24,4 @@
{% endblock content %} {% endblock content %}
{% endraw %}

View File

@ -1,4 +1,4 @@
{% extends "account/base.html" %} {% raw %}{% extends "account/base.html" %}
{% load url from future %} {% load url from future %}
{% load i18n %} {% load i18n %}
@ -16,5 +16,4 @@
</div> </div>
</div> </div>
{% endblock %} {% endblock %}
{% endraw %}

View File

@ -1,5 +0,0 @@
{% load i18n %}
{% load account %}
{% user_display user as user_display %}
<p><strong>{% trans "Note" %}:</strong> {% blocktrans %}you are already logged in as {{ user_display }}.{% endblocktrans %}</p>

View File

@ -1,4 +1,4 @@
{% extends "account/base.html" %} {% raw %}{% extends "account/base.html" %}
{% load i18n %} {% load i18n %}
@ -16,3 +16,4 @@
</div> </div>
{% endblock %} {% endblock %}
{% endraw %}

View File

@ -1,4 +1,4 @@
{% extends "account/base.html" %} {% raw %}{% extends "account/base.html" %}
{% load url from future %} {% load url from future %}
{% load i18n %} {% load i18n %}
@ -26,3 +26,4 @@
</div> </div>
</div> </div>
{% endblock %} {% endblock %}
{% endraw %}

View File

@ -1 +1 @@
{% extend "base.html" %} {% raw %}{% extend "base.html" %}{% endraw %}

View File

@ -1 +1 @@
{% extend "base.html" %} {% raw %}{% extend "base.html" %}{% endraw %}