From f552b41f4b337e6844f71c29ff177915abbfa417 Mon Sep 17 00:00:00 2001 From: Alvin Li Date: Fri, 4 Oct 2013 23:56:35 +0800 Subject: * indicator/static/javascripts/card_chart.js: improved the display position of 'detail_card_info' * indicator/templates/indicator/SheetDefault.html: destroy 'qtip' when close card * added new app 'apps/sfaccount' * implemented 'signup' and 'activate' functions * implemented async sending activation mail (using 'django-celery' and 'redis') * moved 'registration/*' templates to 'sfaccount/templates' * implemented 'password_change' function: o password_change o password_change_done * implemented 'password_reset' function o password_reset o password_reset_done o password_reset_confirm o password_reset_complete o re-write 'sfaccount.fomrs.SFPasswordResetForm' o re-write 'sfaccount.views.password_reset_view' * improved 'sfaccount.functional' send mail functions o to send 'multipart' mail * added 'README.txt' * added app 'apps/recommend': for comparing with the SCI papers and then recommending most related papers for user. --- .../sfaccount/templates/sfaccount/activate.html | 98 ++++++++++++++++++++++ .../templates/sfaccount/activation_email_body.txt | 9 ++ .../sfaccount/activation_email_subject.txt | 1 + .../apps/sfaccount/templates/sfaccount/login.html | 57 +++++++++++++ .../apps/sfaccount/templates/sfaccount/logout.html | 35 ++++++++ .../templates/sfaccount/password_change.html | 32 +++++++ .../templates/sfaccount/password_change_done.html | 35 ++++++++ .../templates/sfaccount/password_reset.html | 36 ++++++++ .../sfaccount/password_reset_complete.html | 37 ++++++++ .../sfaccount/password_reset_confirm.html | 53 ++++++++++++ .../templates/sfaccount/password_reset_done.html | 45 ++++++++++ .../templates/sfaccount/password_reset_email.html | 25 ++++++ .../templates/sfaccount/password_reset_email.txt | 13 +++ .../templates/sfaccount/password_reset_subject.txt | 1 + .../apps/sfaccount/templates/sfaccount/signup.html | 38 +++++++++ 15 files changed, 515 insertions(+) create mode 100644 97suifangqa/apps/sfaccount/templates/sfaccount/activate.html create mode 100644 97suifangqa/apps/sfaccount/templates/sfaccount/activation_email_body.txt create mode 100644 97suifangqa/apps/sfaccount/templates/sfaccount/activation_email_subject.txt create mode 100644 97suifangqa/apps/sfaccount/templates/sfaccount/login.html create mode 100644 97suifangqa/apps/sfaccount/templates/sfaccount/logout.html create mode 100644 97suifangqa/apps/sfaccount/templates/sfaccount/password_change.html create mode 100644 97suifangqa/apps/sfaccount/templates/sfaccount/password_change_done.html create mode 100644 97suifangqa/apps/sfaccount/templates/sfaccount/password_reset.html create mode 100644 97suifangqa/apps/sfaccount/templates/sfaccount/password_reset_complete.html create mode 100644 97suifangqa/apps/sfaccount/templates/sfaccount/password_reset_confirm.html create mode 100644 97suifangqa/apps/sfaccount/templates/sfaccount/password_reset_done.html create mode 100644 97suifangqa/apps/sfaccount/templates/sfaccount/password_reset_email.html create mode 100644 97suifangqa/apps/sfaccount/templates/sfaccount/password_reset_email.txt create mode 100644 97suifangqa/apps/sfaccount/templates/sfaccount/password_reset_subject.txt create mode 100644 97suifangqa/apps/sfaccount/templates/sfaccount/signup.html (limited to '97suifangqa/apps/sfaccount/templates') diff --git a/97suifangqa/apps/sfaccount/templates/sfaccount/activate.html b/97suifangqa/apps/sfaccount/templates/sfaccount/activate.html new file mode 100644 index 0000000..a81af6d --- /dev/null +++ b/97suifangqa/apps/sfaccount/templates/sfaccount/activate.html @@ -0,0 +1,98 @@ +{% extends "picture-base.html" %} +{% load staticfiles %} + +{% block title %} +激活账户 | 97 随访 +{% endblock %} + +{% block bodyclasses %}{{ block.super }} registration signup{% endblock %} +{% block othercss %} + +{% endblock %} + +{% block scripts %} + +{% endblock %} + +{% block body %} +

