login.jsp
4.9 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
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
<%@ include file="/common/taglibs.jsp" %>
<head>
<title><fmt:message key="login.title"/></title>
<meta name="menu" content="Login"/>
</head>
<body id="login">
<form method="post" id="loginForm" action="<c:url value='/j_security_check'/>"
onsubmit="saveUsername(this);return validateForm(this)" class="form-signin" autocomplete="off">
<h3 class="form-title">
<fmt:message key="login.heading"/>
</h3>
<c:if test="${param.error != null}">
<div class="alert alert-danger alert-dismissable">
<fmt:message key="errors.password.mismatch"/>
</div>
</c:if>
<div class="form-group">
<div class="input-group">
<input type="text" name="j_username" id="j_username" class="form-control form-control-solid placeholder-no-fix"
placeholder="<fmt:message key="label.username"/>" required tabindex="1" style="background-image: none;">
<span class="input-group-addon" id="j_username_icon"><i class="fa fa-keyboard-o"></i></span>
</div>
</div>
<div class="form-group">
<div class="input-group">
<input type="password" class="form-control form-control-solid placeholder-no-fix" name="j_password" id="j_password" tabindex="2"
placeholder="<fmt:message key="label.password"/>" required style="background-image: none;">
<span class="input-group-addon" id="j_password_icon"><i class="fa fa-keyboard-o"></i></span>
</div>
</div>
<div class="form-actions">
<button type="submit" class="btn btn-success uppercase" name="login" tabindex="4">
<fmt:message key='button.login'/>
</button>
<c:if test="${appConfig['rememberMeEnabled']}">
<label for="rememberMe" class="rememberme check">
<input type="checkbox" name="_spring_security_remember_me" id="rememberMe" tabindex="3"/>
<fmt:message key="login.rememberMe"/></label>
</c:if>
</div>
</form>
<%--<p>--%>
<%--<fmt:message key="login.signup">--%>
<%--<fmt:param><c:url value="/signup"/></fmt:param>--%>
<%--</fmt:message>--%>
<%--</p>--%>
<c:set var="scripts" scope="request">
<script src="${ctx}/scripts/login.js?id=1"></script>
<script>
$(document).ready(function() {
$('#j_username').keyboard({
openOn : null,
stayOpen : true,
layout : 'qwerty'
});
$('#j_username_icon').click(function(){
var kb = $('#j_username').getkeyboard();
// close the keyboard if the keyboard is visible and the button is clicked a second time
if (kb.isOpen ) {
kb.close();
} else {
kb.reveal();
}
});
$('#j_password').keyboard({
openOn : null,
stayOpen : true,
layout : 'qwerty'
});
$('#j_password_icon').click(function(){
var kb = $('#j_password').getkeyboard();
// close the keyboard if the keyboard is visible and the button is clicked a second time
if (kb.isOpen ) {
kb.close();
} else {
kb.reveal();
}
});
});
</script>
</c:set>
<%--<p><fmt:message key="login.passwordHint"/></p>--%>
<%--<p><fmt:message key="updatePassword.requestRecoveryTokenLink"/></p>--%>
<!--
<script type="text/javascript" src="/scripts/jquery-2.1.4.js"/>
<script type="text/javascript">
function test() {
alert("this is test");
}
$("#j_username").change(
function loginOnChange() {
//alert($('#j_username').val());
$.ajax({
type: 'GET',
contentType: 'application/json',
url: 'a/checkExists/loginName/' + $('#j_username').val(),
dataType: 'json',
success: function (data) {
if (data && data.exists) {
//$('log_tip_div').style.display = "inline";
$('form-signin-heading').innerHTML = "该用户名已经被使用";
// canSub = false;
// loginUserError = true;
// isLoginUserExists = true;
} else {
//log_tip_div.style.display = "inline";
$('form-signin-heading').innerHTML = "用户名可以使用";
// canSub = true;
// loginUserError = false;
// isLoginUserExists = true;
}
},
error: function () {
alert("check user error");
}
});
})
</script>
-->
</body>