mirror of
https://github.com/pi-hole/web.git
synced 2024-12-06 19:36:21 +01:00
Pleasing codacy
This commit is contained in:
@@ -2,12 +2,13 @@ $(function () {
|
||||
$("[data-mask]").inputmask();
|
||||
|
||||
$("[data-static]").on("click", function(){
|
||||
var mac = $(this).closest("tr").find('#MAC').text();
|
||||
var ip = $(this).closest("tr").find('#IP').text();
|
||||
var host = $(this).closest("tr").find('#HOST').text();
|
||||
$('input[name="AddHostname"]').val(host);
|
||||
$('input[name="AddIP"]').val(ip);
|
||||
$('input[name="AddMAC"]').val(mac);
|
||||
var row = $(this).closest("tr");
|
||||
var mac = row.find("#MAC").text();
|
||||
var ip = row.find("#IP").text();
|
||||
var host = row.find("#HOST").text();
|
||||
$("input[name=\"AddHostname\"]").val(host);
|
||||
$("input[name=\"AddIP\"]").val(ip);
|
||||
$("input[name=\"AddMAC\"]").val(mac);
|
||||
});
|
||||
|
||||
$("#custom1val").ipAddress({s:4});
|
||||
|
||||
+1
-1
@@ -369,7 +369,7 @@
|
||||
<?php foreach($dhcp_static_leases as $lease) { ?><tr><td><?php echo $lease["hwaddr"]; ?></td><td><?php echo $lease["IP"]; ?></td><td><?php echo $lease["host"]; ?></td><td><?php if(strlen($lease["hwaddr"]) > 0){ ?><button class="btn btn-danger btn-xs" type="submit" name="removestatic" value="<?php echo $lease["hwaddr"]; ?>"><span class="glyphicon glyphicon-trash"></span></button><?php } ?></td></tr><?php } ?>
|
||||
</tbody>
|
||||
<tfoot style="display: table-row-group">
|
||||
<tr><td><input type="text" name="AddMAC" id="AddMAC"></td><td><input type="text" name="AddIP" id="AddIP"></td><td><input type="text" name="AddHostname" id="AddHostname" value=""></td><td><button class="btn btn-success btn-xs" type="submit" name="addstatic"><span class="glyphicon glyphicon-plus"></span></button></td></tr>
|
||||
<tr><td><input type="text" name="AddMAC"></td><td><input type="text" name="AddIP"></td><td><input type="text" name="AddHostname" value=""></td><td><button class="btn btn-success btn-xs" type="submit" name="addstatic"><span class="glyphicon glyphicon-plus"></span></button></td></tr>
|
||||
</tfoot>
|
||||
</table>
|
||||
<p>Specifying the MAC address is mandatory and only one entry per MAC address is allowed. If the IP address is omitted and a host name is given, the IP address will still be generated dynamically and the specified host name will be used. If the host name is omitted, only a static release will be added.</p>
|
||||
|
||||
Reference in New Issue
Block a user