-
Notifications
You must be signed in to change notification settings - Fork 0
/
create-project.html
74 lines (69 loc) · 3.01 KB
/
create-project.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
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
<head>
<link type="text/css" rel="stylesheet" href="/stylesheets/main.css" />
<style type="text/css">
#error { text-align: left; color: #ff0000; }
</style>
<script type="text/javascript" src="/static/jquery-1.3.2.min.js"></script>
<script type="text/javascript" src="/static/jquery-ui-1.7.2.min.js"></script>
<script>
//on submit button,
//send AJAX project-name request
$(function() {
$("form[name=createProject]").submit( function() {
var projectName=$("input[name=projectName]").val();
$.ajax({
async: false,
cache: false,
type: "POST",
url: "/createProject.asp",
data: {
"projectName" : projectName
},
dataType: "string",
error: function (XMLHttpRequest, textStatus, errorThrown) {
$("#error").text("Error: "+errorThrown);
},
success: function (string) {
if (string.indexOf("Error:")>=0)
$("#error").html(string);
else
window.top.location="/project.html?name="+projectName;
},
});
//don't actually submit the form
return false;
});
});
</script>
<title>EpiCollect: Create Project</title>
</head>
<body>
<div id="header">
<table width="800"><tr>
<td align="left"><a href="/"><img border="0" src="/static/Icon.jpg" width="45" height="45"></a></td>
<td align="center"><h2>EpiCollect Server</h2></td>
<td align="right"><img src="http://code.google.com/appengine/images/appengine-silver-120x30.gif"
alt="Powered by Google App Engine" height=30 width=120/></td>
</tr><tr><td colspan=3><HR></td>
</tr></table>
</div>
<div id="content" width="800">
<div id="error"></div>
Create a new project named: <form name="createProject"><input name="projectName"></input><input name="createProject" type="submit" value="Create"></input>
Should the project data be restricted to the project owner? <input name="protect" type="checkbox"> </input></form>
</div>
<div id="footer">
<table width="800">
<tr><td colspan=3><HR></td></tr>
<tr><td width="10"> </td>
<td align=center>
| <a href="/">Home</a> | <a href="/about">About</a> | <a href="/media">Media</a> | <a href="/tutorial">Tutorial</a> | <a href="/help">Help</a> | <a href="/static/create-project.html">Create Project</a> |
</td>
<td width="10"> </td>
</tr></table>
</div>
</body>
</html>