-
Notifications
You must be signed in to change notification settings - Fork 1
/
crud_options.html
61 lines (57 loc) · 1.97 KB
/
crud_options.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
<!DOCTYPE html>
<html>
<head>
<title>EMS Main Page</title>
<!-- Use Bootstrap for styling -->
<link rel="stylesheet" href="https://stackpath.bootstrapcdn.com/bootstrap/4.3.1/css/bootstrap.min.css">
<script>
function updateEmployee() {
var id = prompt("Enter ID:");
if (id != null) {
window.location.href = "/api/update_employee/" + id;
}
}
function deleteEmployee() {
var id = prompt("Enter ID:");
if (id != null) {
window.location.href = "/api/delete_employee/" + id;
}
}
function searchEmployee() {
var id = prompt("Enter ID:");
if (id != null) {
window.location.href = "/api/search_employee/" + id;
}
}
</script>
</head>
<body>
<!-- Create a banner -->
<div class="jumbotron">
<h1 class="display-4">Employee Management System</h1>
<p class="lead">Select an Employee Operation to Perform</p>
</div>
<!-- Use a container to center the form -->
<div class="container">
<div class="row">
<div class="col-md-3">
<a href="{{ url_for('add_employee_form') }}" class="btn btn-primary btn-block">Create</a>
</div>
<div class="col-md-3">
<a href="{{ url_for('get_all') }}" class="btn btn-primary btn-block">Read</a>
</div>
<div class="col-md-3">
<button class="btn btn-primary btn-block" onclick="updateEmployee()">Update</button>
</div>
<div class="col-md-3">
<button class="btn btn-primary btn-block" onclick="deleteEmployee()">Delete</button>
</div>
</div>
<div class="row mt-3">
<div class="col-md-3">
<button class="btn btn-primary btn-block" onclick="searchEmployee()">Search</button>
</div>
</div>
</div>
</body>
</html>