PageRenderTime 17ms CodeModel.GetById 13ms app.highlight 2ms RepoModel.GetById 1ms app.codeStats 0ms

/lib/jquery-validate/demo/login/index.html

#
HTML | 76 lines | 62 code | 14 blank | 0 comment | 0 complexity | ac964dccd8e9e7f6f34650dea52a281e MD5 | raw file
 1<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
 2<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
 3<head>
 4	<title>Login Form with Email Password Link</title>
 5	<meta http-equiv="content-type" content="text/html; charset=utf-8" />
 6	<link rel="stylesheet" type="text/css" media="screen" href="screen.css" />
 7	
 8	<script type="text/javascript" src="../../lib/jquery.js"></script>
 9	<script type="text/javascript" src="../../jquery.validate.js"></script>
10
11	<script type="text/javascript">
12		
13	$(function() {
14		// highlight 
15		var elements = $("input[type!='submit'], textarea, select");
16		elements.focus(function(){
17			$(this).parents('li').addClass('highlight');
18		});
19		elements.blur(function(){
20			$(this).parents('li').removeClass('highlight');
21		});
22		
23		$("#forgotpassword").click(function() {
24			$("#password").removeClass("required");
25			$("#login").submit();
26			$("#password").addClass("required");
27			return false;
28		});
29		
30		$("#login").validate()
31	});
32	</script>
33	
34</head>
35<body>
36	<div id="page">
37
38		<div id="header">
39			<h1>Login</h1>
40		</div>
41
42		<div id="content">
43			<p id="status"></p>
44			<form action="" method="get" id="login">
45				<fieldset>
46					<legend>User details</legend>
47					<ul>
48						<li>
49							<label for="email"><span class="required">Email address</span></label>
50							<input id="email" name="email" class="text required email" type="text" />
51							<label for="email" class="error">This must be a valid email address</label>
52						</li>
53						
54						<li>
55							<label for="password"><span class="required">Password</span></label>
56							<input name="password" type="password" class="text required" id="password" minlength="4" maxlength="20" />
57						</li>
58
59						<li>
60							<label class="centered info"><a id="forgotpassword" href="#">Email my password...</a></label>
61						</li>
62					</ul>
63				</fieldset>
64				
65				<fieldset class="submit">
66					<input type="submit" class="button" value="Login..." />
67				</fieldset>
68				
69				<div class="clear"></div>
70			</form>
71			
72			</div>
73	</div>
74	
75</body>
76</html>