This repository has been archived by the owner on Jul 4, 2023. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 0
/
reg.html
84 lines (72 loc) · 2.96 KB
/
reg.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
<!doctype html>
<html>
<head>
<meta charset="utf-8">
<title>UGACSCF System Registration Page</title>
<meta name="description" content="Registration Page">
<meta name="viewport" content="width=device-width">
<script type="text/javascript" src="js/jquery-1.11.3.min.js"></script>
<script type="text/javascript" src="js/parse-latest.js"></script>
<link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.5/css/bootstrap.min.css">
<link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.5/css/bootstrap-theme.min.css">
<script type="text/javascript" src="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.5/js/bootstrap.min.js"></script>
<script type="text/javascript" src="js/HeaderFooter.js"></script>
</head>
<body>
<div id="header"></div>
<div id="main">
<h1>UGACSCF Registration </h1>
<form id="SignUpForm" method="post">
<div class="form-group">
<label for="username">Username:</label>
<input type="text" class="form-control" id="username" placeholder="myusername">
</div>
<div class="form-group">
<label for="password">Password:</label>
<input type="password" class="form-control" id="password" placeholder="****">
</div>
<div class="form-group">
<label for="emailInput">Email address</label>
<input type="email" class="form-control" id="emailInput" placeholder="username@ugacscf.org">
</div>
<button type="submit" id="signUpButton" class="btn btn-default">Register</button>
</form>
<div style="display:none" class="error">
Looks like there was a problem with register. Try again. If this occur again, please email <a href="mailto:jlin@ugacscf.org">jlin@ugacscf.org</a>
</div>
<div style="display:none" id="successbox" class="success">
<p>Congratulation! You successfully registered.</p>
</div>
</div>
<script type="text/javascript">
Parse.initialize("zcsUN6L48qEuivCDRYVIRZMPbcAL3uXmidyCXhtH", "bZTUGGQ37ZMLvOp2baAxyHMirE4H0Kudz7fxMVqv");
$('#SignUpForm').submit(function(event) {
event.preventDefault();
SubmitParse();
return false;
});
function SubmitParse() {
var inputusername = document.getElementById("username").value;
var inputpassword = document.getElementById("password").value;
var emailInput = document.getElementById("emailInput").value;
var user = new Parse.User();
user.set("username", inputusername);
user.set("password", inputpassword);
user.set("email", emailInput);
// other fields can be set just like with Parse.Object
//user.set("phone", "415-392-0202");
user.signUp(null, {
success: function(user) {
alert("Success! You will be redirect to main page.");
window.location.replace("index.html");
},
error: function(user, error) {
// Show the error message somewhere and let the user try again.
alert("Error: " + error.code + " " + error.message);
}
});
};
</script>
</body>
<div id="footer" class="text-muted"></div>
</html>