<%@ page contentType="text/html;charset=UTF-8" %>
<%@ include file="/WEB-INF/views/include/taglib.jsp" %>
<html>
<head>
    <title><spring:message code="user.login.submit"/></title>
    <meta name="decorator" content="default"/>
    <%@include file="/WEB-INF/views/include/head.jsp" %>
    <link rel="stylesheet" href="${ctxStatic}/common/login.css">
    <script type="text/javascript">
        $(document).ready(function () {
            $("#adminLogin").click(function () {
                $("#adminLogin").addClass("on");
                $("#markLogin").removeClass("on");
                $("#loginType").attr("value", "admin-login");
            });
            $("#markLogin").click(function () {
                $("#markLogin").addClass("on");
                $("#adminLogin").removeClass("on");
                $("#loginType").attr("value", "mark-login");
            });
            if (self.frameElement && self.frameElement.tagName == "IFRAME") {
                parent.location.reload();
            }
            load();
        });
    </script>
</head>
<body>
<div class="container">
    <div class="middle cl">
        <div class="left">
            <%-- <div class="logo"><img
                    src="${ctxStatic}/images/<c:if test="${indexLogo ==null||indexLogo =='' }">logo@2x.png</c:if><c:if test="${indexLogo !=null }">${indexLogo }</c:if>"/>
            </div> --%>
            <p>
				<a target="_blank" style="color: rgba(255,255,255,.65)">v${versionName} beta${versionDate}</a><br/>
				<a href="https://beian.miit.gov.cn/" target="_blank" style="color: rgba(255,255,255,.65)">鄂ICP备12000033号-3</a>
			</p>
        </div>
        <div class="right">
            <div class="title">
                <h1 data-i18n-text="user.login.title">阅卷平台登录</h1>
                <%-- <c:if test="${loginType == 'admin-login' }"><p data-i18n-text="user.login.admin">管理员登录</p></c:if> --%>
                <c:if test="${loginType == 'mark-login-only' }"><p data-i18n-text="user.login.marker">评卷员登录</p></c:if>
                <c:if test="${loginType != 'mark-login-only' }">
                    <p><span><a href="#"
                                <c:if test="${loginType == 'admin-login'||loginType == null }">class="on"</c:if> id="adminLogin" data-i18n-text="user.login.admin">管理员登录</a></span>
                        <span><a href="#"
                                 <c:if test="${loginType == 'mark-login' }">class="on"</c:if> id="markLogin" data-i18n-text="user.login.marker">评卷员登录</a></span></p>
                </c:if>
            </div>
            <div class="loginbox">
                <form action=<c:if test="${loginType != 'mark-login-only' }">"${ctx}/login"
                </c:if>
                <c:if test="${loginType == 'mark-login-only' }">"${ctx}/mark-login"</c:if> method="post" role="form" id="loginForm">
                <input type="hidden" id="loginType" name="loginType" value=<c:if test="${loginType == null}">'admin-login'</c:if>
                <c:if test="${loginType != null}">"${loginType}"</c:if>/>
                <div class="input-group">
                	 <img src="${ctxStatic}/images/userid.png" class="input-icon">
                    <input type="text" class="form-control required" id="loginName" name="loginName" placeholder="请输入账号"
                           autocomplete="off" value="${loginName }" data-i18n-placeholder="user.login.name"/>
                </div>
                <div class="input-group input-top">
                	<img src="${ctxStatic}/images/password.png" class="input-icon">
                    <input type="password" class="form-control required" id="password" name="password" placeholder="请输入密码"
                           autocomplete="off" data-i18n-placeholder="user.login.password"/>
                </div>
                <c:if test="${message != null }">
                    <div class="point <c:if test="${message != null }"></c:if><c:if test="${message == null }">hide</c:if>">
                        <em class="error"><spring:message code="${message }"/></em>
                    </div>
                </c:if>
                <div class="login-btn"><input class="opacity" type="submit" value="登录" data-i18n-value="user.login.submit"/></div>
                </form>
            </div>
        </div>
    </div>
</div>
</body>
</html>
