diff options
author | Mike Chen <chagel@gmail.com> | 2009-07-05 10:23:06 +0800 |
---|---|---|
committer | Mike Chen <chagel@gmail.com> | 2009-07-05 10:23:06 +0800 |
commit | 2acb62174ab2cac9c7a88faafcb5f0a22a54db6f (patch) | |
tree | 93e9d22d6fb8a6c882e3915a8511a3ac542a1e67 /templates/authopenid | |
download | askbot-2acb62174ab2cac9c7a88faafcb5f0a22a54db6f.tar.gz askbot-2acb62174ab2cac9c7a88faafcb5f0a22a54db6f.tar.bz2 askbot-2acb62174ab2cac9c7a88faafcb5f0a22a54db6f.zip |
initiliaze git rep
Diffstat (limited to 'templates/authopenid')
-rw-r--r-- | templates/authopenid/changeemail.html | 39 | ||||
-rw-r--r-- | templates/authopenid/changeopenid.html | 33 | ||||
-rw-r--r-- | templates/authopenid/changepw.html | 33 | ||||
-rw-r--r-- | templates/authopenid/complete.html | 66 | ||||
-rw-r--r-- | templates/authopenid/confirm_email.txt | 12 | ||||
-rw-r--r-- | templates/authopenid/delete.html | 38 | ||||
-rw-r--r-- | templates/authopenid/failure.html | 13 | ||||
-rw-r--r-- | templates/authopenid/sendpw.html | 33 | ||||
-rw-r--r-- | templates/authopenid/sendpw_email.txt | 14 | ||||
-rw-r--r-- | templates/authopenid/settings.html | 41 | ||||
-rw-r--r-- | templates/authopenid/signin.html | 96 | ||||
-rw-r--r-- | templates/authopenid/signup.html | 51 | ||||
-rw-r--r-- | templates/authopenid/yadis.xrdf | 14 |
13 files changed, 483 insertions, 0 deletions
diff --git a/templates/authopenid/changeemail.html b/templates/authopenid/changeemail.html new file mode 100644 index 00000000..a6c53a64 --- /dev/null +++ b/templates/authopenid/changeemail.html @@ -0,0 +1,39 @@ +{% 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..fd243f28 --- /dev/null +++ b/templates/authopenid/complete.html @@ -0,0 +1,66 @@ +{% extends "base.html" %} +{% block head %}{% endblock %} +{% block title %}{% spaceless %}绑定OpenID{% endspaceless %}{% endblock %} +{% block content %} + <div id="main-bar" class="headNormal"> + 绑定OpenID帐号 + + </div> + <p id="completetxt" > + <h3>您的OpenID帐号已经验证通过! 请完成最后一步 - 绑定OpenID到您的帐号。</h3> + <p style="display:none">输入您的新帐号或者指定已经存在的帐号。</p> + </p> + + {% if form1.errors %} + <p class="errors"> + <span class="big">请注意以下错误:</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">请注意以下错误:</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">新帐号</legend> + <div class="form-row"><label for="id_username">用户名(<i>在社区显示友好名称,不可更改</i>)</label><br />{{ form1.username }}</div> + <div class="form-row"><label for="id_email">电子邮件(<i>用于头像显示服务</i>)</label><br />{{ form1.email }}</div> + <div class="submit-row"><input type="submit" class="submit" name="bnewaccount" value="创建帐号"></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">已经存在的用户</legend> + <div class="form-row"><label for="id_username">用户名</label><br />{{ form2.username }}</div> + <div class="form-row"><label for="id_passwordl">密码</label><br />{{ form2.password }}</div> + <div class="submit-row"><input type="submit" class="submit" name="bverify" value="确认"> <a href="">忘记密码?</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/sendpw.html b/templates/authopenid/sendpw.html new file mode 100644 index 00000000..237a5cf6 --- /dev/null +++ b/templates/authopenid/sendpw.html @@ -0,0 +1,33 @@ +{% extends "base.html" %} +{% block title %}{% spaceless %}发送新密码{% endspaceless %}{% endblock %} + +{% block content %} +<div id="main-bar" class=""> + <h3 >发送新密码</h3> + +</div> +<div class="paragraph"> +丢失了您的密码? 你可以在这里重设密码。<br> +请输入用户名,新的密码会发送到你注册时候填写的电子邮件。 +</div> +{% if form.errors %} +<p class="errors"><span class="big">请注意以下错误:</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">用户名: </label>{{ form.username }}</div> + + <p style="padding-top:10px"><input type="submit" value="重设密码"> <a href="{% url user_signin %}">返回登录</a></p> + + </form> + <span class="darkred">注意: 新的密码只有您在激活邮件中的链接后才会被激活。</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..c765b989 --- /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 }}账户设置</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 %}">修改密码</a></dt> + <dd>{% trans "Give your account a new password." %}</dd> + <dt>» <a href="{% url user_changeemail %}">更换电子邮件</a></dt> + <dd>{% trans "Add or update the email address associated with your account." %}</dd> + {% if is_openid %} + <dt>» <a href="{% url user_changeopenid %}">更换OpenID地址</a></dt> + <dd>{% trans "Change openid associated to your account" %}</dd> + {% endif %} + + <dt>» <a href="{% url user_delete %}">删除帐号</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..9c5511f2 --- /dev/null +++ b/templates/authopenid/signin.html @@ -0,0 +1,96 @@ +{% extends "base.html" %} +{% block title %}{% spaceless %}用户登录{% 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"> + 用户登录 +</div> +<div class="login"> + <form name="openid_form" action="{% url user_signin %}" method="post"> + {{ form2.next }} + <p style="display:none">CNProg支持<b>两种</b>登录模式。您可以使用帐号、密码登录,或者使用OpenID登录。</p> + {% if msg %} + <p class="warning">{{ msg }}</p> + {% endif %} + <fieldset class="fieldset"> + <legend ><strong>使用OpenID登录</strong></legend> + <div id="openid_choice"> + <p>请选择您的帐号类型并完成正确的OpenID地址(如:替换“{username}”为您的对应帐号):</p> + <div id="openid_btns"> + </div> + </div> + <br> + <br><br> + <p> + {{ form2.openid_url }} <input id="bsignin" name="bsignin" type="submit" value="登录" class="openid-login-submit" /> + </p> + </fieldset> + </form> + <div style="display:none"> + <br> + {% if form1.errors %} + <p class="errors"> + <span class="big">请注意以下错误:</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">使用帐号密码登录</legend> + <div class="form-row"><label for="id_username">用户名:</label><br />{{ form1.username }}</div> + <div class="form-row"><label for="id_password">密码:</label><br />{{ form1.password }}</div> + <div class="submit-row"><input type="submit" class="submit" name="blogin" value="登录"> <a href="">忘记密码?</a> <a href="">注册新帐号</a></div> + + </fieldset> + </form> + </div> +</div> +{% endblock %} + +{% block sidebar %} +<div class="boxC"> + <h3 class="subtitle">为什么需要OpenID登录?</h3> + <p> + <ul class="list-item"> + <li> + 构建在OpenID网络认证上的本系统,不需要你注册新的帐号,即可使用我们系统的所有功能 + </li> + <li> + 用同一个帐号可登录互联网所有激活OpenID的网站 + + </li> + <li> + 全世界有1.6亿OpenID帐号,和10,000个支持OpenID的站点 + + </li> + <li> + OpenID是有开放标准,并且有相关的基金组织提供支持 + + </li> + + </ul> + <a href="http://openid.net/what/" target="_blank" style="float:right;position:relative">查看更多 »</a><br> + <a href="http://openid.net/get/" target="_blank" style="float:right;position:relative">获取OpenID »</a> + </p> + <br> +</div> +{% endblock%} + diff --git a/templates/authopenid/signup.html b/templates/authopenid/signup.html new file mode 100644 index 00000000..e51544f7 --- /dev/null +++ b/templates/authopenid/signup.html @@ -0,0 +1,51 @@ +{% extends "base.html" %} +{% block title %}{% spaceless %}注册帐号{% endspaceless %}{% endblock %} + +{% block content %} +<div id="main-bar" class=""> + <h3 >注册帐号</h3> + +</div> +<div class="jointxt"> + <p>我们支持两种注册方式,你可以使用常规的用户名、密码方式注册,或者<a href="{% url user_signin %}">使用OpenID帐号注册</a>。</p> + + {% if form.errors %} + + <p class="errors"> + <span class="big">请注意以下错误:</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">常规注册</legend> + <div class="form-row"><label for="id_username">选择一个用户名:</label><br>{{ form.username }}</div> + + <div class="form-row"><label for="id_email">您的电子邮件地址:</label><br>{{ form.email }}</div> + <div class="form-row"><label for="id_password1">密码:</label><br />{{ form.password1 }}</div> + <div class="form-row"><label for="id_password2">确认密码:</label><br>{{ form.password2 }}</div> + <div class="submit-row"><input type="submit" class="submit" value="注册" > <a href="{% url user_signin %}">返回登录</a></div> + </fieldset> + <br > + </form> + <br > + <div style="display:none"> + <h2 class="signup">使用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="使用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 |