加入97随访   科学了解乙肝治疗

+ +
+

激活账户失败

+ 请检查激活码或激活链接。 +
+ 您也可以直接在下方输入激活码来完成账户激活。 +
+ +
+ 激活码 + +
+ +
+ +{% endblock body %} + + diff --git a/97suifangqa/apps/sfaccount/templates/sfaccount/activation_email_body.txt b/97suifangqa/apps/sfaccount/templates/sfaccount/activation_email_body.txt new file mode 100644 index 0000000..32be3e9 --- /dev/null +++ b/97suifangqa/apps/sfaccount/templates/sfaccount/activation_email_body.txt @@ -0,0 +1,9 @@ +尊敬的 {{ username }}, + +感谢您注册97随访(97suifang.com)。 + +您的激活码为 {{ activation_key }},请在 {{ expiration_days }} 天内激活账户,直接打开以下链接进行激活: +http://www.97suifang.com/accounts/activate/{{ activation_key }}/ + + +97随访 diff --git a/97suifangqa/apps/sfaccount/templates/sfaccount/activation_email_subject.txt b/97suifangqa/apps/sfaccount/templates/sfaccount/activation_email_subject.txt new file mode 100644 index 0000000..9a9a040 --- /dev/null +++ b/97suifangqa/apps/sfaccount/templates/sfaccount/activation_email_subject.txt @@ -0,0 +1 @@ +97随访(97suifang.com)账户激活 diff --git a/97suifangqa/apps/sfaccount/templates/sfaccount/login.html b/97suifangqa/apps/sfaccount/templates/sfaccount/login.html new file mode 100644 index 0000000..f5c7942 --- /dev/null +++ b/97suifangqa/apps/sfaccount/templates/sfaccount/login.html @@ -0,0 +1,57 @@ +{% extends "picture-base.html" %} +{% load staticfiles %} +{% block bodyclasses %}{{ block.super }} registration login{% endblock %} +{% block othercss %} + +{% endblock %} + +{% block title %} +登录 | 97随访 +{% endblock %} + +{% block body %} +

加入97随访   科学了解乙肝治疗

+

+

+ + 新浪微博账号登录 +

+ +

+ + 腾讯QQ账号登录 +

