-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathprofile.html
More file actions
86 lines (78 loc) · 3.91 KB
/
profile.html
File metadata and controls
86 lines (78 loc) · 3.91 KB
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
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Profile</title>
<link href="https://cdn.jsdelivr.net/npm/bootstrap@5.3.1/dist/css/bootstrap.min.css" rel="stylesheet">
<script src="https://cdn.jsdelivr.net/npm/bootstrap@5.3.1/dist/js/bootstrap.bundle.min.js"></script>
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/6.4.2/css/all.min.css" integrity="sha512-z3gLpd7yknf1YoNbCzqRKc4qyor8gaKU1qmn+CShxbuBusANI9QpRohGBreCFkKxLhei6S9CQXFEbbKuqLg0DA==" crossorigin="anonymous" referrerpolicy="no-referrer" />
<link href='https://fonts.googleapis.com/css?family=Poppins' rel='stylesheet'>
<style>
body {
font-family: 'Poppins', sans-serif;
}
</style>
</head>
<body>
<!-- A responsive header(nav) with title Shiftlog and a profile icon and a logout icon. everything should be visible on mobile device also. use fontawesome icons -->
<nav class="navbar navbar-expand-lg navbar-dark bg-primary">
<div class="container-fluid">
<a class="navbar-brand" href="/dashboard"><h2><strong>Shiftlog</strong></h2></a>
<div class="d-flex">
<a onclick="logout()" class="btn btn-outline-light"><i class="fas fa-sign-out-alt"></i></a>
</div>
</div>
</nav>
<!--On this page, user can update username, update password and delete account-->
<div class="container my-5">
<h1><strong>Profile</strong></h1>
</div>
<!-- A form to update username -->
<div class="container my-5">
<h2>Update Username</h2>
<form id="updateUsernameForm" action="javascript:updateUsername()">
<div class="mb-3">
<label for="username" class="form-label">Enter New Username</label>
<input type="text" class="form-control" id="username" aria-describedby="usernameHelp">
<div id="usernameHelp" class="form-text">Username must be unique.</div>
</div>
<button type="submit" class="btn btn-primary">Update</button>
</form>
</div>
<!-- A form to update password -->
<div class="container my-5">
<h2>Update Password</h2>
<form id="updatePasswordForm" action="javascript:updatePassword()">
<div class="mb-3">
<label for="password1" class="form-label">Enter New Password</label>
<input type="password" class="form-control" id="password1">
</div>
<div class="mb-3">
<label for="password2" class="form-label">Repeat New Password</label>
<input type="password" class="form-control" id="password2">
</div>
<button type="submit" class="btn btn-primary">Update</button>
</form>
</div>
<!-- A button to delete account -->
<div class="container my-5">
<h2>Delete Account</h2>
<button type="button" class="btn btn-danger" data-bs-toggle="modal" data-bs-target="#delete-account-modal">Delete Account</button>
</div>
<!-- A hidden bootstrap modal, invokable by js, for deleting account. contains a warning message and a button to delete account -->
<div class="modal fade" id="delete-account-modal" tabindex="-1" aria-labelledby="delete-account-modal-label" aria-hidden="true">
<div class="modal-dialog modal-dialog-centered">
<div class="modal-content">
<div class="modal-body">
<h5>Are you sure you want to delete your account? All your apps and releases will also be deleted permanently. <strong>This action is irreversible!</strong></h5>
</div>
<div class="modal-footer">
<button type="button" class="btn btn-danger" onclick="deleteAccount()">Delete</button>
</div>
</div>
</div>
</div>
<script src="logic/profile.js"></script>
</body>
</html>