1 <%@ Master Language="C#" AutoEventWireup="true" CodeBehind="ExternalAuth.master.cs" Inherits="PumpkinHouse.Account.ExternalAuth" MasterPageFile="~/Account/Account.Master" %>
\r
3 <asp:Content ID="Head" runat="server" ContentPlaceHolderID="headHolder">
\r
4 <asp:ContentPlaceHolder ID="headHolder" runat="server">
\r
5 </asp:ContentPlaceHolder>
\r
6 <form runat="server">
\r
7 <asp:ScriptManager ID="ScriptManager1" runat="server">
\r
8 <CompositeScript ScriptMode="Release">
\r
10 <asp:ScriptReference Path="/Scripts/data.js" />
\r
11 <asp:ScriptReference Path="/Scripts/ajaxCall.js" />
\r
12 <asp:ScriptReference Path="/Scripts/util.js" />
\r
15 </asp:ScriptManager>
\r
17 <script type="text/javascript">
\r
18 var globalExternalPartner;
\r
19 var returnUrl = '<%= ReturnUrl %>';
\r
21 $('#newAccountForm').validate({
\r
24 required: '请输入注册邮箱',
\r
26 remote: '邮箱已存在?请切换到"绑定已有账号"'
\r
36 submitHandler: function () {
\r
37 var avatar = $('#avatar').attr('src');
\r
38 var user = new UserForRegistration($.trim($("#email").val()), $('#nickname').val(), $("#password").val(), avatar, $('#followMe').attr('checked') == 'checked', $('#advertise').attr('checked') == 'checked');
\r
39 ajaxRegisterAssociateAccount(true, user, function () { document.location = '/guide/step1.aspx'; }, handleFault);
\r
42 $('#existingAccountForm').validate({
\r
45 required: '请输入注册邮箱',
\r
52 submitHandler: function () {
\r
53 ajaxAssociateAccount(true, $("#email2").val(), $("#password2").val(), globalExternalPartner, function () { document.location = returnUrl; }, handleFault);
\r
59 $(document).ready(function () {
\r
60 $(".tabStepMenu1").click(function () {
\r
61 $(".tabStepMenu1 a").addClass("liSelected");
\r
62 $(".tabStepMenu2 a").removeClass("liSelected");
\r
63 $(".ConBox1").css("display", "block");
\r
64 $(".ConBox2").css("display", "none");
\r
66 $(".tabStepMenu2").click(function () {
\r
67 $(".tabStepMenu2 a").addClass("liSelected");
\r
68 $(".tabStepMenu1 a").removeClass("liSelected");
\r
69 $(".ConBox2").css("display", "block");
\r
70 $(".ConBox1").css("display", "none");
\r
77 <asp:Content ID="Content" runat="server" ContentPlaceHolderID="AccountContentHolder">
\r
78 <asp:ContentPlaceHolder ID="ContentHolder" runat="server">
\r
80 </asp:ContentPlaceHolder>
\r
82 <div class="tabStepMenu clearfix" style="margin-top:20px;">
\r
83 <ul class="float_l">
\r
84 <li class="tabStepMenu1"><a class="liSelected">创建新账号</a></li>
\r
85 <li class="tabStepMenu2"><a>绑定已有账号</a></li>
\r
89 <div class="ConBox1" style=" height:460px;">
\r
90 <form id="newAccountForm" >
\r
91 <div class="Congra-title"><h1>欢迎来到木头盒子,简单填写以下信息就OK啦!</h1></div>
\r
92 <div class="qsLoginBox">
\r
93 <dl class="float_l">
\r
94 <dd><img id="avatar" alt="头像" src="<%= User.AvatarUrl %>" width="180" height="180" /></dd>
\r
96 <ul class="float_l">
\r
97 <li>昵称<input type="text" id="nickname" value="<%= User.NickName %>" name="nickname" class="input required" remote="/PublicService/AccountService.svc/ajax/IsNicknameAvailable"/></li>
\r
98 <li>邮箱<input type="text" id="email" name="email" class="input required email" remote="/PublicService/AccountService.svc/ajax/IsEmailAvailable" /></li>
\r
99 <li>密码<input type="password" id="password" name="password" class="input required"/></li>
\r
101 <div class="clearfix"></div>
\r
104 <% if (ShowWeiboRequest)
\r
105 { %><input type="checkbox" id="followMe" class="ck" checked="checked" /><label for="followMe">关注木头盒子<%= WeiboName %></label><% } %>
\r
106 <% if (ShowAdvertiseRequest)
\r
107 { %><input type="checkbox" id="advertise" class="ck" checked="checked" /><label for="advertise">推荐我们给您的好友</label><%} %>
\r
109 <input type="submit" value="进入木头盒子" id="hasExistingBtn" class="Public-Btn-Box NextStep" />
\r
116 <div class="ConBox2 hide" style=" height:460px;">
\r
117 <form id="existingAccountForm" >
\r
118 <div class="Congra-title"><h1>您已经注册了木头盒子帐号,登录后我们会帮您绑定帐号。</h1></div>
\r
119 <div class="qsLoginBox">
\r
120 <ul class="float_l" style="margin-left:0px;">
\r
121 <li>邮箱<input type="text" id="email2" name="email2" class="input required email" /></li>
\r
122 <li>密码<input type="password" id="password2" name="password2" class="input required"/></li>
\r
124 <div class="clearfix"></div>
\r
126 <li><input type="checkbox" id="rememberMe" value="" name="rememberMe" class="ck" checked/> <label for="rememberMe">下次自动登录</label>
\r
128 <input type="submit" value="登录并绑定帐号" id="Submit1" class="Public-Btn-Box NextStep" />
\r