summaryrefslogtreecommitdiffstats
path: root/templates/authopenid
diff options
context:
space:
mode:
Diffstat (limited to 'templates/authopenid')
-rw-r--r--templates/authopenid/changeemail.html35
-rw-r--r--templates/authopenid/changeopenid.html33
-rw-r--r--templates/authopenid/changepw.html33
-rw-r--r--templates/authopenid/complete.html67
-rw-r--r--templates/authopenid/confirm_email.txt12
-rw-r--r--templates/authopenid/delete.html38
-rw-r--r--templates/authopenid/failure.html13
-rw-r--r--templates/authopenid/htmlfiles8
-rw-r--r--templates/authopenid/sendpw.html34
-rw-r--r--templates/authopenid/sendpw_email.txt14
-rw-r--r--templates/authopenid/settings.html41
-rw-r--r--templates/authopenid/signin.html95
-rw-r--r--templates/authopenid/signup.html52
-rw-r--r--templates/authopenid/yadis.xrdf14
14 files changed, 489 insertions, 0 deletions
diff --git a/templates/authopenid/changeemail.html b/templates/authopenid/changeemail.html
new file mode 100644
index 00000000..99984b3f
--- /dev/null
+++ b/templates/authopenid/changeemail.html
@@ -0,0 +1,35 @@
+{% extends "base_content.html" %}
+{% load i18n %}
+{% block content %}
+<div id="main-bar" class="">
+ <h3>
+ {% trans "Account: change email" %}
+ </h3>
+</div>
+<p class="settings-descr">{% blocktrans %}This is where you can change the email address associated with your account. Please keep this email address up to date so we can send you a password-reset email if you request one.{% endblocktrans %}</p>
+{% if form.errors %}
+<p class="errors">{% trans "Please correct errors below:" %}<br />
+ {% if form.email.errors %}
+ <span class="error">{{ form.email.errors|join:", " }}</span>
+ {% endif %}
+ {% if form.password.errors %}
+ <span class="error">{{ form.password.errors|join:", " }}</span>
+ {% endif %}
+</p>
+{% endif %}
+
+{% if msg %}
+<p class="errors">{{ msg }}</p>
+{% endif %}
+
+<div class="aligned">
+ <form action="." method="post" accept-charset="utf-8">
+
+ <div id="form-row"><label for="id_email">{% trans "Email" %}</label>{{ form.email }}</div>
+ <div id="form-row"><label for="id_password">{% trans "Password" %}</label>{{ form.password }}</div>
+
+ <p><input type="submit" value="{% trans "Change email" %}"></p>
+
+ </form>
+ </div>
+{% endblock %}
diff --git a/templates/authopenid/changeopenid.html b/templates/authopenid/changeopenid.html
new file mode 100644
index 00000000..c1f3d180
--- /dev/null
+++ b/templates/authopenid/changeopenid.html
@@ -0,0 +1,33 @@
+{% extends "base.html" %}
+{% load i18n %}
+
+{% block content %}
+<div id="main-bar" class="">
+ <h3>
+ {% trans "Account: change OpenID URL" %}
+ </h3>
+</div>
+
+<p>{% blocktrans %}This is where you can change your OpenID URL. Make sure you remember it!{% endblocktrans %}</p>
+{% if form.errors %}
+<p class="errors">{% trans "Please correct errors below:" %}<br />
+ {% if form.openid_url.errors %}
+ <span class="error">{{ form.openid_url.errors|join:", " }}</span>
+ {% endif %}
+
+
+</p>
+{% endif %}
+{% if msg %}
+ <p class="errors">{{ msg }}</p>
+{% endif %}
+
+<div class="aligned">
+ <form action="." method="post" accept-charset="utf-8">
+
+ <div id="form-row"><label for="id_openid_url">{% trans "OpenID URL:" %}</label>{{ form.openid_url }}</div>
+ <p><input type="submit" value="{% trans "Change OpenID" %}"></p>
+
+ </form>
+ </div>
+{% endblock %}
diff --git a/templates/authopenid/changepw.html b/templates/authopenid/changepw.html
new file mode 100644
index 00000000..f3cf4be0
--- /dev/null
+++ b/templates/authopenid/changepw.html
@@ -0,0 +1,33 @@
+{% extends "base.html" %}
+{% load i18n %}
+
+{% block head %}
+
+{% endblock %}
+
+
+
+{% block content %}
+<div id="main-bar" class="">
+ <h3>
+ {% trans "Account: change password" %}
+ </h3>
+</div>
+<p>{% blocktrans %}This is where you can change your password. Make sure you remember it!{% endblocktrans %}</p>
+{% if form.errors %}
+<p class="errors">{% trans "Please correct errors below:" %}<br />
+{{ form.errors }}
+</p>
+{% endif %}
+
+<div class="aligned">
+ <form action="." method="post" accept-charset="utf-8">
+
+ <div id="form-row"><label for="id_oldpw">{% trans "Current password" %}</label>{{ form.oldpw }}</div>
+ <div id="form-row"><label for="id_password1">{% trans "New password" %}</label>{{ form.password1 }}</div>
+ <div id="form-row"><label for="id_password2">{% trans "New password again" %}</label>{{ form.password2 }}</div>
+ <p><input type="submit" value="{% trans "Change password" %}"></p>
+
+ </form>
+ </div>
+{% endblock %}
diff --git a/templates/authopenid/complete.html b/templates/authopenid/complete.html
new file mode 100644
index 00000000..28c38a04
--- /dev/null
+++ b/templates/authopenid/complete.html
@@ -0,0 +1,67 @@
+{% extends "base.html" %}
+{% load i18n %}
+{% block head %}{% endblock %}
+{% block title %}{% spaceless %}{% trans "Connect your OpenID with this site" %}{% endspaceless %}{% endblock %}
+{% block content %}
+ <div id="main-bar" class="headNormal">
+ {% trans "Connect your OpenID with your account on this site" %}
+ </div>
+ <p id="completetxt" >
+ <h3>{% trans "Your OpenID is accepted. Please complete this to finish registration." %}</h3>
+ <p style="display:none">{% trans "This account already exists, please use another." %}</p>
+ </p>
+
+ {% if form1.errors %}
+ <p class="errors">
+ <span class="big">{% trans "Sorry, looks like we have some errors:" %}</span><br>
+ <ul class="error-list">
+ {% if form1.username.errors %}
+ <li><span class="error">{{ form1.username.errors|join:", " }}</span></li>
+ {% endif %}
+ {% if form1.email.errors %}
+ <li><span class="error">{{ form1.email.errors|join:", " }}</span></li>
+ {% endif %}
+ </ul>
+ </p>
+ {% endif %}
+ {% if form2.errors %}
+ <p class="errors">
+ <span class="big">{% trans "Sorry, looks like we have some errors:" %}</span><br>
+ <ul class="error-list">
+ {% if form2.username.errors %}
+ <li><span class="error">{{ form2.username.errors|join:", " }}</span></li>
+ {% endif %}
+ {% if form2.password.errors %}
+ <li><span class="error">{{ form2.password.errors|join:", " }}</span></li>
+ {% endif %}
+ </ul>
+ </p>
+ {% endif %}
+
+ <div class="login">
+ <form name="fregister" action="{% url user_register %}" method="POST">
+ {{ form.next }}
+ <fieldset style="padding:10px">
+ <legend class="big">{% trans "New account" %}</legend>
+ <div class="form-row"><label for="id_username">{% trans "User name (<i>will be shown to others, cannot be modified</i>)" %}</label><br />{{ form1.username }}</div>
+ <div class="form-row"><label for="id_email">{% trans "Email (<i>not shared with anyone</i>)" %}</label><br />{{ form1.email }}</div>
+ <div class="submit-row"><input type="submit" class="submit" name="bnewaccount" value="{% trans "create account" %}"></div>
+ </fieldset>
+ </form>
+ </div>
+ <div class="login" style="display:none">
+ <form name="fverify" action="{% url user_register %}" method="POST">
+ {{ form.next }}
+ <fieldset style="padding:10px">
+ <legend class="big">{% trans "Existing account" %}</legend>
+ <div class="form-row"><label for="id_username">{% trans "user name" %}</label><br />{{ form2.username }}</div>
+ <div class="form-row"><label for="id_passwordl">{% trans "password" %}</label><br />{{ form2.password }}</div>
+ <!--todo double check translation from chinese 确认 = "Register" -->
+ <div class="submit-row">
+ <input type="submit" class="submit" name="bverify" value="{% trans "Register" %}">
+ <a href="">{% trans "Forgot your password?" %}</a>
+ </div>
+ </fieldset>
+ </form>
+ </div>
+{% endblock %}
diff --git a/templates/authopenid/confirm_email.txt b/templates/authopenid/confirm_email.txt
new file mode 100644
index 00000000..9af177ed
--- /dev/null
+++ b/templates/authopenid/confirm_email.txt
@@ -0,0 +1,12 @@
+Thank you for registering.
+
+Your account details are:
+
+Username: {{ username }}
+Password: {{ password }}
+
+
+You may sign in here:
+{{ site_url }}signin/
+
+
diff --git a/templates/authopenid/delete.html b/templates/authopenid/delete.html
new file mode 100644
index 00000000..19e0884a
--- /dev/null
+++ b/templates/authopenid/delete.html
@@ -0,0 +1,38 @@
+{% extends "base.html" %}
+{% load i18n %}
+
+
+{% block content %}
+<div id="main-bar" class="">
+ <h3>
+ {% trans "Account: delete account" %}
+ </h3>
+</div>
+
+<p class="settings-descr">{% blocktrans %}Note: After deleting your account, anyone will be able to register this username.{% endblocktrans %}</p>
+{% if form.errors %}
+<p class="errors">{% trans "Please correct errors below:" %}<br />
+ {% if form.confirm.errors %}
+ <span class="error">{% trans "Check confirm box, if you want delete your account." %}</span><br />
+ {% endif %}
+ {% if form.password.errors %}
+ <span class="error">{% trans "Password:" %} {{ form.password.errors|join:", " }}</span>
+ {% endif %}
+</p>
+{% endif %}
+{% if msg %}
+<p class="errors">{% trans "Please correct errors below:" %}<br />
+ <span class="error">{{ msg }}</span>
+ </p>
+{% endif %}
+<div class="aligned">
+ <form action="." method="post" accept-charset="utf-8">
+
+ <div id="form-row"> {{ form.confirm }} {% trans "I am sure I want to delete my account." %}</div>
+ <div id="form-row"><label for="id_password">{% trans "Password/OpenID URL" %}</label>{{ form.password }} {% trans "(required for your security)" %}</div>
+
+ <p><input type="submit" value="{% trans "Delete account permanently" %}"></p>
+
+ </form>
+ </div>
+{% endblock %}
diff --git a/templates/authopenid/failure.html b/templates/authopenid/failure.html
new file mode 100644
index 00000000..87839ab2
--- /dev/null
+++ b/templates/authopenid/failure.html
@@ -0,0 +1,13 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN"
+ "http://www.w3.org/TR/html4/strict.dtd">
+<html>
+<head>
+ <title>OpenID failed</title>
+</head>
+<body>
+<h1>OpenID failed</h1>
+
+<p>{{ message|escape }}</p>
+
+</body>
+</html> \ No newline at end of file
diff --git a/templates/authopenid/htmlfiles b/templates/authopenid/htmlfiles
new file mode 100644
index 00000000..1b9dccd0
--- /dev/null
+++ b/templates/authopenid/htmlfiles
@@ -0,0 +1,8 @@
+changeemail.html
+changeopenid.html
+changepw.html
+delete.html
+failure.html
+sendpw.html
+settings.html
+signup.html
diff --git a/templates/authopenid/sendpw.html b/templates/authopenid/sendpw.html
new file mode 100644
index 00000000..a9488c4c
--- /dev/null
+++ b/templates/authopenid/sendpw.html
@@ -0,0 +1,34 @@
+{% extends "base.html" %}
+{% load i18n %}
+{% block title %}{% spaceless %}{% trans "Send new password" %}{% endspaceless %}{% endblock %}
+
+{% block content %}
+<div id="main-bar" class="">
+ <h3>{% trans "Send new password" %}</h3>
+
+</div>
+<div class="paragraph">
+{% trans "Lost your password? No problem - here you can reset it." %}<br>
+{% trans "Please enter your username below and new password will be sent to your registered e-mail" %}
+</div>
+{% if form.errors %}
+<p class="errors"><span class="big">{% "Sorry, looks like we have some errors:" %}</span><br>
+ {% if form.username.errors %}
+ <span class="error">{{ form.username.errors|join:", " }}</span>
+ {% endif %}
+</p>
+{% endif %}
+{% if msg %}
+ <div class="paragraph error">{{ msg }}</div>
+{% endif %}
+
+<div class="aligned">
+ <form action="." method="post" accept-charset="utf-8">
+ <div id="form-row"><label for="id_username">{% trans "User name" %}:</label>{{ form.username }}</div>
+
+ <p style="padding-top:10px"><input type="submit" value="{% trans "Reset password" %}"> <a href="{% url user_signin %}">{% trans "return to login" %}</a></p>
+
+ </form>
+ <span class="darkred">{% trans "Note: your new password will be activated only after you click the activation link in the email message" %}</span>
+</div>
+{% endblock %}
diff --git a/templates/authopenid/sendpw_email.txt b/templates/authopenid/sendpw_email.txt
new file mode 100644
index 00000000..dec062a8
--- /dev/null
+++ b/templates/authopenid/sendpw_email.txt
@@ -0,0 +1,14 @@
+Someone has requested to reset your password on {{ site_url }}.
+If this is not you, it is safe to ignore this email.
+
+Your new account details are:
+
+Username: {{ username }}
+New password: {{ password }}
+
+To confirm reset of your password go to this address:
+{{ site_url }}{{ url_confirm }}?key={{ confirm_key }}
+
+Regards,
+
+
diff --git a/templates/authopenid/settings.html b/templates/authopenid/settings.html
new file mode 100644
index 00000000..ffd5dd8f
--- /dev/null
+++ b/templates/authopenid/settings.html
@@ -0,0 +1,41 @@
+{% extends "base_content.html" %}
+{% load i18n %}
+
+{% block head %}
+<style type="text/css" media="screen">
+ h4 {font-size:12pt;}
+ dt, dd { padding:0 0 0.35em 0; }
+ dt { float: left; width: 21ex; }
+ dd { margin-left: 23ex; }
+
+ #settings-options, #settings-intro { padding: 4em 1.5em;}
+ #settings-options { min-height: 300px; border-left: 1px solid #333;}
+
+ #settings-options h5 { font-weight: bold;}
+</style>
+{% endblock %}
+
+{% block content %}
+<div id="main-bar">
+ <h3><strong>{{ request.user.username }} {% trans "Profile" %}</strong></h3>
+</div>
+<div id="settings-options">
+ {% if msg %}
+ <p class="error">{{ msg }}</p>
+ {% endif %}
+
+ <dl class="list-item">
+ <dt>» <a href="{% url user_changepw %}">{% trans "Change password" %}</a></dt>
+ <dd>{% trans "Give your account a new password." %}</dd>
+ <dt>» <a href="{% url user_changeemail %}">{% trans "Change email " %}</a></dt>
+ <dd>{% trans "Add or update the email address associated with your account." %}</dd>
+ {% if is_openid %}
+ <dt>» <a href="{% url user_changeopenid %}">{% trans "Change OpenID %}</a></dt>
+ <dd>{% trans "Change openid associated to your account" %}</dd>
+ {% endif %}
+
+ <dt>» <a href="{% url user_delete %}">{% trans "Delete account" %}</a></dt>
+ <dd>{% trans "Erase your username and all your data from website" %}</dd>
+ </dl>
+</div>
+{% endblock %}
diff --git a/templates/authopenid/signin.html b/templates/authopenid/signin.html
new file mode 100644
index 00000000..aff2f06f
--- /dev/null
+++ b/templates/authopenid/signin.html
@@ -0,0 +1,95 @@
+{% extends "base.html" %}
+{% load i18n %}
+{% block title %}{% spaceless %}{% trans "User login" %}{% endspaceless %}{% endblock %}
+{% block forejs %}
+ <script type="text/javascript" src="/content/js/jquery.openid.js?"></script>
+ <script type='text/javascript' src='/content/js/jquery.validate.pack.js'></script>
+ <script type="text/javascript">
+ $().ready(function(){
+ openid.init('id_openid_url');
+ setupFormValidation("#openid_form", {bsignin:{required: true}});
+ });
+ </script>
+{% endblock %}
+{% block content %}
+<div class="headNormal">
+ {% trans "User login" %}
+</div>
+<div class="login">
+ <form name="openid_form" action="{% url user_signin %}" method="post">
+ {{ form2.next }}
+ <p style="display:none">{% trans "we support two login modes" %}</p>
+ {% if msg %}
+ <p class="warning">{{ msg }}</p>
+ {% endif %}
+ <fieldset class="fieldset">
+ <legend ><strong>{% trans "Login with your OpenID" %}</strong></legend>
+ <div id="openid_choice">
+ <p>{% trans "select openid provider" %}</p>
+ <div id="openid_btns">
+ </div>
+ <br><br><br>
+ <p>{% trans "verify openid link and login" %}</p>
+ </div>
+ <p>
+ {{ form2.openid_url }} <input id="bsignin" name="bsignin" type="submit" value="{% trans "Login" %}" class="openid-login-submit" />
+ </p>
+ </fieldset>
+ </form>
+ <div style="display:none">
+ <br>
+ {% if form1.errors %}
+ <p class="errors">
+ <span class="big">{% trans "Sorry, looks like we have some errors:" %}</span><br>
+ <ul class="error-list">
+ {% if form1.username.errors %}
+ <li><span class="error">{{ form1.username.errors|join:", " }}</span></li>
+ {% endif %}
+ {% if form1.password.errors %}
+ <li><span class="error">{{ form1.password.errors|join:", " }}</span></li>
+ {% endif %}
+ </ul>
+ </p>
+ {% endif %}
+ <br>
+ <form name="fauth" action="{% url user_signin %}" method="post">
+ {{ form1.next }}
+ <fieldset class="fieldset" >
+ <legend class="big">{% trans "Use login name and password" %}</legend>
+ <div class="form-row"><label for="id_username">{% trans "Login name" %}:</label><br />{{ form1.username }}</div>
+ <div class="form-row"><label for="id_password">{% trans "Password" %}:</label><br />{{ form1.password }}</div>
+ <div class="submit-row"><input type="submit" class="submit" name="blogin" value="{% trans "Login" %}">
+ <a href="">{% trans "Forgot your password?" %}</a>
+ <a href="">{% trans "Create new acccount" %}</a></div>
+ </fieldset>
+ </form>
+ </div>
+</div>
+{% endblock %}
+
+{% block sidebar %}
+<div class="boxC">
+ <h3 class="subtitle">{% trans "Why use OpenID?" %}</h3>
+ <p>
+ <ul class="list-item">
+ <li>
+ {% trans "with openid it is easier" %}
+ </li>
+ <li>
+ {% trans "reuse openid" %}
+ </li>
+ <li>
+ {% trans "openid is widely adopted" %}
+ </li>
+ <li>
+ {% trans "openid is supported open standard" %}
+ </li>
+
+ </ul>
+ <a href="http://openid.net/what/" target="_blank" style="float:right;position:relative">{% trans "Find out more" %} »</a><br>
+ <a href="http://openid.net/get/" target="_blank" style="float:right;position:relative">{% trans "Get OpenID" %} »</a>
+ </p>
+ <br>
+</div>
+{% endblock%}
+
diff --git a/templates/authopenid/signup.html b/templates/authopenid/signup.html
new file mode 100644
index 00000000..a4460aa3
--- /dev/null
+++ b/templates/authopenid/signup.html
@@ -0,0 +1,52 @@
+{% extends "base.html" %}
+{% block title %}{% spaceless %}{% trans "Signup" %}{% endspaceless %}{% endblock %}
+
+{% block content %}
+<div id="main-bar" class="">
+ <h3 >{% trans "Signup" %}</h3>
+
+</div>
+<div class="jointxt">
+ <p>{% trans "We support two types of user registration: conventional username/password, and" %} <a href="{% url user_signin %}">{% trans "the OpenID method" %}</a>.</p>
+
+ {% if form.errors %}
+
+ <p class="errors">
+ <span class="big">{% trans "Sorry, looks like we have some errors" %}</span><br>
+ <ul class="error-list">
+ {% if form.username.errors %}
+ <li><span class="error">{{ form.username.errors|join:", " }}</span></li>
+ {% endif %}
+ {% if form.email.errors %}
+ <li><span class="error">{{ form.email.errors|join:", " }}</span></li>
+ {% endif %}
+ {% if form.password2.errors %}
+ <li><span class="error">{{ form.password2.errors|join:", " }}
+ </span></li>
+ {% endif %}
+ </ul>
+ </p>
+ {% endif %}
+</div>
+ <form action="{% url user_signup %}" method="post" accept-charset="utf-8">
+ <fieldset class="fieldset">
+ <legend class="big">{% trans "Conventional registration" %}</legend>
+ <div class="form-row"><label for="id_username">{% trans "choose a user name" %}:</label><br>{{ form.username }}</div>
+
+ <div class="form-row"><label for="id_email">{% trans "your email address" %}:</label><br>{{ form.email }}</div>
+ <div class="form-row"><label for="id_password1">{% trans "choose password" %}:</label><br />{{ form.password1 }}</div>
+ <div class="form-row"><label for="id_password2">{% trans "retype password" %}:</label><br>{{ form.password2 }}</div>
+ <div class="submit-row"><input type="submit" class="submit" value="{% trans "login" %}" >
+ <a href="{% url user_signin %}">{% trans "back to login" %}</a></div>
+ </fieldset>
+ <br >
+ </form>
+ <br >
+ <div style="display:none">
+ <h2 class="signup">{% trans "Register with your OpenID" %}</h2>
+ <form name="fopenid" action="{% url user_signin %}" method="post">
+ <div class="form-row">{{ form2.openid_url }}</div>
+ <div class="submit-row "><input name="bsignin" class="submit" type="submit" value="{% trans "Login with your OpenID" %}"></div>
+ </form>
+ </div>
+{% endblock %}
diff --git a/templates/authopenid/yadis.xrdf b/templates/authopenid/yadis.xrdf
new file mode 100644
index 00000000..a9ed44fe
--- /dev/null
+++ b/templates/authopenid/yadis.xrdf
@@ -0,0 +1,14 @@
+<?xml version='1.0' encoding='UTF-8'?>
+<xrds:XRDS
+ xmlns:xrds='xri://$xrds'
+ xmlns:openid='http://openid.net/xmlns/1.0'
+ xmlns='xri://$xrd*($v*2.0)'>
+ <XRD>
+ <Service>
+ <Type>http://specs.openid.net/auth/2.0/return_to</Type>
+ {% for uri in return_to %}
+ <URI>{{ uri }}</URI>
+ {% endfor %}
+ </Service>
+ </XRD>
+</xrds:XRDS> \ No newline at end of file