login.html
3.59 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<title>小程序管理平台 | 登录</title>
{% load staticfiles %}
<!-- Tell the browser to be responsive to screen width -->
<meta content="width=device-width, initial-scale=1, maximum-scale=1, user-scalable=no" name="viewport">
<!-- Bootstrap 3.3.5 -->
<link rel="stylesheet" href="{% static "css/bootstrap.min.css"%}" >
<!-- Font Awesome -->
<link rel="stylesheet" href="{% static "css/font-awesome.min.css"%}">
<!-- Ionicons -->
<link rel="stylesheet" href="{% static "css/ionicons.min.css"%}">
<!-- Theme style -->
<link rel="stylesheet" href="{% static "css/AdminLTE.min.css"%}">
<!-- HTML5 Shim and Respond.js IE8 support of HTML5 elements and media queries -->
<!-- WARNING: Respond.js doesn't work if you view the page via file:// -->
<!--[if lt IE 9]>
<script src="{% static "js/html5shiv.min.js"%}"></script>
<script src="{% static "js/respond.min.js"%}"></script>
<![endif]-->
</head>
<body class="hold-transition login-page">
<div class="login-box">
<div class="login-logo">
<a href="/"><b>小程序管理平台</b></a>
</div><!-- /.login-logo -->
<div class="login-box-body">
<form name="loginform" action="/account/login/" method="post" onsubmit="return checkempty();" class="margin-bottom-0" autocomplete="off">
{% csrf_token %}
<div class="form-group has-feedback">
<input type="text" id='username' name='username' class="form-control input-lg" placeholder="工号" />
<span class="glyphicon glyphicon-user form-control-feedback"></span>
</div>
<div class="form-group has-feedback">
<input type="password" id='password' name='password' class="form-control input-lg" placeholder="密码" />
<span class="glyphicon glyphicon-lock form-control-feedback"></span>
</div>
<div class="row">
<div class="col-xs-8">
<div class="checkbox icheck">
<label>
{% comment %}
<input type="checkbox"> Remember Me
{% endcomment %}
</label>
</div>
</div><!-- /.col -->
<div class="col-xs-4">
<button type="submit" class="btn btn-primary btn-block btn-flat">登录</button>
</div><!-- /.col -->
</div>
</form>
<a href="">忘记密码</a><br>
<a href="class="text-center">账号申请</a>
<p style="color:red">注意:本平台不支持IE,请使用chrome或者safari</p>
</div><!-- /.login-box-body -->
</div><!-- /.login-box -->
<script>
var alert_msg = {{ alert_msg }}
if (alert_msg == 1){
alert ('用户名或密码不能为空')};
if (alert_msg == 2){
alert ('账号或密码错误')};
</script>
<script>
function checkempty(){
if ($("#username").val() ==""){
alert('用户名不能为空');
$("#username").focus();
return false;
}
if ($("#password").val() ==""){
alert('用户名不能为空');
$("#password").focus();
return false;
}
return true;
}
</script>
<!-- jQuery 2.1.4 -->
<script src="{%static "js/jQuery-2.1.4.min.js"%}"></script>
<!-- Bootstrap 3.3.5 -->
<script src="{%static "js/bootstrap.min.js" %}"></script>
</body>
</html>