#include("./common/header.html", {active:"signin", title:"登录"})
<div class="container">
    <div class="row">
        <div class="col-md-9">
			<div class="col-md-6 app layout-fixed-header bg-white usersession box">
				<div class="full-height">
					<div class=center-wrapper>
						<div class="center-content">
							<div class="row no-margin col-md-8">
								<form id="signin_form" role="form" action="${base_url('/signin')}" class="form-layout" method="post"/>
									<p class="text-center mb30">欢迎来到JavaChina, 请输入账号登录。</p>
									#if(null != error)
									<div class="alert alert-danger">${error}</div>
									#end
									<div class=form-inputs>
										<input type="text" class="form-control input-lg" name="login_name"
											placeholder="请输入账号或者邮箱" required="required" value="${login_name}"/> 
										<input type="password" class="form-control input-lg" name="pass_word"
											placeholder="请输入登录密码" required="required" />
										<label class="cb-checkbox cb-md">
											<span class="cb-inner"><i><input type="checkbox" name="rememberme" checked="checked"/></i></span>记住我
										</label>
									</div>
									<button class="btn btn-success btn-block btn-lg mb15 ladda-button" data-style="zoom-out" type="submit">
										<span class="ladda-label">登&nbsp;录</span>
									</button>
									<p>
										<a href="${base_url('/signup')}">注册账号</a> ·
										<a href="${base_url('/oauth/github')}">使用Github帐号登录</a> ·
										<a href="${base_url('/forgot')}">忘记密码?</a>
									</p>
								</form>
							</div>
						</div>
					</div>
				</div>
			</div>			        	
        </div>
        #include("./common/sidebar.html")
    </div>
</div>
#include("./common/footer.html")
<script>
$('#signin_form .ladda-button').on('click', function(){
	var form = $('#signin_form')[0];
	if(form.checkValidity()) {
		var obj = Ladda.create(this);
		obj.start();
		$('#signin_form').submit();
	}
	return true;
});
</script>
</body>
</html>