+ +
{% csrf_token %} + + + + + + + + + + + + + + + +   |   + 还没有帐号? +   |   + 忘记密码? +
+{% endblock body%} + +{# vim: set ts=2 sw=2 tw=0 fenc=utf-8 ft=htmldjango.html: #} diff --git a/97suifangqa/apps/sfaccount/templates/sfaccount/logout.html b/97suifangqa/apps/sfaccount/templates/sfaccount/logout.html new file mode 100644 index 0000000..0d05ae5 --- /dev/null +++ b/97suifangqa/apps/sfaccount/templates/sfaccount/logout.html @@ -0,0 +1,35 @@ +{% extends "picture-base.html" %} +{% load staticfiles %} + +{% block title %} +注销 | 97 随访 +{% endblock %} + +{% block othercss %} + +{% endblock %} + +{% block scripts %} + +{% endblock %} + +{% block body %} +

加入97随访   科学了解乙肝治疗

+ +

感谢您使用97随访!

+ +

+ +

+{% endblock body %} + + diff --git a/97suifangqa/apps/sfaccount/templates/sfaccount/password_change.html b/97suifangqa/apps/sfaccount/templates/sfaccount/password_change.html new file mode 100644 index 0000000..7918016 --- /dev/null +++ b/97suifangqa/apps/sfaccount/templates/sfaccount/password_change.html @@ -0,0 +1,32 @@ +{% extends "picture-base.html" %} +{% load staticfiles %} +{% block bodyclasses %}{{ block.super }} registration login{% endblock %} +{% block othercss %} + +{% endblock %} + +{% block title %} +修改密码 | 97随访 +{% endblock %} + +{% block body %} +

加入97随访   科学了解乙肝治疗

+ +

修改密码

+
{% csrf_token %} + + {% for item in form %} + + + + + {% endfor %} + + + +
+{% endblock body%} + +{# vim: set ts=2 sw=2 tw=0 fenc=utf-8 ft=htmldjango.html: #} diff --git a/97suifangqa/apps/sfaccount/templates/sfaccount/password_change_done.html b/97suifangqa/apps/sfaccount/templates/sfaccount/password_change_done.html new file mode 100644 index 0000000..ed91216 --- /dev/null +++ b/97suifangqa/apps/sfaccount/templates/sfaccount/password_change_done.html @@ -0,0 +1,35 @@ +{% extends "picture-base.html" %} +{% load staticfiles %} + +{% block title %} +修改密码 | 97 随访 +{% endblock %} + +{% block othercss %} + +{% endblock %} + +{% block scripts %} + +{% endblock %} + +{% block body %} +

加入97随访   科学了解乙肝治疗

+ +

密码修改成功!

+ +

+ +

+{% endblock body %} + + diff --git a/97suifangqa/apps/sfaccount/templates/sfaccount/password_reset.html b/97suifangqa/apps/sfaccount/templates/sfaccount/password_reset.html new file mode 100644 index 0000000..87421d3 --- /dev/null +++ b/97suifangqa/apps/sfaccount/templates/sfaccount/password_reset.html @@ -0,0 +1,36 @@ +{% extends "picture-base.html" %} +{% load staticfiles %} + +{% block title %} +重设密码 | 97 随访 +{% endblock %} + +{% block othercss %} + +{% endblock %} + +{% block body %} +

加入97随访   科学了解乙肝治疗

+ +

+ 忘记了密码? +

+

+ 请在下面输入您注册时使用的邮箱地址, + 我们将把重设密码的链接通过邮件发给您。 +

+ +
{% csrf_token %} + + + + + +
+ + {{ form.email.errors|join:"" }}
+ +
+{% endblock %} + + diff --git a/97suifangqa/apps/sfaccount/templates/sfaccount/password_reset_complete.html b/97suifangqa/apps/sfaccount/templates/sfaccount/password_reset_complete.html new file mode 100644 index 0000000..2027cd2 --- /dev/null +++ b/97suifangqa/apps/sfaccount/templates/sfaccount/password_reset_complete.html @@ -0,0 +1,37 @@ +{% extends "picture-base.html" %} +{% load staticfiles %} + +{% block title %} +重设密码 | 97 随访 +{% endblock %} + +{% block othercss %} + +{% endblock %} + +{% block scripts %} + +{% endblock %} + +{% block body %} +

加入97随访   科学了解乙肝治疗

+ +

重设密码成功!

+ +

+ 您的密码已经重新设置,现在您可以继续登录账户。 +

+ + +{% endblock %} + + diff --git a/97suifangqa/apps/sfaccount/templates/sfaccount/password_reset_confirm.html b/97suifangqa/apps/sfaccount/templates/sfaccount/password_reset_confirm.html new file mode 100644 index 0000000..8522af5 --- /dev/null +++ b/97suifangqa/apps/sfaccount/templates/sfaccount/password_reset_confirm.html @@ -0,0 +1,53 @@ +{% extends "picture-base.html" %} +{% load staticfiles %} + +{% block title %} +重设密码 | 97随访 +{% endblock %} + +{% block othercss %} + +{% endblock %} + +{% block scripts %} + +{% endblock %} + +{% block body %} +

加入97随访   科学了解乙肝治疗

+ + {% if validlink %} +

请设置新密码

+ +
{% csrf_token %} + + {% for item in form %} + + + + + {% endfor %} +
+ + {{ item.errors|join:"" }}
+ +
+ {% else %} +

重设密码失败

+ +

您使用的密码重设链接无效,可能因为该链接已被使用过。

+

您可以尝试重新申请重设密码。

+ + {% endif %} +{% endblock %} + + diff --git a/97suifangqa/apps/sfaccount/templates/sfaccount/password_reset_done.html b/97suifangqa/apps/sfaccount/templates/sfaccount/password_reset_done.html new file mode 100644 index 0000000..c7bd9a3 --- /dev/null +++ b/97suifangqa/apps/sfaccount/templates/sfaccount/password_reset_done.html @@ -0,0 +1,45 @@ +{% extends "picture-base.html" %} +{% load staticfiles %} + +{% block title %} +重设密码 | 97 随访 +{% endblock %} + +{% block othercss %} + +{% endblock %} + +{% block scripts %} + +{% endblock %} + +{% block body %} +

加入97随访   科学了解乙肝治疗

+ +

+ 密码重设邮件已发送! +

+

+ 我们已经向您提交的邮箱地址发送了密码重设说明, + 请注意查收邮件,并按邮件说明来重新设置密码。 +

+ +

+ 还没收到邮件?您可以尝试再次申请重设密码。 +

+

+ +

+ +{% endblock %} + + diff --git a/97suifangqa/apps/sfaccount/templates/sfaccount/password_reset_email.html b/97suifangqa/apps/sfaccount/templates/sfaccount/password_reset_email.html new file mode 100644 index 0000000..beae46f --- /dev/null +++ b/97suifangqa/apps/sfaccount/templates/sfaccount/password_reset_email.html @@ -0,0 +1,25 @@ +{% autoescape off %} + + + +

尊敬的 {{ user.username }},

+ +

您收到该邮件是因为您已请求重设97随访({{ domain }})账户的密码。

+ +

请打开以下链接来为您的账户设置新密码:
+ {% block reset_link %} + {{ protocol }}://{{ domain }}{% url django.contrib.auth.views.password_reset_confirm uidb36=uid, token=token %} + {% endblock %} +

+ +

您的登录用户名为: {{ user.username }}

+
+ + +

感谢您使用我们的产品!

+
+ +

97随访 团队

+ + +{% endautoescape %} diff --git a/97suifangqa/apps/sfaccount/templates/sfaccount/password_reset_email.txt b/97suifangqa/apps/sfaccount/templates/sfaccount/password_reset_email.txt new file mode 100644 index 0000000..20c817c --- /dev/null +++ b/97suifangqa/apps/sfaccount/templates/sfaccount/password_reset_email.txt @@ -0,0 +1,13 @@ +尊敬的 {{ user.username }}, + +您收到该邮件是因为您已请求重设97随访({{ domain }})账户的密码。 + +请打开以下链接来为您的账户设置新密码: +{{ protocol }}://{{ domain }}{% url django.contrib.auth.views.password_reset_confirm uidb36=uid, token=token %} + +您的登录用户名为: {{ user.username }} + + +感谢您使用我们的产品! + +97随访 团队 diff --git a/97suifangqa/apps/sfaccount/templates/sfaccount/password_reset_subject.txt b/97suifangqa/apps/sfaccount/templates/sfaccount/password_reset_subject.txt new file mode 100644 index 0000000..b980ba1 --- /dev/null +++ b/97suifangqa/apps/sfaccount/templates/sfaccount/password_reset_subject.txt @@ -0,0 +1 @@ +97随访(97suifang.com)密码重设 diff --git a/97suifangqa/apps/sfaccount/templates/sfaccount/signup.html b/97suifangqa/apps/sfaccount/templates/sfaccount/signup.html new file mode 100644 index 0000000..bf6c193 --- /dev/null +++ b/97suifangqa/apps/sfaccount/templates/sfaccount/signup.html @@ -0,0 +1,38 @@ +{% extends "picture-base.html" %} +{% load staticfiles %} + +{% block title %} +注册账户 | 97随访 +{% endblock %} + +{% block bodyclasses %}{{ block.super }} registration signup{% endblock %} +{% block othercss %} + +{% endblock %} +{% block body %} +

加入97随访   科学了解乙肝治疗

+
{% csrf_token %} + + {% for item in form %} + + + + + + {% endfor %} +
+ + {{ item.help_text }}{{ item.errors|join:"" }}
+ + {% for error in form.non_field_errors %} + + + + {% endfor %} +
{{ error }}
+ + +   |   + 已有账号 +
+{% endblock body %} -- cgit v1.2.2