-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathindex.html
155 lines (141 loc) · 7.34 KB
/
index.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
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
146
147
148
149
150
151
152
153
154
155
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<meta http-equiv="X-UA-Compatible" content="ie=edge">
<title>Bil registrering</title>
<link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/4.0.0/css/bootstrap.min.css" integrity="sha384-Gn5384xqQ1aoWXA+058RXPxPg6fy4IWvTNh0E263XmFcJlSAwiGgFAW/dAiS6JXm" crossorigin="anonymous">
<script
src="https://code.jquery.com/jquery-3.3.1.min.js"
integrity="sha256-FgpCb/KJQlLNfOu91ta32o/NMZxltwRo8QtmkMRdAu8="
crossorigin="anonymous">
</script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/popper.js/1.12.9/umd/popper.min.js" integrity="sha384-ApNbgh9B+Y1QKtv3Rn7W3mgPxhU9K/ScQsAP7hUibX39j7fakFPskvXusvfa0b4Q" crossorigin="anonymous"></script>
<script src="https://maxcdn.bootstrapcdn.com/bootstrap/4.0.0/js/bootstrap.min.js" integrity="sha384-JZR6Spejh4U02d8jOt6vLEHfe/JQGiRRSQQxSfFWpi1MquVdAyjUar5+76PVCmYl" crossorigin="anonymous"></script>
<script src="main.js"></script>
<link rel="stylesheet" href="style.css">
</head>
<body>
<nav class="navbar navbar-dark bg-dark">
<span class="navbar-brand mb-0 h1">REGISTRERING AF BILER</span>
<form class="form-inline">
<button type="button" id="listButton" class="btn btn-outline-light" data-toggle="modal" data-target="#listModal" style="margin:0px 5px 0px 0px">
Vis liste
</button>
<button type="button" id="loginButton" class="btn btn-outline-light" data-toggle="modal" data-target="#myModal">
LOGIN
</button>
<label id="loginName" style="display: none; color:silver"/>
</form>
</nav>
<div class="container">
<div class="jumbotron">
<form id="mainForm">
<div class="form-group">
<div class="form-check">
<label class="form-check-label">
<input type="checkbox" class="form-check-input" id="nyBil" onclick="nyBilChange()">
Ny bil
</label>
</div>
</div>
<div class="form-group">
<label for="bilReg">Nummerplade</label>
<input type="input" autocomplete="off" class="form-control" id="bilReg" onblur="validateBilreg();" placeholder="Indtast bilens registreringsnummer">
<label id="bilRegError" style='display: none; color: red;'>Den indtastede nummerplade er ikke i et korrekt format.</label>
<label id="bilRegNotKnown" style='display: none; color: red;'>Den indtastede nummerplade er ikke kendt i systemet</label>
<label id="bilAlrKnown" style='display: none; color: red;'>Den indtastede nummerplade er allerede i systemet</label>
</div>
<div class="form-group">
<label for="gpsID">GPS ID</label>
<input type="input" autocomplete="off" class="form-control" id="gpsID" placeholder="Indtast GPS'ens EUI nummer">
</div>
<div class="form-group">
<label for="parkering">Hjemmeparkering</label>
<select class="form-control" id="parkering">
<option selected disabled>Vælg parkering</option>
</select>
</div>
<div class="form-group">
<label for="center">Center</label>
<select class="form-control" id="center">
<option selected disabled>Vælg center</option>
</select>
</div>
<!-- Button confirm modal -->
<button type="button" class="btn btn-danger float-left" id="del" data-toggle="modal" data-target="#confirm">
SLET
</button>
<button type="submit" class="btn btn-primary float-right">SEND</button>
</form>
</div>
<!-- List Modal -->
<div class="modal" id="listModal">
<div class="modal-dialog">
<div class="modal-content">
<div class="modal-header">
<button type="submit" class="btn btn-outline-dark" data-dismiss="modal">Close</button>
<button type="submit" class="btn btn-outline-dark" onclick="tableToExcel('allCars', 'Billiste')">Eksporter</button>
</div>
<div class="modal-body">
<table id="allCars"></table>
</div>
<div class="modal-footer">
<button type="submit" class="btn btn-outline-dark" data-dismiss="modal">Close</button>
</div>
</div>
</div>
</div>
</div>
<!-- LOGIN Modal -->
<div class="modal" id="myModal">
<div class="modal-dialog">
<div class="modal-content">
<div class="modal-body">
<form id="login">
<div class="form-group">
<label for="exampleDropdownFormEmail2">User</label>
<input type="text" class="form-control" id="user" placeholder="User">
</div>
<div class="form-group">
<label for="exampleDropdownFormPassword2">Password</label>
<input type="password" class="form-control" id="pw" placeholder="Password">
</div>
</form>
</div>
<div class="modal-footer">
<button type="submit" class="btn btn-outline-dark" id="gc2login" data-dismiss="modal">LOGIN</button>
</div>
</div>
</div>
</div>
</div>
<!-- Confirm Modal -->
<div class="modal fade" id="confirm" tabindex="-1" role="dialog" aria-labelledby="exampleModalLabel" aria-hidden="true">
<div class="modal-dialog" role="document">
<div class="modal-content">
<div class="modal-header">
<button type="button" class="close" data-dismiss="modal" aria-label="Close">
<span aria-hidden="true">×</span>
</button>
</div>
<div class="modal-body">
Er du sikker på du vil slette bilen?
</div>
<div class="modal-footer">
<button type="button" class="btn btn-secondary float-left" data-dismiss="modal">Annuller</button>
<button type="button" id="delete" class="btn btn-danger float-right">SLET</button>
</div>
</div>
</div>
</div>
</body>
<footer>
<!-- Alerts -->
<div class="alert alert-danger" id="IE" role="alert">Denne applikation understøttes ikke i Internet Explorer. Brug venligst Google Chrome i stedet</div>
<div class="alert alert-danger collapse" id="InsertError" role="alert">Der opstod en fejl under indsættelsen</div>
<div class="alert alert-success collapse" id="InsertSuccess" role="alert">Din registrering blev behandlet korrekt</div>
<div class="alert alert-success collapse" id="DeleteSuccess" role="alert">Data blev slettet</div>
</footer>
</html>