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 | <tbody> |
8 | 8 | <tr> |
9 | 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 | 11 | </tr> |
12 | 12 | </tbody> |
13 | 13 | </table> | ... | ... |
site/addSensor.php
... | ... | @@ -10,19 +10,19 @@ $raspberrys = getRaspberrys(); |
10 | 10 | <tbody> |
11 | 11 | <tr> |
12 | 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 | 14 | </tr> |
15 | 15 | |
16 | 16 | <tr> |
17 | 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 | 19 | </tr> |
20 | 20 | |
21 | 21 | <tr> |
22 | 22 | <td><label for="raspberry">Raspberry : </label></td> |
23 | 23 | <td> |
24 | 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 | 26 | <?php |
27 | 27 | foreach($raspberrys as $raspberry) |
28 | 28 | { ?> |
... | ... | @@ -35,13 +35,13 @@ $raspberrys = getRaspberrys(); |
35 | 35 | |
36 | 36 | <tr> |
37 | 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 | 39 | </tr> |
40 | 40 | |
41 | 41 | <tr> |
42 | 42 | <td><label for="version">Version : </lavel></td> |
43 | 43 | <td> |
44 | - <select id="version" name="version"> | |
44 | + <select id="version" name="version" required> | |
45 | 45 | <option value=0 selected>Arduino USB</option> |
46 | 46 | <option value=1>Arduino SPI</option> |
47 | 47 | <option value=2>Nucléo USB</option> | ... | ... |
site/removeRaspberry.php
1 | +<?php | |
2 | +$raspberrys = getRaspberrys(); | |
3 | +?> | |
1 | 4 | <div class="row"> |
2 | 5 | <div class="col-6 col-md-6 offset-md-3 offset-3"> |
3 | 6 | <br/> |
... | ... | @@ -6,8 +9,19 @@ |
6 | 9 | <table class="table table-striped table-bordered"> |
7 | 10 | <tbody> |
8 | 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 | 25 | </tr> |
12 | 26 | </tbody> |
13 | 27 | </table> | ... | ... |