-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathnewuser.html
More file actions
145 lines (132 loc) · 5.74 KB
/
Copy pathnewuser.html
File metadata and controls
145 lines (132 loc) · 5.74 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
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
<!doctype html>
<html lang="pt">
<head>
<!-- Required meta tags -->
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1">
<!-- Bootstrap CSS -->
<link href="css/BootS/bootstrap.min.css" rel="stylesheet">
<link rel="stylesheet" href="./css/newuser.css">
<title>New user</title>
</head>
<body>
<header class="d-flex justify-content-center">
<h1 class="m-0">New User</h1>
</header>
<div class="btnBack">
<button type="button" class="btn btn-outline-success rounded-pill" onclick="logout();">Back
</button>
</div>
<section class="externa">
<div class="interna">
<form>
<label for="userName"><h5><u>User Name</u></h5></label>
<input type="text" class="form-control-plaintext" placeholder="Enter user name" id="userName">
<form >
<label for="passWord_1"><h5><u>Password</u></h5></label>
<input type="password" class="form-control-plaintext" placeholder="Enter password" id="passWord_1">
</form>
<form >
<label for="passWord_2"><h5><u>Password</u></h5></label>
<input type="password" class="form-control-plaintext" placeholder="Repeat password" id="passWord_2">
</form>
<div class="d-grid mt-3">
<button id="myBtn" class="btn btn-primary rounded-pill" onclick="NewUser();">SUBMIT</button>
</div>
<div id="div-clock" class="invisible position-absolute top-50 start-50 translate-middle">
<img class="clock" src="imgs/loading.jpg" alt="">
</div>
<h5 class="position-absolute bottom-0 start-50 translate-middle-x text-decoration-underline text-warning bg-dark ">User names letters must be between 'a' and 'z'</h5>
</div>
</section>
!-- Modal passwords not equal-->
<div class="modal fade" id="passModal" tabindex="-1" aria-labelledby="exampleModalLabel" aria-hidden="true">
<div class="modal-dialog modal-dialog-centered d-flex align-items-end">
<div class="modal-content bg-info p-2 text-white bg-opacity-75">
<div class="modal-header">
<h5 class="modal-title">Passwords are different !</h5>
<button type="button" class="btn-close" data-bs-dismiss="modal" aria-label="Close"></button>
</div>
<div class="modal-body">
Those passwords you just wrote are not equal. Try again.
</div>
<div class="modal-footer">
<button type="button" class="btn btn-secondary" data-bs-dismiss="modal">Close</button>
</div>
</div>
</div>
</div>
<!-- Modal empty field-->
<div class="modal fade" id="empty_field" tabindex="-1" aria-labelledby="exampleModalLabel" aria-hidden="true">
<div class="modal-dialog modal-dialog-centered d-flex align-items-end">
<div class="modal-content bg-info p-2 text-white bg-opacity-75">
<div class="modal-header">
<h5 class="modal-title" >Empty fields</h5>
<button type="button" class="btn-close" data-bs-dismiss="modal" aria-label="Close"></button>
</div>
<div class="modal-body">
One or more fields are empty.
</div>
<div class="modal-footer">
<button type="button" class="btn btn-secondary" data-bs-dismiss="modal">Close</button>
</div>
</div>
</div>
</div>
<!-- Modal User already exist-->
<div class="modal fade" id="user_exists" tabindex="-1" aria-labelledby="exampleModalLabel" aria-hidden="true">
<div class="modal-dialog modal-dialog-centered d-flex align-items-end">
<div class="modal-content bg-info p-2 text-white bg-opacity-75">
<div class="modal-header">
<h5 class="modal-title" >User name already taken.</h5>
<button type="button" class="btn-close" data-bs-dismiss="modal" aria-label="Close"></button>
</div>
<div class="modal-body">
Choose a different name.
</div>
<div class="modal-footer">
<button type="button" class="btn btn-secondary" data-bs-dismiss="modal">Close</button>
</div>
</div>
</div>
</div>
<!-- Modal Success-->
<div class="modal fade" id="success" tabindex="-1" aria-labelledby="exampleModalLabel" aria-hidden="true">
<div class="modal-dialog modal-dialog-centered d-flex align-items-end">
<div class="modal-content bg-info p-2 text-white bg-opacity-75">
<div class="modal-header">
<h5 class="modal-title" >Done !</h5>
<button type="button" class="btn-close" data-bs-dismiss="modal" aria-label="Close"></button>
</div>
<div class="modal-body">
New user added successfully.
</div>
<div class="modal-footer">
<button type="button" class="btn btn-secondary" data-bs-dismiss="modal" onclick="logout();" >Close</button>
</div>
</div>
</div>
</div>
<!-- Modal Failure-->
<div class="modal fade" id="failure" tabindex="-1" aria-labelledby="exampleModalLabel" aria-hidden="true">
<div class="modal-dialog modal-dialog-centered d-flex align-items-end">
<div class="modal-content bg-info p-2 text-white bg-opacity-75">
<div class="modal-header">
<h5 class="modal-title" >E R R O R ! !</h5>
<button type="button" class="btn-close" data-bs-dismiss="modal" aria-label="Close"></button>
</div>
<div class="modal-body">
Some invalid chacarter was used in the username
</div>
<div class="modal-footer">
<button type="button" class="btn btn-secondary" data-bs-dismiss="modal" onclick="logout();" >Close</button>
</div>
</div>
</div>
</div>
</body>
<script src="./js/BootS/bootstrap.min.js"></script>
<script src="https://cdn.jsdelivr.net/npm/axios/dist/axios.min.js"></script>
<script src="./js/URL.js"></script>
<script src="./js/newuser.js"></script>
</html>