Adding registration templates

master
Nick Sergeant 2012-02-12 20:17:17 -05:00
parent 92c1684a95
commit f03ec50cb2
20 changed files with 467 additions and 8151 deletions

File diff suppressed because one or more lines are too long

View File

@ -132,6 +132,7 @@ TEMPLATE_DIRS = (
INSTALLED_APPS = (
'gunicorn',
'grappelli',
'django.contrib.auth',
'django.contrib.contenttypes',
'django.contrib.humanize',
@ -140,14 +141,16 @@ INSTALLED_APPS = (
'django.contrib.messages',
'django.contrib.staticfiles',
'django.contrib.admin',
'storages',
'django_bcrypt',
'pagination',
'postmark',
'registration',
'south',
'storages',
'taggit',
'tastypie',
'snipts',
)

View File

@ -0,0 +1,11 @@
{% extends "base.html" %}
{% block page-title %}{% if account %}Activation Complete{% else %}Activation Problem{% endif %} - {{ block.super }}{% endblock %}
{% block content %}
{% if account %}
Thanks {{ account }}, activation complete! You may now <a href='{% url auth_login %}'>login</a> using the username and password you set at registration.
{% else %}
Oops &ndash; it seems that your activation key is invalid. Please check the url again.
{% endif %}
{% endblock %}

View File

@ -0,0 +1,16 @@
{% extends "base.html" %}
{% block page-title %}Activation Complete - {{ block.super }}{% endblock %}
{% block body-class %}{{ block.super }} activation-complete{% endblock %}
{% block content %}
<section class="box">
<h1>Sign up for Smooth Wallet</h1>
<div class="inner">
<div class="top group">
Thanks, activation complete! You may now <a href='{% url auth_login %}'>login</a> using the username and password you set at registration.
</div>
</div>
</section>
{% endblock %}

View File

@ -0,0 +1,16 @@
Hi,
You recently signed up for LivePlay using this email address. Just to make sure that this is in fact a valid email, we need you to confirm it.
To do so, just click the following link:
https://{{site.domain}}/accounts/activate/{{ activation_key }}
That link will expire in {{ expiration_days}} days, so if you don't confirm your email within that time, your account will be marked inactive and you'll need to sign up again.
If you didn't sign up for LivePlay using this email address, then you can safely ignore this email. As long as you don't click that link above, the account will not be confirmed and you won't have an account opened using your email address.
But if you continue to receive these emails, don't hesitate to yell at us and we'll straighten it out. To do so just reply to this email and let us know what's going on.
Thanks again for trying out LivePlay.
The LivePlay Team

View File

@ -0,0 +1 @@
Please confirm your email address...

View File

@ -0,0 +1,73 @@
{% extends "base.html" %}
{% block page-title %}Login - {{ block.super }}{% endblock %}
{% block html-class %}account{% endblock %}
{% block body-class %}{{ block.super }} account login {% if request.GET.activationcomplete %}activation-complete{% endif %}{% endblock %}
{% block content %}
<h1 class="logo"><a href="/">Smooth Wallet</a></h1>
<div class="modal">
<form method="post" action="{% url django.contrib.auth.views.login %}">
<div class="modal-header">
<h3>Login</h3>
</div>
<div class="modal-body {% if form.errors %}modal-body-errors{% endif %}">
{% if request.GET.activationcomplete %}
<div class="alert-message success">
Successfully confirmed email! Log in below.
</div>
{% endif %}
{% if form.errors %}
{% if form.non_field_errors %}
<div class="alert-message block-message error">
{{ form.non_field_errors }}
<div class="alert-actions">
<a class="btn small" href="/password/reset/">Forgot your password?</a>
</div>
</div>
{% else %}
<div class="alert-message error">
<p>Please fix the errors below.</p>
</div>
{% endif %}
{% endif %}
<fieldset>
<div class="clearfix {% if form.username.errors %}error{% endif %}">
<label for="id_username">Username</label>
<div class="input">
{{ form.username }}
{% if form.errors.username %}
<span class="help-inline">
{% for error in form.errors.username %}
{{ error }}
{% endfor %}
</span>
{% endif %}
</div>
</div>
<div class="clearfix {% if form.password.errors %}error{% endif %}">
<label for="id_password">Password</label>
<div class="input">
{{ form.password }}
{% if form.errors.password %}
<span class="help-inline">
{% for error in form.errors.password %}
{{ error }}
{% endfor %}
</span>
{% endif %}
</div>
</div>
</fieldset>
</div>
<div class="modal-footer">
<a class="btn secondary forgot" href="{% url auth_password_reset %}">Forgot your password?</a>
<!--<a class="btn secondary signup" href="/signup/">Need to sign up?</a>-->
<input type="hidden" name="next" value="{{ next }}" />
{% csrf_token %}
<input class="btn primary submit" type="submit" value="Log in" />
</div>
</form>
</div>
{% endblock %}

View File

@ -0,0 +1,15 @@
{% extends "base.html" %}
{% block page-title %}Logged Out - {{ block.super }}{% endblock %}
{% block body-class %}{{ block.super }} signin{% endblock %}
{% block content %}
<section class="box">
<div class="inner">
<div class="top group">
Successfully logged out. <a href="{% url auth_login %}">Log in again?</a>
</div>
</div>
</section>
{% endblock %}

View File

@ -0,0 +1,19 @@
{% extends "app-base.html" %}
{% block page-title %}Password Changed - {{ block.super }}{% endblock %}
{% block body-class %}{{ block.super }} account{% endblock %}
{% block banner %}
<h1>
<span class="subtitle">Settings</span>
<a href="#" class="title">Account Information</a>
</h1>
{% endblock %}
{% block content %}
<div class="page-content">
Password changed successfully.
</div>
{% endblock %}

View File

@ -0,0 +1,51 @@
{% extends "app-base.html" %}
{% block page-title %}Account Information - {{ block.super }}{% endblock %}
{% block body-class %}{{ block.super }} account{% endblock %}
{% block banner %}
<h1>
<span class="subtitle">Settings</span>
<a href="{{ request.path }}" class="title">Account Information</a>
</h1>
{% endblock %}
{% block content %}
{% include "accounts/nav.html" %}
<div class="page-content">
{% if form.errors %}
<div class="errors">
{{ form.errors }}
</div>
{% endif %}
<div class="tab-content" id="change-password">
<div class="page-title">
<h2 class="title-account">Change Your Password</h2>
<p>If you change your password, make sure to remember it for the next time you login.</p>
</div>
<form method='post' action=''>
<div class="fields">
{% csrf_token %}
<div class="field">
<div class="field {% if form.old_password.errors %}error{% endif %}">
<label for="id_old_password">Current Password</label>
{{ form.old_password }}
</div>
<div class="field {% if form.new_password1.errors %}error{% endif %}">
<label for="id_new_password1">New Password</label>
{{ form.new_password1 }}
</div>
<div class="field {% if form.new_password2.errors %}error{% endif %}">
<label for="id_new_password2">Confirm New Password</label>
{{ form.new_password2 }}
</div>
</div>
</div>
<div class="submit">
<input class="submit" type='submit' value="Change Password" />
</div>
</form>
</div>
</div>
{% endblock %}

View File

@ -0,0 +1,13 @@
{% extends "base.html" %}
{% block page-title %}Password Reset Complete - {{ block.super }}{% endblock %}
{% block content %}
<section class="box">
<div class="inner">
<div class="top group">
Your password has been reset! You may now <a href="{{ login_url }}">log in</a>.
</div>
</div>
</section>
{% endblock %}

View File

@ -0,0 +1,36 @@
{% extends "base.html" %}
{% block page-title %}Confirm Password Reset - {{ block.super }}{% endblock %}
{% block body-class %}{{ block.super }} signin new-password{% endblock %}
{% block content %}
<section class="box">
<div class="inner">
<div class="top group">
{% if form.errors %}
<div class="errors">
{{ form.new_password1.errors }}
{{ form.new_password2.errors }}
</div>
{% endif %}
<div class="legend top-legend">
Enter your new password below to reset your password:
</div>
<form method="post" action="">{% csrf_token %}
<div class="fields">
<div class="field {% if form.new_password1.errors %}error{% endif %}">
{{ form.new_password1.label_tag }}
{{ form.new_password1 }}
</div>
<div class="field {% if form.new_password2.errors %}error{% endif %}">
{{ form.new_password2.label_tag }}
{{ form.new_password2 }}
</div>
</div>
<input class="submit" type="submit" value="Set Password" />
</form>
</div>
</div>
</section>
{% endblock %}

View File

@ -0,0 +1,13 @@
{% extends "base.html" %}
{% block page-title %}Password Reset - {{ block.super }}{% endblock %}
{% block content %}
<section class="box">
<div class="inner">
<div class="top group">
We have sent you an email with a link to reset your password. Please check your email and click the link to continue.
</div>
</div>
</section>
{% endblock %}

View File

@ -0,0 +1 @@
Reset your Smooth Wallet password here: {{ protocol }}://{{ domain }}{% url auth_password_reset_confirm uid token %}

View File

@ -0,0 +1,54 @@
{% extends "base.html" %}
{% block page-title %}Reset password - {{ block.super }}{% endblock %}
{% block html-class %}account{% endblock %}
{% block body-class %}{{ block.super }} account forgot-password{% endblock %}
{% block content %}
<h1 class="logo"><a href="/">Smooth Wallet</a></h1>
<div class="modal">
<form method="post" action="">
<div class="modal-header">
<h3>Reset Password</h3>
</div>
<div class="modal-body {% if form.errors %}modal-body-errors{% endif %}">
<div class="legend">
<p>Forgot your password? Enter your email below and we'll send you instructions for creating a new one.</p>
</div>
{% if form.errors %}
{% if form.non_field_errors %}
<div class="alert-message block-message error">
{{ form.non_field_errors }}
</div>
{% else %}
<div class="alert-message error">
<p>Please fix the errors below.</p>
</div>
{% endif %}
{% endif %}
<fieldset>
<div class="clearfix {% if form.email.errors %}error{% endif %}">
<label for="id_email">Email</label>
<div class="input">
{{ form.email }}
{% if form.errors.email %}
<span class="help-inline">
{% for error in form.errors.email %}
{{ error }}
{% endfor %}
</span>
{% endif %}
</div>
</div>
</fieldset>
</div>
<div class="modal-footer">
{% csrf_token %}
<a class="btn secondary login" href="/login/">Log in instead?</a>
<!--<a class="btn secondary signup" href="/signup/">Need to sign up?</a>-->
<input class="btn primary submit" type="submit" value="Reset password" />
</div>
</form>
</div>
{% endblock %}

View File

@ -0,0 +1,11 @@
{% extends "base.html" %}
{% block page-title %}Registration Complete - {{ block.super }}{% endblock %}
{% block body-class %}{{ block.super }} signup signup-complete{% endblock %}
{% block content %}
<section class="box">
All done!
</section>
{% endblock %}

View File

@ -0,0 +1,90 @@
{% extends "base.html" %}
{% block page-title %}Sign up - {{ block.super }}{% endblock %}
{% block html-class %}account{% endblock %}
{% block body-class %}{{ block.super }} account signup{% endblock %}
{% block content %}
<h1 class="logo"><a href="/">Smooth Wallet</a></h1>
<div class="modal">
<form method="post" action="">
<div class="modal-header">
<h3>Signup</h3>
</div>
<div class="modal-body {% if form.errors %}modal-body-errors{% endif %}">
{% if form.errors %}
<div class="alert-message error">
<p>Please fix the errors below.</p>
</div>
{% if form.non_field_errors %}
<div class="alert-message block-message error">
{{ form.non_field_errors }}
</div>
{% endif %}
{% endif %}
<fieldset>
<div class="clearfix {% if form.errors.username %}error{% endif %}">
<label for="id_username">Username</label>
<div class="input">
{{ form.username }}
{% if form.errors.username %}
<span class="help-inline">
{% for error in form.errors.username %}
{{ error }}
{% endfor %}
</span>
{% endif %}
<span class="help-block">You'll use this to log in.</span>
</div>
</div>
<div class="clearfix {% if form.errors.email %}error{% endif %}">
<label for="id_email">Email Address</label>
<div class="input">
{{ form.email }}
{% if form.errors.email %}
<span class="help-inline">
{% for error in form.errors.email %}
{{ error }}
{% endfor %}
</span>
{% endif %}
<span class="help-block">We hate spam as much as you.</span>
</div>
</div>
<div class="clearfix {% if form.errors.password1 %}error{% endif %}">
<label for="id_password1">Password</label>
<div class="input">
{{ form.password1 }}
{% if form.errors.password1 %}
<span class="help-inline">
{% for error in form.errors.password1 %}
{{ error }}
{% endfor %}
</span>
{% endif %}
</div>
</div>
<div class="clearfix {% if form.errors.password2 %}error{% endif %}">
<label for="id_password2">Confirm Password</label>
<div class="input">
{{ form.password2 }}
{% if form.errors.password2 %}
<span class="help-inline">
{% for error in form.errors.password2 %}
{{ error }}
{% endfor %}
</span>
{% endif %}
</div>
</div>
</fieldset>
</div>
<div class="modal-footer">
<a class="btn secondary login" href="/login/">Already have an account?</a>
{% csrf_token %}
<input class="btn primary submit" type="submit" value="Sign up" />
</div>
</form>
</div>
{% endblock %}

View File

@ -0,0 +1,36 @@
{% extends "base.html" %}
{% block page-title %}Resend Activation Email - {{ block.super }}{% endblock %}
{% block body-class %}{{ block.super }} signup resend-confirmation{% endblock %}
{% block content %}
<section class="box">
<h1>Sign up for Smooth Wallet</h1>
<div class="inner">
<div class="top group">
{% if form.errors or form.non_field_errors or resend_msg %}
<div class="errors">
{{ form.email.errors }}
{{ form.non_field_errors }}
{% if resend_msg %}
{{ resend_msg }}
{% endif %}
</div>
{% endif %}
<div class="legend top-legend">
Please note: New user accounts that have not been activated are purged every 7 days. If this is the case, simply <a href="{% url registration_register %}">sign up again</a>.
</div>
<form method="post" action="/accounts/resend/">
<div class="fields">
<div class="field">
{{ form.email.label_tag }}
{{ form.email }}
</div>
</div>
<input class="submit" type="submit" value="Send New Confirmation Email" />
</form>
</div>
</div>
</section>
{% endblock %}

View File

@ -29,6 +29,12 @@ urlpatterns = patterns('',
url(r'^api/', include(public_api.urls)),
url(r'^api/', include(private_api.urls)),
url(r'^signup/$',
'registration.views.register', {
'backend': 'registration.backends.default.DefaultBackend'},
name='registration_register'),
url(r'', include('registration.backends.default.urls')),
url(r'^', include('snipts.urls')),
url(r'^media/(?P<path>.*)$', 'django.views.static.serve', {