91 lines
5.4 KiB
Plaintext
91 lines
5.4 KiB
Plaintext
@{
|
|
var menus = (List<NP.Model.MenuPage>)ViewBag.Menus;
|
|
var em = new NP.Model.MenuPage();
|
|
var mainprivate = (menus.Where(w => w.refcode == "main.private").FirstOrDefault() ?? em);
|
|
var mainagree = (menus.Where(w => w.refcode == "main.agree").FirstOrDefault() ?? em);
|
|
}
|
|
@if (ViewBag.JoinOK)
|
|
{
|
|
<div class="joinScss">
|
|
<h5><span>시장경제교육원에</span> <span>가입해주셔서 감사합니다.</span></h5>
|
|
<p><span>회원가입이 완료되었으며, 아래 버튼을 클릭해주셔서 </span><span>로그인을 진행해주세요.</span></p>
|
|
<a href="/Account/Index">로그인 페이지로 이동</a>
|
|
</div>
|
|
}
|
|
else
|
|
{
|
|
<form action="/Account/Join" id="mform" method="post">
|
|
<div class="joinForm">
|
|
<ul>
|
|
<li><input type="text" id="userid" style="ime-mode:inactive" name="userid" placeholder="아이디(이메일)" maxlength="50" /></li>
|
|
<li><input type="password" id="userpass" name="userpass" placeholder="비밀번호" /></li>
|
|
<li><input type="password" id="userpass2" placeholder="비밀번호확인" /></li>
|
|
<li><input type="text" id="username" name="username" placeholder="이름" /></li>
|
|
@*<li><input type="text" id="email" style="ime-mode:inactive" name="email" maxlength="50" placeholder="이메일" /></li>*@
|
|
<li><input type="text" id="mobile" class="int nocomma" name="mobile" maxlength="13" placeholder="휴대전화번호" /></li>
|
|
<li class="joinCpny">
|
|
<input type="hidden" id="asno" name="asno" />
|
|
<input type="text" id="asname" placeholder="직장" readonly="readonly" disabled style="background-color: #ddd;" />
|
|
<a href="#" onclick="boxassignview()">검색</a>
|
|
</li>
|
|
</ul>
|
|
<div class="joinAgree">
|
|
<input type="checkbox" id="agree" />
|
|
<label for="agree">시장경제교육원의 <a href="#" onclick="viewlayer(@(mainagree.pno), this, '이용약관');">이용약관,</a> <a href="#" onclick="viewlayer(@(mainprivate.pno), this, '개인정보처리방침');">개인정보 처리방침</a>에 동의합니다.</label>
|
|
</div>
|
|
<a href="#" class="joinBtn" onclick="save()">동의 후 가입</a>
|
|
</div>
|
|
<input type="hidden" name="intval" id="intval" value="0" />
|
|
</form>
|
|
@Html.Partial("./Partial/BoxAssign", null, new ViewDataDictionary { { "bindmethod", "bindassign" },{"isjoin",1 } })
|
|
}
|
|
@section scripts{
|
|
<script>
|
|
function bindassign(v) {
|
|
$("#asno").val(v.split(':')[0]);
|
|
$("#asname").val(v.split(':')[1]);
|
|
}
|
|
$(document).ready(function () {
|
|
if ('@(ViewBag.JoinOK?1:0)' == '1') {
|
|
$("#pageTitle h3").text("회원가입 완료");
|
|
}
|
|
});
|
|
function save() {
|
|
setv("userid", val("userid").replace(/ /, '').replace(/ /, ''));
|
|
setv("userpass", val("userpass").replace(/ /, '').replace(/ /, ''));
|
|
setv("username", val("username").replace(/ /, '').replace(/ /, ''));
|
|
//setv("email", val("email").replace(/ /, '').replace(/ /, ''));
|
|
setv("mobile", val("mobile").replace(/ /, '').replace(/ /, ''));
|
|
setv("mobile", formatmobile(val("mobile")));
|
|
//var userid = val("userid").replace(/[^(0-9a-zA-Z)]/gi, '');
|
|
if (check("userid", null, "아이디를 입력해주세요.")) { }
|
|
else if (getBytes(val("userid")) < 5) { focus("userid"); msg("5글자 이상의 아이디를 입력해주세요."); }
|
|
else if (!isemail(val("userid"))) { focus("userid"); msg("ID는 이메일 형식으로 입력해주세요."); }
|
|
else if (check("userpass", null, "비밀번호를 입력해주세요.")) { }
|
|
else if (!ispassword(val("userpass"))) { focus("userpass"); msg("(8자 이상, 영문/숫자/특수기호 포함) 규칙으로 비밀번호를 입력해주세요."); }
|
|
else if (val("userpass") != val("userpass2")) { focus("userpass2"); msg("비밀번호 확인이 다릅니다."); }
|
|
else if (check("username", null, "이름을 입력해주세요.")) { }
|
|
//else if (!isemail(val("email"))) { focus("email"); msg("올바른 이메일주소를 입력해주세요."); }
|
|
else if (!ismobilenumber(val("mobile"))) {focus("mobile");msg("핸드폰번호를 확인해주세요.");}
|
|
else if (check("asno", null, "직장을 등록해주세요.")){ }
|
|
else if (!$("#agree").prop("checked")) { $("#agree").focus(); msg("이용약관/개인정보처리방침에 동의해주세요."); }
|
|
else {
|
|
cap("/focommon/join", "mform", "cbsave");
|
|
}
|
|
}
|
|
function cbsave() {
|
|
if (capResult.code == 1000) {
|
|
setv("intval", 1);
|
|
$("#mform").submit();
|
|
}
|
|
else if (capResult.obj == -1) {
|
|
focus("userid");
|
|
msg("이미 사용중인 아이디입니다.<br />다른 아이디를 사용해주세요.");
|
|
}
|
|
else if (capResult.obj == -2) {
|
|
focus("userid");
|
|
msg("이미 사용중인 이메일입니다.<br />다른 아이디를 사용해주세요.");
|
|
}
|
|
}
|
|
</script>
|
|
} |