Commit 066421f4214d5c91c3b9a7e600405bba2e2c9e7e
1 parent
312ec51b
Suppression RPI + capteur
Showing
3 changed files
with
22 additions
and
8 deletions
Show diff stats
site/addRaspberry.php
@@ -7,7 +7,7 @@ | @@ -7,7 +7,7 @@ | ||
7 | <tbody> | 7 | <tbody> |
8 | <tr> | 8 | <tr> |
9 | <td><label for="ip">Adresse IP : 172.26.145. </label></td> | 9 | <td><label for="ip">Adresse IP : 172.26.145. </label></td> |
10 | - <td><input type="text" id="ip" name="ip" placeholder="114" size="3" minlength="3" maxlength="3"/></td> | 10 | + <td><input type="text" id="ip" name="ip" placeholder="114" size="3" minlength="3" maxlength="3" required/></td> |
11 | </tr> | 11 | </tr> |
12 | </tbody> | 12 | </tbody> |
13 | </table> | 13 | </table> |
site/addSensor.php
@@ -10,19 +10,19 @@ $raspberrys = getRaspberrys(); | @@ -10,19 +10,19 @@ $raspberrys = getRaspberrys(); | ||
10 | <tbody> | 10 | <tbody> |
11 | <tr> | 11 | <tr> |
12 | <td><label for="nom">Nom du capteur : </label></td> | 12 | <td><label for="nom">Nom du capteur : </label></td> |
13 | - <td><input type="text" id="nom" name="nom" /></td> | 13 | + <td><input type="text" id="nom" name="nom" required/></td> |
14 | </tr> | 14 | </tr> |
15 | 15 | ||
16 | <tr> | 16 | <tr> |
17 | <td><label for="type">Type de capteur : </label></td> | 17 | <td><label for="type">Type de capteur : </label></td> |
18 | - <td><input type="text" id="type" name="type" /></td> | 18 | + <td><input type="text" id="type" name="type" required/></td> |
19 | </tr> | 19 | </tr> |
20 | 20 | ||
21 | <tr> | 21 | <tr> |
22 | <td><label for="raspberry">Raspberry : </label></td> | 22 | <td><label for="raspberry">Raspberry : </label></td> |
23 | <td> | 23 | <td> |
24 | <div class="form-group my-1 mr-sm-2"> | 24 | <div class="form-group my-1 mr-sm-2"> |
25 | - <select class="custom-select my-1 mr-sm-2" id="raspberry" name="raspberry"> | 25 | + <select class="custom-select my-1 mr-sm-2" id="raspberry" name="raspberry" required> |
26 | <?php | 26 | <?php |
27 | foreach($raspberrys as $raspberry) | 27 | foreach($raspberrys as $raspberry) |
28 | { ?> | 28 | { ?> |
@@ -35,13 +35,13 @@ $raspberrys = getRaspberrys(); | @@ -35,13 +35,13 @@ $raspberrys = getRaspberrys(); | ||
35 | 35 | ||
36 | <tr> | 36 | <tr> |
37 | <td><label for="unite">Unite de mesure : </label></td> | 37 | <td><label for="unite">Unite de mesure : </label></td> |
38 | - <td><input type="text" id="unite" name="unite" /></td> | 38 | + <td><input type="text" id="unite" name="unite" required/></td> |
39 | </tr> | 39 | </tr> |
40 | 40 | ||
41 | <tr> | 41 | <tr> |
42 | <td><label for="version">Version : </lavel></td> | 42 | <td><label for="version">Version : </lavel></td> |
43 | <td> | 43 | <td> |
44 | - <select id="version" name="version"> | 44 | + <select id="version" name="version" required> |
45 | <option value=0 selected>Arduino USB</option> | 45 | <option value=0 selected>Arduino USB</option> |
46 | <option value=1>Arduino SPI</option> | 46 | <option value=1>Arduino SPI</option> |
47 | <option value=2>Nucléo USB</option> | 47 | <option value=2>Nucléo USB</option> |
site/removeRaspberry.php
1 | +<?php | ||
2 | +$raspberrys = getRaspberrys(); | ||
3 | +?> | ||
1 | <div class="row"> | 4 | <div class="row"> |
2 | <div class="col-6 col-md-6 offset-md-3 offset-3"> | 5 | <div class="col-6 col-md-6 offset-md-3 offset-3"> |
3 | <br/> | 6 | <br/> |
@@ -6,8 +9,19 @@ | @@ -6,8 +9,19 @@ | ||
6 | <table class="table table-striped table-bordered"> | 9 | <table class="table table-striped table-bordered"> |
7 | <tbody> | 10 | <tbody> |
8 | <tr> | 11 | <tr> |
9 | - <td><label for="ip">Adresse IP : 172.26.145. </label></td> | ||
10 | - <td><input type="text" id="ip" name="ip" placeholder="114" size="3" minlength="3" maxlength="3"/></td> | 12 | + <td><label for="ip">Raspberry : </label></td> |
13 | + <td> | ||
14 | + <div class="form-group my-1 mr-sm-2"> | ||
15 | + <select class="custom-select my-1 mr-sm-2" id="ip" name="ip" required> | ||
16 | + <option> </option> | ||
17 | + <?php | ||
18 | + foreach($raspberrys as $raspberry) | ||
19 | + { ?> | ||
20 | + <option><?php echo $raspberry['ip'];?></option> | ||
21 | + <?php }?> | ||
22 | + </select> | ||
23 | + </div> | ||
24 | + </td> | ||
11 | </tr> | 25 | </tr> |
12 | </tbody> | 26 | </tbody> |
13 | </table> | 27 | </table> |