<!DOCTYPE html>
<html>
<head>
    <meta charset="utf-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <title>登录JPress</title>
    <meta content="width=device-width, initial-scale=1, maximum-scale=1, user-scalable=no" name="viewport">
    <link rel="stylesheet" href="#(CPATH)/static/components/bootstrap/css/bootstrap.min.css">
    <link rel="stylesheet" href="#(CPATH)/static/components/font-awesome/css/font-awesome.min.css">
    <link rel="stylesheet" href="#(CPATH)/static/components/ionicons/css/ionicons.min.css">
    <link rel="stylesheet" href="#(CPATH)/static/adminlte/css/AdminLTE.min.css">

    <!--[if lt IE 9]>
    <script src="#(CPATH)/static/html5shiv/html5shiv.min.js"></script>
    <script src="#(CPATH)/static/respond/respond.min.js"></script>
    <![endif]-->
    <style>
        .login-page {
            background-image: url("#(CDN)#(CPATH)/static/commons/img/bg.png");
            background-size: cover;
        }

        .login-box {
            padding-top: 100px;
        }

        .form-group {
            text-align: left;
        }
    </style>
</head>
<body class="hold-transition login-page">

<div class="row">
    <div class="login-box text-center">
        <div class="login-box-body">
            <form action="#(CPATH)#(action)" method="post" id="form" class="autoAjaxSubmit" data-ok-href="#(CPATH)/admin/index" data-fail-function="loginFail">

                <div class="form-group">
                    <label>账号</label>
                    <input type="text" class="form-control" placeholder="请输入账号或邮箱" name="user">
                </div>

                <div class="form-group">
                    <label>密码</label>
                    <input type="password" class="form-control" placeholder="及密码..." name="pwd">
                </div>

                <div class="form-group">
                    <label style="display: block;">验证码</label>
                        <input type="text" class="form-control " style="float: left;width: 70%;" placeholder="请输入验证码" name="captcha">
                        <img id="captchaImg" src="#(CPATH)/commons/captcha" style="float: right;height: 34px;" onclick="this.src='#(CPATH)/commons/captcha?d='+Math.random();" cdn-exclude>

                </div>

                <div class="row" style="padding-top: 30px;">
                    <div class="col-xs-12" style="padding-top: 15px">
                        <button type="submit" class="btn btn-primary btn-block btn-flat"> 登 录 </button>
                    </div>
                </div>
            </form>
        </div>
    </div>
</div>

<script src="#(CPATH)/static/components/jquery/jquery.min.js"></script>
<script src="#(CPATH)/static/components/jquery/jquery.form.min.js"></script>
<script src="#(CPATH)/static/components/bootstrap/js/bootstrap.min.js"></script>
<script src="#(CPATH)/static/commons/jpresscommons.js"></script>
<script>
    function loginFail(result) {
        showErrorMessage(result.message);
        $('#captchaImg').attr('src', '#(CPATH)/commons/captcha?d='+Math.random())
    }
</script>
</body>
</html>
