-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathcreate.ejs
executable file
·56 lines (56 loc) · 2.27 KB
/
create.ejs
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
<html>
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1">
<link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.7/css/bootstrap.min.css">
<script src="https://ajax.googleapis.com/ajax/libs/jquery/3.3.1/jquery.min.js"></script>
<script src="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.7/js/bootstrap.min.js"></script>
</head>
<body>
<div class="container">
<h3>User Information</h3>
<ul class="nav nav-pills">
<li class="active"><a href="/create">Create User</a></li>
<li ><a href="/report">User Report</a></li>
</ul>
</div>
<p></p>
<br/>
<div class="container">
<form action="http://127.0.0.1:3000/create" method="post">
<div style="width: 30%" class="form-group">
<input type="text" class="form-control" name="stuName" placeholder="Student Name" required
oninvalid="this.setCustomValidity('Please enter student name')"
oninput="this.setCustomValidity('')"
pattern="[a-zA-Z]+[ ][a-zA-Z]+">
</div>
<br/>
<div style="width: 30%" class="form-group">
<input type="number" class="form-control" name="stuId" placeholder="Student ID" required
oninvalid="this.setCustomValidity('Please enter student ID')"
oninput="this.setCustomValidity('')"
min="11111111" max="999999999">
</div>
<br/>
<div style="width: 30%" class="form-group">
<input type="text" class="form-control" name="deptName" placeholder="Department" required
oninvalid="this.setCustomValidity('Please enter department name')"
oninput="this.setCustomValidity('')"
pattern="[a-zA-Z]+[ ]*[a-zA-Z]+">
</div>
<br/>
<div style="width: 30%;">
<button class="btn btn-success" type="reset">Clear</button>
<button class="btn btn-success" type="submit">Add User</button>
</div>
<p style="color:red;">
<%
if (locals.duplicate){%>
<%=locals.duplicate%>
<%}
%>
</p>
</form>
</div>
</body>
</html>