diff options
Diffstat (limited to '97suifangqa/apps/sfaccount/templates')
15 files changed, 515 insertions, 0 deletions
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 %} +<link rel="stylesheet" href="{% static "stylesheets/sass/registration.css" %}"> +{% endblock %} + +{% block scripts %} + <script type="text/javascript"> + // activate account url + var activate_url = '{% url activate %}'; + + $(document).ready(function(){ + // validate key input + $("#activation_key").focus(function() { + $(this).removeClass("valid invalid"); + }); + $("#activation_key").on("validate", null, function() { + var sha1_regex = /^[0-9a-f]{40}$/; + var key_raw = $(this).val(); + var key = htmlEscape(key_raw.toLowerCase()); + if (sha1_regex.test(key)) { + // key in valid format + $(this).removeClass("invalid"); + $(this).addClass("valid"); + } + else { + $(this).removeClass("valid"); + $(this).addClass("invalid"); + } + }); + + // sumbit key to activate account + $("#activate_account").on('submit', null, function() { + // validate key first + $("#activation_key").trigger("validate"); + if ($(".invalid").length) { + // there exists invalid input + return false; + } + else { + // submit + var key_raw = $("#activation_key").val(); + var key = htmlEscape(key_raw.toLowerCase()); + var target_url = activate_url + key + '/'; + //console.log(target_url); + window.location.href = target_url; + } + }); + $("#activate_account").on('click', null, function() { + $(this).trigger('submit'); + }); + $("#activation_key").on('keypress', null, function(e) { + var keycode = (e.keyCode ? e.keyCode : e.which); + if (keycode == 13) { + $("#activate_account").trigger('submit'); + return false; + } + }); + + }); + + function htmlEscape(str) { + return String(str) + .replace(/&/g, '&') + .replace(/"/g, '"') + .replace(/'/g, ''') + .replace(/</g, '<') + .replace(/>/g, '>'); + } + </script> +{% endblock %} + +{% block body %} + <h2>加入97随访   科学了解乙肝治疗</h2> + + <div class="activate_failed" style="display: {% if activate_failed %}block{% else %}none{% endif %} ;"> + <h4>激活账户失败</h4> + 请检查激活码或激活链接。 + <br /> + 您也可以直接在下方输入激活码来完成账户激活。 + </div> + + <div class="activation"> + <span class="prompt">激活码</span> + <input type="text" id="activation_key" /> + <br /> + <input type="button" id="activate_account" value="激活账户" /> + </div> + +{% endblock body %} + +<!-- vim: set ts=8 sw=2 tw=0 fenc=utf-8 ft=htmldjango.html: --> 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 %} +<link rel="stylesheet" href="{% static "stylesheets/sass/registration.css" %}"> +{% endblock %} + +{% block title %} +登录 | 97随访 +{% endblock %} + +{% block body %} +<h2>加入97随访   科学了解乙肝治疗</h2> +<p></p> +<p> + <img src="{% static "images/sinalogo.png" %}" alt="" style="width: 2.5em; vertical-align: middle;"> + 新浪微博账号登录 + </p> + + <p> + <img src="{% static "images/qqlogo.png" %}" alt="" style="width: 2.5em; vertical-align: middle;"> + 腾讯QQ账号登录 + </p> + + <form method="post">{% csrf_token %} + <table class="reg-form login-form"> + <tr> + <!-- + <td class="login-prompt"> + <span class="prompt">或者直接用邮箱登陆</span> + </td> + <td></td> + --> + </tr> + <tr> + <td> + <input type="text" name="{{ form.username.name }}" value="{{ form.username.value|default_if_none:"" }}" maxlength="80" placeholder="{{ form.username.label }}" class="username "> + </td> + <td rowspan="2" class="error"> + {{form.non_field_errors|first}} + </td> + </tr> + <tr> + <td><input type="password" name="{{ form.password.name }}" placeholder="{{ form.password.label }}" class="password"></td> + </tr> + </table> + + <input type="hidden" name="next" value="{{ next }}" /> + <input type="submit" value="登 录" class="submit login"/> +   |   + <a href="{% url signup %}">还没有帐号?</a> +   |   + <a href="{% url password_reset %}">忘记密码?</a> + </form> +{% 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 %} +<link rel="stylesheet" href="{% static "stylesheets/sass/registration.css" %}"> +{% endblock %} + +{% block scripts %} + <script type="text/javascript"> + // login url + var login_url = '{% url login %}'; + + $(document).ready(function() { + $("#re-login").bind("click", function() { + window.location.href = login_url; + }); + }); + </script> +{% endblock %} + +{% block body %} + <h2>加入97随访   科学了解乙肝治疗</h2> + + <p>感谢您使用97随访!</p> + + <p> + <input type="button" id="re-login" value="重新登录" /> + </p> +{% endblock body %} + +<!-- vim: set ts=8 sw=2 tw=0 fenc=utf-8 ft=htmldjango.html: --> 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 %} +<link rel="stylesheet" href="{% static "stylesheets/sass/registration.css" %}"> +{% endblock %} + +{% block title %} +修改密码 | 97随访 +{% endblock %} + +{% block body %} + <h2>加入97随访   科学了解乙肝治疗</h2> + + <h3>修改密码</h3> + <form action="" method="post">{% csrf_token %} + <table class="change-password-form login-form"> + {% for item in form %} + <tr> + <td> + <input type="{{ item.field.widget.input_type }}" name="{{ item.name }}" {% if item.field.widget.input_type == "text" %}value="{{ item.value|default_if_none:"" }}"{% endif %} placeholder="{{ item.label }}" class="{{ item.name }}" /> + </td> + <td class="error">{{ item.errors|join:"" }}</td> + </tr> + {% endfor %} + </table> + + <input type="submit" value="修改密码" class="submit change-password" /> + </form> +{% 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 %} +<link rel="stylesheet" href="{% static "stylesheets/sass/registration.css" %}"> +{% endblock %} + +{% block scripts %} + <script type="text/javascript"> + // login url + var home_url = '{% url go_home %}'; + + $(document).ready(function() { + $("#go-home").bind("click", function() { + window.location.href = home_url; + }); + }); + </script> +{% endblock %} + +{% block body %} + <h2>加入97随访   科学了解乙肝治疗</h2> + + <h4>密码修改成功!</h4> + + <p> + <input type="button" id="go-home" value="返回个人主页" /> + </p> +{% endblock body %} + +<!-- vim: set ts=8 sw=2 tw=0 fenc=utf-8 ft=htmldjango.html: --> 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 %} +<link rel="stylesheet" href="{% static "stylesheets/sass/registration.css" %}"> +{% endblock %} + +{% block body %} + <h2>加入97随访   科学了解乙肝治疗</h2> + + <p> + 忘记了密码? + </p> + <p> + 请在下面输入您注册时使用的邮箱地址, + 我们将把重设密码的链接通过邮件发给您。 + </p> + + <form action="" method="post">{% csrf_token %} + <table class="password-reset"> + <tr> + <td> + <input type="text" name="email" value="{{ form.email.value|default_if_none:"" }}" placeholder="您注册时的邮箱地址" class="email"> + </td> + <td class="error">{{ form.email.errors|join:"" }}</td> + </tr> + </table> + <input type="submit" value="申请重设密码" /> + </form> +{% endblock %} + +<!-- vim: set ts=8 sw=2 tw=0 fenc=utf-8 ft=htmldjango.html: --> 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 %} +<link rel="stylesheet" href="{% static "stylesheets/sass/registration.css" %}"> +{% endblock %} + +{% block scripts %} + <script type="text/javascript"> + // login url + var login_url = '{% url login %}'; + + $(document).ready(function() { + $("#login").bind("click", function() { + window.location.href = login_url; + }); + }); + </script> +{% endblock %} + +{% block body %} + <h2>加入97随访   科学了解乙肝治疗</h2> + + <h4>重设密码成功!</h4> + + <p> + 您的密码已经重新设置,现在您可以继续登录账户。 + </p> + + <input type="button" id="login" value="登录账户" /> +{% endblock %} + +<!-- vim: set ts=8 sw=2 tw=0 fenc=utf-8 ft=htmldjango.html: --> 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 %} +<link rel="stylesheet" href="{% static "stylesheets/sass/registration.css" %}"> +{% endblock %} + +{% block scripts %} + <script type="text/javascript"> + // password_reset url + var password_reset_url = '{% url password_reset %}'; + + $(document).ready(function() { + $("#password-reset").bind("click", function() { + window.location.href = password_reset_url; + }); + }); + </script> +{% endblock %} + +{% block body %} + <h2>加入97随访   科学了解乙肝治疗</h2> + + {% if validlink %} + <h4>请设置新密码</h4> + + <form action="" method="post">{% csrf_token %} + <table class="password-reset"> + {% for item in form %} + <tr> + <td> + <input type="{{ item.field.widget.input_type }}" name="{{ item.name }}" {% if item.field.widget.input_type == "text" %}value="{{ item.value|default_if_none:"" }}"{% endif %} placeholder="{{ item.label }}" class="{{ item.name }}"> + </td> + <td class="error">{{ item.errors|join:"" }}</td> + </tr> + {% endfor %} + </table> + <input type="submit" class="sumbit password-reset" value="重设密码" /> + </form> + {% else %} + <h4>重设密码失败</h4> + + <p>您使用的密码重设链接无效,可能因为该链接已被使用过。</p> + <p>您可以尝试重新申请重设密码。</p> + <input type="button" id="password-reset" value="申请重设密码" /> + {% endif %} +{% endblock %} + +<!-- vim: set ts=8 sw=2 tw=0 fenc=utf-8 ft=htmldjango.html: --> 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 %} +<link rel="stylesheet" href="{% static "stylesheets/sass/registration.css" %}"> +{% endblock %} + +{% block scripts %} + <script type="text/javascript"> + // password_reset url + var password_reset_url = '{% url password_reset %}'; + + $(document).ready(function() { + $("#password-reset").bind("click", function() { + window.location.href = password_reset_url; + }); + }); + </script> +{% endblock %} + +{% block body %} + <h2>加入97随访   科学了解乙肝治疗</h2> + + <h4> + 密码重设邮件已发送! + </h4> + <p> + 我们已经向您提交的邮箱地址发送了密码重设说明, + 请注意查收邮件,并按邮件说明来重新设置密码。 + </p> + + <p> + 还没收到邮件?您可以尝试再次申请重设密码。 + </p> + <p> + <input type="button" id="password-reset" value="申请重设密码" /> + </p> + +{% endblock %} + +<!-- vim: set ts=8 sw=2 tw=0 fenc=utf-8 ft=htmldjango.html: --> 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 %} +<html> + <head></head> + <body> + <p>尊敬的 {{ user.username }},</p> + + <p>您收到该邮件是因为您已请求重设97随访({{ domain }})账户的密码。</p> + + <p>请打开以下链接来为您的账户设置新密码:<br /> + {% block reset_link %} + {{ protocol }}://{{ domain }}{% url django.contrib.auth.views.password_reset_confirm uidb36=uid, token=token %} + {% endblock %} + </p> + + <p>您的登录用户名为: {{ user.username }}</p> + <br /> + + + <p>感谢您使用我们的产品!</p> + <br /> + + <p>97随访 团队</p> + </body> +</html> +{% 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 %} +<link rel="stylesheet" href="{% static "stylesheets/sass/registration.css" %}"> +{% endblock %} +{% block body %} +<h2>加入97随访   科学了解乙肝治疗</h2> +<form action="" method="post">{% csrf_token %} + <table class="reg-form register-form"> + {% for item in form %} + <tr> + <td> + <input type="{{ item.field.widget.input_type }}" name="{{ item.name }}" {% if item.field.widget.input_type == "text" %}value="{{ item.value|default_if_none:"" }}"{% endif %} placeholder="{{ item.label }}" class="{{ item.name }}"> + </td> + <td class="help">{{ item.help_text }}</td> + <td class="error">{{ item.errors|join:"" }}</td> + </tr> + {% endfor %} + </table> + <table class="form-errors"> + {% for error in form.non_field_errors %} + <tr> + <td>{{ error }}</td> + </tr> + {% endfor %} + </table> + + <input type="submit" value="提交注册" class="submit register"/> +   |   + <a href="{% url login %}">已有账号</a> +</form> +{% endblock body %} |