-
Notifications
You must be signed in to change notification settings - Fork 8
/
firstTimeSetup.php
126 lines (102 loc) · 4.14 KB
/
firstTimeSetup.php
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
<?php
/*
*IoT LoRa Gateway Controller
*Copyright (C) 2018-2019 Nebra LTD. T/a Pi Supply
*This program is free software: you can redistribute it and/or modify
*it under the terms of the GNU General Public License as published by
*the Free Software Foundation, either version 3 of the License, or
*(at your option) any later version.
*
*This program is distributed in the hope that it will be useful,
*but WITHOUT ANY WARRANTY; without even the implied warranty of
*MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
*GNU General Public License for more details.
*
*You should have received a copy of the GNU General Public License
*along with this program. If not, see <https://www.gnu.org/licenses/>.
*/
include('inc/header.php');
if($configurationFile['gateway-info']['initial-setup'] == 1) {
//Send to first time setup
echo("<h1>First Time Setup Has Already Been Performed.</h1>");
include('inc/footer.php');
exit();
}
?>
<div class="row align-items-center">
<div class="text-center">
<h1>First Time Setup Wizard</h1>
</div>
</div>
<div class="row align-items-center">
<div class="text-center">
<h4>Welcome to the First Time Setup Wizard.</h4>
<p>This wizard will guide you through the first time setup for the gateway to configure the hardware and user details</p>
<h5>Once completed you can then configure the LoRa Modules.</h5>
</div>
</div>
<br>
<div class="row">
<div class="coullumn">
<form action="firstTimeSetupP.php" method="post" class="ui form">
<div class="ui bottom attached segment">
<!--Email Address-->
<div class="field">
<label for="emailAddr">Email Address:</label> You will need this to login to the gateway and can be used for contacting
<input type="email" id="emailAddr" name="emailAddr" class="form-control" required/>
</div>
<br/>
<div class="field">
<label for="emailConfirm">Confirm Email Address:</label>
<input type="email" id="emailConfirm" name="emailConfirm" class="form-control" required />
</div>
<br/>
<!--Password-->
<div class="field">
<label for="password">Password:</label>
<input type="password" id="password" name="password" class="form-control" required />
</div>
<br/>
<div class="field">
<label for="confirmPassword">Confirm Password:</label>
<input type="password" id="confirmPassword" name="confirmPassword" class="form-control" required />
</div>
<br/>
<!--Hardware Config-->
<div class="field">
<label for="model" >Hardware Model:</label>
<select class="ui fluid search dropdown" name="model">
<option value="nebraSmart">Nebra Smart LoRa Gateway</option>
<option value="loraHat">Pi Supply IoT LoRa Gateway HAT</option>
</select>
<br/>
<div class="field">
<label for="gps" >Enable GPS Module:</label> Enables the GPS Module, (if plugged in on Gateway HAT).
<br/><br/>
<div class="ui slider checkbox">
<input type="checkbox" name="gps" class="form-control" <?php if($jsonDecoded['gps'] == "true") { echo "checked";}?> >
<label>Enable GPS Module</label>
</div>
</div>
<br/>
<!--Final bit of information-->
<div class="field">
<label for="gatewayId">Gateway ID:</label> An ID for your gateway to be known by.
<input type="text" id="gatewayId" name="gatewayId" class="form-control" required/>
</div>
<br/>
<div class="field">
<label for="description">Gateway Description:</label> A human readable description of your gateway.
<input type="text" id="description" name="description" class="form-control" required/>
</div>
<br/>
<input type="submit" class="ui primary button" value="Complete First Time Setup">
</div>
</form>
</div>
</div>
<br/><br/>
<script src="js/firstTimeSetup.js"></script>
<?php
include('inc/footer.php');
?>