-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathcontacts.html
102 lines (97 loc) · 5.11 KB
/
contacts.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
99
100
101
102
<!doctype html>
<html lang="en">
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1">
<script type="text/javascript" src="js/md5.js"></script>
<script type="text/javascript" src="js/scripts.js"></script>
<script src="https://kit.fontawesome.com/fc1c589307.js" crossorigin="anonymous"></script>
<script type="text/javascript">
document.addEventListener('DOMContentLoaded', function()
{
readCookie();
searchContacts();
}, false);
</script>
<!-- Bootstrap CSS -->
<link href="https://cdn.jsdelivr.net/npm/[email protected]/dist/css/bootstrap.min.css" rel="stylesheet" integrity="sha384-giJF6kkoqNQ00vy+HMDP7azOuL0xtbfIcaT9wjKHr8RbDVddVHyTfAAsrekwKmP1" crossorigin="anonymous">
<link rel="stylesheet" href="css/style.css">
<title>KnightBook</title>
</head>
<body>
<div class="container-fluid">
<div class="row bg-warning">
<div class="col-md-4 align-self-center">
<img src="images/logo.png" width="100" height="100">
</div>
<div class="col-md-6 justify-content-center align-self-center">
<img src="images/knightbookTransparent.png" alt="Logo">
</div>
<div class="col-md-2 align-self-center">
<p id="user"></p>
<button type="button" id="logoutButton" class="btn btn-secondary float-right" onclick="doLogout()"> Log Out </button>
</div>
</div>
<div class="row bg-secondary">
<div class="col-md-1"></div>
<div class="col-md-2 align-self-center">
<div class="input-group">
<input type="search" class="form-control rounded" placeholder="Search" aria-label="Search" aria-describedby="search-addon" id = "searchText" />
</div>
</div>
<div class="col-md-6 align-self-center">
<button type="button" class="btn btn-warning" onclick="searchContacts();">Search Contacts</button>
</div>
<div class="col-md-2 align-self-center">
<button type="button" id="addContactButton" class="btn btn-warning" data-bs-toggle="modal" data-bs-target="#addEditModal" style="float:right;">Add Contact</button>
</div>
</div>
<div class="row bg-secondary">
<div class="modal fade" id="addEditModal" tabindex="-1">
<div class="modal-dialog modal-dialog-centered">
<div class="modal-content">
<div class="modal-header">
<!--change this in js depending on which button is clicked-->
<h5 class="modal-title" id="addOrEdit">Add Contact</h5>
<button type="button" class="btn-close" data-bs-dismiss="modal">
</button>
</div>
<div class="modal-body">
<input type="text" id="contactFirstName" class="form-control" placeholder="First Name"/><br>
<input type="text" id="contactLastName" class="form-control" placeholder="Last Name"/><br>
<input type="text" id="contactEmail" class="form-control" placeholder="Email" /><br>
<input type="text" id="contactPhone" class="form-control" placeholder="Phone (ex: 555-555-5555)"/><br>
<input type="text" id="contactMajor" class="form-control" placeholder="Major"/><br>
</div>
<div class="modal-footer">
<button type="button" class="btn btn-secondary" data-bs-dismiss="modal">Close</button>
<button type="button" class="btn btn-primary" onclick="addContact();">Submit</button>
<!-- <p id="addEditResult"></p> -->
<p id="contactAddResult"></p>
</div>
</div>
</div>
</div>
<div class="col-md-1"></div>
<div class="col-md-10 table-responsive align-self-center">
<table id="contacts" class="table table-striped">
<tr class="bg-warning" id="contactHeader">
<th>First Name</th>
<th>Last Name</th>
<th>Phone</th>
<th>Email</th>
<th>Major</th>
<th></th>
</tr>
<div id="searchResults"></div>
</table>
<!--<p id="contactList">No contacts found.</p>-->
</div>
</div>
</div>
<script src="https://code.jquery.com/jquery-3.3.1.slim.min.js" integrity="sha384-q8i/X+965DzO0rT7abK41JStQIAqVgRVzpbzo5smXKp4YfRvH+8abtTE1Pi6jizo" crossorigin="anonymous"></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/popper.js/1.14.7/umd/popper.min.js" integrity="sha384-UO2eT0CpHqdSJQ6hJty5KVphtPhzWj9WO1clHTMGa3JDZwrnQq4sF86dIHNDz0W1" crossorigin="anonymous"></script>
<script src="https://stackpath.bootstrapcdn.com/bootstrap/4.3.1/js/bootstrap.min.js" integrity="sha384-JjSmVgyd0p3pXB1rRibZUAYoIIy6OrQ6VrjIEaFf/nJGzIxFDsf4x0xIM+B07jRM" crossorigin="anonymous"></script>
<script src="https://cdn.jsdelivr.net/npm/[email protected]/dist/js/bootstrap.bundle.min.js" integrity="sha384-ygbV9kiqUc6oa4msXn9868pTtWMgiQaeYH7/t7LECLbyPA2x65Kgf80OJFdroafW" crossorigin="anonymous"></script>
</body>
</html>