-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathextra-lockscreen.html
173 lines (138 loc) · 4.88 KB
/
extra-lockscreen.html
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
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<meta name="description" content="Xenon Boostrap Admin Panel" />
<meta name="author" content="" />
<title>Xenon - Homepage</title>
<link rel="stylesheet" href="http://fonts.useso.com/css?family=Arimo:400,700,400italic">
<link rel="stylesheet" href="assets/css/fonts/linecons/css/linecons.css">
<link rel="stylesheet" href="assets/css/fonts/fontawesome/css/font-awesome.min.css">
<link rel="stylesheet" href="assets/css/bootstrap.css">
<link rel="stylesheet" href="assets/css/xenon-core.css">
<link rel="stylesheet" href="assets/css/xenon-forms.css">
<link rel="stylesheet" href="assets/css/xenon-components.css">
<link rel="stylesheet" href="assets/css/xenon-skins.css">
<link rel="stylesheet" href="assets/css/custom.css">
<script src="assets/js/jquery-1.11.1.min.js"></script>
<!-- HTML5 shim and Respond.js IE8 support of HTML5 elements and media queries -->
<!--[if lt IE 9]>
<script src="assets/js/html5shiv.min.js"></script>
<script src="assets/js/respond.min.js"></script>
<![endif]-->
</head>
<body class="page-body lockscreen-page">
<div class="login-container">
<div class="row">
<div class="col-sm-7">
<script type="text/javascript">
jQuery(document).ready(function($)
{
// Reveal Login form
setTimeout(function(){ $(".fade-in-effect").addClass('in'); }, 1);
// Clicking on thumbnail will focus on password field
$(".user-thumb a").on('click', function(ev)
{
ev.preventDefault();
$("#passwd").focus();
});
// Form validation and AJAX request
$(".lockcreen-form").validate({
rules: {
passwd: {
required: true
}
},
messages: {
passwd: {
required: 'Please enter your password.'
}
},
submitHandler: function(form)
{
show_loading_bar(70); // Fill progress bar to 70% (just a given value)
var $passwd = $(form).find('#passwd'),
opts = {
"closeButton": true,
"debug": false,
"positionClass": "toast-top-full-width",
"onclick": null,
"showDuration": "300",
"hideDuration": "1000",
"timeOut": "5000",
"extendedTimeOut": "1000",
"showEasing": "swing",
"hideEasing": "linear",
"showMethod": "fadeIn",
"hideMethod": "fadeOut"
};
$.ajax({
url: "data/login-check.php",
method: 'POST',
dataType: 'json',
data: {
do_login: true,
username: 'demo', // user is known in this case
passwd: $passwd.val(),
},
success: function(resp)
{
show_loading_bar({
delay: .5,
pct: 100,
finish: function(){
if(resp.accessGranted)
{
// Redirect after successful login page (when progress bar reaches 100%)
window.location.href = 'dashboard-1.html';
}
else
{
toastr.error("You have entered wrong password, please try again. Password is <strong>demo</strong> :)", "Invalid Login!", opts);
$passwd.select();
}
}
});
}
});
}
});
// Set Form focus
$("form#lockscreen .form-group:has(.form-control):first .form-control").focus();
});
</script>
<form role="form" id="lockscreen" class="lockcreen-form fade-in-effect">
<div class="user-thumb">
<a href="#">
<img src="assets/images/user-5.png" class="img-responsive img-circle" />
</a>
</div>
<div class="form-group">
<h3>Welcome back, John!</h3>
<p>Enter your password to access the admin.</p>
<div class="input-group">
<input type="password" class="form-control input-dark" name="passwd" id="passwd" placeholder="Password" />
<span class="input-group-btn">
<button type="submit" class="btn btn-primary">Log In</button>
</span>
</div>
</div>
</form>
</div>
</div>
</div>
<!-- Bottom Scripts -->
<script src="assets/js/bootstrap.min.js"></script>
<script src="assets/js/TweenMax.min.js"></script>
<script src="assets/js/resizeable.js"></script>
<script src="assets/js/joinable.js"></script>
<script src="assets/js/xenon-api.js"></script>
<script src="assets/js/xenon-toggles.js"></script>
<script src="assets/js/jquery-validate/jquery.validate.min.js"></script>
<script src="assets/js/toastr/toastr.min.js"></script>
<!-- JavaScripts initializations and stuff -->
<script src="assets/js/xenon-custom.js"></script>
</body>
</html>