Some fixes
This commit is contained in:
parent
f8743c9487
commit
7a3622e8ef
1 changed files with 4 additions and 4 deletions
|
@ -4,7 +4,7 @@ session_start();
|
||||||
define('IDENTITIES_FILE', 'identities.json');
|
define('IDENTITIES_FILE', 'identities.json');
|
||||||
define('PRESENT_FILE', 'present.json');
|
define('PRESENT_FILE', 'present.json');
|
||||||
|
|
||||||
define('NAME_PATTERN', "^([ a-zA-Z'\-]){1,30}$");
|
define('NAME_PATTERN', "^([ a-zA-Z0-9'\-]){1,30}$");
|
||||||
define('MAC_PATTERN', "^([0-9A-Fa-f]{2}[:-s]){5}([0-9A-Fa-f]{2})$");
|
define('MAC_PATTERN', "^([0-9A-Fa-f]{2}[:-s]){5}([0-9A-Fa-f]{2})$");
|
||||||
define('PAGE_TITLE', 'CZI Presence Detector');
|
define('PAGE_TITLE', 'CZI Presence Detector');
|
||||||
|
|
||||||
|
@ -164,8 +164,8 @@ if ($_SERVER['REQUEST_METHOD'] == "POST") {
|
||||||
<div class="card-body">
|
<div class="card-body">
|
||||||
<h5 class="card-title">Neues Gerät tracken</h5>
|
<h5 class="card-title">Neues Gerät tracken</h5>
|
||||||
<form method="POST">
|
<form method="POST">
|
||||||
<input class="form-control" type="text" name="name" pattern="<?php echo NAME_PATTERN; ?>" placeholder="Name" value="" /><br>
|
<input class="form-control" type="text" name="name" pattern="<?php echo NAME_PATTERN; ?>" placeholder="Name" value="" required /><br>
|
||||||
<input class="form-control" type="text" name="mac" pattern="<?php echo MAC_PATTERN; ?>" placeholder="MAC-Adresse" value="" /><br>
|
<input class="form-control" type="text" name="mac" pattern="<?php echo MAC_PATTERN; ?>" placeholder="MAC-Adresse" value="" required /><br>
|
||||||
<button class="btn btn-primary" type="submit">Speichern</button>
|
<button class="btn btn-primary" type="submit">Speichern</button>
|
||||||
</form>
|
</form>
|
||||||
</div>
|
</div>
|
||||||
|
@ -176,7 +176,7 @@ if ($_SERVER['REQUEST_METHOD'] == "POST") {
|
||||||
<div class="card-body">
|
<div class="card-body">
|
||||||
<h5 class="card-title">Gerät entfernen</h5>
|
<h5 class="card-title">Gerät entfernen</h5>
|
||||||
<form method="POST">
|
<form method="POST">
|
||||||
<input class="form-control" type="text" name="remove-mac" pattern="<?php echo MAC_PATTERN; ?>" placeholder="MAC-Adresse" value="" /><br>
|
<input class="form-control" type="text" name="remove-mac" pattern="<?php echo MAC_PATTERN; ?>" placeholder="MAC-Adresse" value="" required /><br>
|
||||||
<button class="btn btn-primary" type="submit">Entfernen</button>
|
<button class="btn btn-primary" type="submit">Entfernen</button>
|
||||||
</form>
|
</form>
|
||||||
</div>
|
</div>
|
||||||
|
|
Loading…
Reference in a new issue