-
Notifications
You must be signed in to change notification settings - Fork 1
/
create_user.html
76 lines (71 loc) · 2.12 KB
/
create_user.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
<html>
<head>
<title>Create_User Interface</title>
<script src="http://code.jquery.com/jquery-1.9.1.min.js"></script>
<script type="text/javascript">
function submitform(){
var pswd = $('#password').val();
var email = $('#email').val();
var username = $('#name').val();
$.ajax({
type: "post",
url: "http://fengye.postiles.com:3001/user/this_route_does_nothing",
data: {
session_key: pswd,
user_id: '8',
email: email,
username: username,
},
success: function(r){
if(r.status == 'error'){
$("#feedback").css("display", "block");
$("#feedback").html("creation failed, please contact [email protected]");
}else{
$("#feedback").css("display", "block");
setTimeout('dismiss()', 4000);
}
/*
$.ajax({
type: 'get',
url: 'http://localhost:8888/smail/sendmail.php',
data: {
addr: email,
name: username,
pswd: 'asdfghjkl'
},
success: function(r) {
console.log(r);
}
});
*/
}
});
}
$(document).ready(function() {
$("#password").keypress(function(event) {
if (event.which == 13) {
submitform();
}
});
});
function dismiss() {
$("#feedback").css("display", "none");
}
</script>
<style>
#feedback {
display: none;
}
</style>
</head>
<body>
<p> Email Address </p>
<input type="text" id="email" name="email" autofocus="autofocus" />
<p> Name </p>
<input type="text" id="name" name="name" />
<p> Your Password to create user </p>
<input type="password" id="password" name="password" />
<a id="submit" href="javascript:submitform()"> Submit </a>
<p id="feedback"> User Created successfully, an email will be sent to the email address you mentioned. you can refresh or enter another one directly </p>
</body>
</html>