-
Notifications
You must be signed in to change notification settings - Fork 0
/
types.html
98 lines (93 loc) · 4.94 KB
/
types.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
85
86
87
88
89
90
91
92
93
94
95
96
97
98
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<title>List of birds of Asia</title>
<link href="https://cdn.jsdelivr.net/npm/bootstrap@5.3.0/dist/css/bootstrap.min.css" rel="stylesheet" integrity="sha384-9ndCyUaIbzAi2FUVXJi0CjmCapSmO7SnpJef0486qhLnuZ2cdeRhO02iuK6FUUVM" crossorigin="anonymous" />
</head>
<body>
<nav class="navbar navbar-dark navbar-expand-lg bg-dark">
<div class="container-fluid">
<a class="navbar-brand" href="#">Birds API</a>
<button class="navbar-toggler" type="button" data-bs-toggle="collapse" data-bs-target="#navbarNav" aria-controls="navbarNav" aria-expanded="false" aria-label="Toggle navigation">
<span class="navbar-toggler-icon"></span>
</button>
<div class="collapse navbar-collapse" id="navbarNav">
<ul class="navbar-nav">
<li class="nav-item">
<a class="nav-link" href="index.html">Home</a>
</li>
<li class="nav-item">
<a class="nav-link" href="birds.html">Add Birds</a>
</li>
<li class="nav-item">
<a class="nav-link active" href="types.html">Add Types</a>
</li>
</ul>
</div>
</div>
</nav>
<div class="container" id="birds">
<div class="row mt-3 justify-content-center">
<div class="col-md-8">
<div id="alert"></div>
<h1 class="text-center mb-4">Add Type of Bird</h1>
<div class="col">
<div class="form-floating mb-3">
<input type="text" name="type_of_birds" class="form-control" id="floatingInput" placeholder="" required autofocus />
<label for="floatingInput">Type of Birds</label>
</div>
<button type="submit" style="width: 100%; margin-bottom: 40px" class="btn btn-primary" id="btn-save-type">Save</button>
</div>
<div id="type-list"></div>
<!-- Modal Edit -->
<div class="modal fade" id="editModal" tabindex="-1" aria-labelledby="editModalLabel" aria-hidden="true">
<div class="modal-dialog">
<div class="modal-content">
<div class="modal-header">
<h5 class="modal-title" id="editModalLabel">Edit Type of Bird</h5>
<button type="button" class="btn-close" data-bs-dismiss="modal" aria-label="Close"></button>
</div>
<div class="modal-body">
Important!! if you edit this type of bird, there may be problems such as data incompatibility. Are you sure you want to edit this type of bird?
<input type="hidden" id="editTypeId" />
<div class="form-floating mt-3">
<input type="text" name="type_of_birds" class="form-control" id="editInput" placeholder="" required autofocus />
<label for="editInput">Type of Birds</label>
</div>
</div>
<div class="modal-footer">
<button type="button" class="btn btn-success" data-bs-dismiss="modal">Cancel</button>
<button type="button" class="btn btn-warning" onclick="editType()">Edit</button>
</div>
</div>
</div>
</div>
<!-- Modal Delete -->
<div class="modal fade" id="deleteModal" tabindex="-1" aria-labelledby="deleteModalLabel" aria-hidden="true">
<div class="modal-dialog">
<div class="modal-content">
<div class="modal-header">
<h5 class="modal-title" id="deleteModalLabel">Confirm Delete</h5>
<button type="button" class="btn-close" data-bs-dismiss="modal" aria-label="Close"></button>
</div>
<div class="modal-body">
Important!! if you delete this type of bird, there may be problems such as data incompatibility. Are you sure you want to delete <span id="deleteTypeSpan" style="color: rgb(255, 51, 51); font-weight: bold"></span>?
<input type="hidden" id="deleteTypeId" />
</div>
<div class="modal-footer">
<button type="button" class="btn btn-success" data-bs-dismiss="modal">Cancel</button>
<button type="button" class="btn btn-danger" onclick="deleteType()">Delete</button>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
<script src="https://cdn.jsdelivr.net/npm/bootstrap@5.3.0/dist/js/bootstrap.bundle.min.js" integrity="sha384-geWF76RCwLtnZ8qwWowPQNguL3RmwHVBC9FhGdlKrxdiJJigb/j/68SIy3Te4Bkz" crossorigin="anonymous"></script>
<script src="https://code.jquery.com/jquery-3.7.0.min.js" integrity="sha256-2Pmvv0kuTBOenSvLm6bvfBSSHrUJ+3A7x6P5Ebd07/g=" crossorigin="anonymous"></script>
<script src="js/types.js"></script>
</body>
</html>