mirror of
https://github.com/pi-hole/web.git
synced 2025-12-24 20:55:28 +00:00
72
scripts/vendor/jquery.inputmask.extensions.js
generated
vendored
72
scripts/vendor/jquery.inputmask.extensions.js
generated
vendored
@@ -1,72 +0,0 @@
|
||||
/*
|
||||
Input Mask plugin extensions
|
||||
http://github.com/RobinHerbots/jquery.inputmask
|
||||
Copyright (c) 2010 - 2014 Robin Herbots
|
||||
Licensed under the MIT license (http://www.opensource.org/licenses/mit-license.php)
|
||||
Version: 0.0.0
|
||||
|
||||
Modified by DL6ER
|
||||
|
||||
Optional extensions on the jquery.inputmask base
|
||||
*/
|
||||
(function ($) {
|
||||
//extra definitions
|
||||
$.extend($.inputmask.defaults.definitions, {
|
||||
'A': {
|
||||
validator: "[A-Za-z]",
|
||||
cardinality: 1,
|
||||
casing: "upper" //auto uppercasing
|
||||
},
|
||||
'#': {
|
||||
validator: "[A-Za-z\u0410-\u044F\u0401\u04510-9]",
|
||||
cardinality: 1,
|
||||
casing: "upper"
|
||||
}
|
||||
});
|
||||
$.extend($.inputmask.defaults.aliases, {
|
||||
"ip": { //ip-address mask
|
||||
mask: ["[[x]y]z.[[x]y]z.[[x]y]z.x[yz]", "[[x]y]z.[[x]y]z.[[x]y]z.[[x]y][z]"],
|
||||
definitions: {
|
||||
'x': {
|
||||
validator: "[012]",
|
||||
cardinality: 1,
|
||||
definitionSymbol: "i"
|
||||
},
|
||||
'y': {
|
||||
validator: function (chrs, buffer, pos, strict, opts) {
|
||||
if (pos - 1 > -1 && buffer[pos - 1] != ".")
|
||||
chrs = buffer[pos - 1] + chrs;
|
||||
else chrs = "0" + chrs;
|
||||
return new RegExp("2[0-5]|[01][0-9]").test(chrs);
|
||||
},
|
||||
cardinality: 1,
|
||||
definitionSymbol: "i"
|
||||
},
|
||||
'z': {
|
||||
validator: function (chrs, buffer, pos, strict, opts) {
|
||||
if (pos - 1 > -1 && buffer[pos - 1] != ".") {
|
||||
chrs = buffer[pos - 1] + chrs;
|
||||
if (pos - 2 > -1 && buffer[pos - 2] != ".") {
|
||||
chrs = buffer[pos - 2] + chrs;
|
||||
} else chrs = "0" + chrs;
|
||||
} else chrs = "00" + chrs;
|
||||
return new RegExp("25[0-5]|2[0-4][0-9]|[01][0-9][0-9]").test(chrs);
|
||||
},
|
||||
cardinality: 1,
|
||||
definitionSymbol: "i"
|
||||
}
|
||||
}
|
||||
}//,
|
||||
// "ipv6": { //ip-address mask
|
||||
// mask: ["[xxxx][:xxxx][:xxxx][:xxxx][:xxxx][:xxxx][:xxxx][:xxxx]"],
|
||||
// //placeholder: '____:____:____:____:____:____:____:____:____',
|
||||
// definitions: {
|
||||
// 'x': {
|
||||
// validator: "[0-9a-f]",
|
||||
// cardinality: 1,
|
||||
// casing: "upper" //auto uppercasing
|
||||
// }
|
||||
// }
|
||||
// }
|
||||
});
|
||||
})(jQuery);
|
||||
1627
scripts/vendor/jquery.inputmask.js
generated
vendored
1627
scripts/vendor/jquery.inputmask.js
generated
vendored
File diff suppressed because it is too large
Load Diff
10
settings.php
10
settings.php
@@ -400,7 +400,6 @@ if (isset($_GET['tab']) && in_array($_GET['tab'], array("sysadmin", "blocklists"
|
||||
<div class="input-group">
|
||||
<div class="input-group-addon">From</div>
|
||||
<input type="text" class="form-control DHCPgroup" name="from"
|
||||
data-inputmask="'alias': 'ip'" data-mask
|
||||
value="<?php echo $DHCPstart; ?>"
|
||||
<?php if (!$DHCP){ ?>disabled<?php } ?>>
|
||||
</div>
|
||||
@@ -411,7 +410,6 @@ if (isset($_GET['tab']) && in_array($_GET['tab'], array("sysadmin", "blocklists"
|
||||
<div class="input-group">
|
||||
<div class="input-group-addon">To</div>
|
||||
<input type="text" class="form-control DHCPgroup" name="to"
|
||||
data-inputmask="'alias': 'ip'" data-mask
|
||||
value="<?php echo $DHCPend; ?>"
|
||||
<?php if (!$DHCP){ ?>disabled<?php } ?>>
|
||||
</div>
|
||||
@@ -425,7 +423,6 @@ if (isset($_GET['tab']) && in_array($_GET['tab'], array("sysadmin", "blocklists"
|
||||
<div class="input-group">
|
||||
<div class="input-group-addon">Router</div>
|
||||
<input type="text" class="form-control DHCPgroup" name="router"
|
||||
data-inputmask="'alias': 'ip'" data-mask
|
||||
value="<?php echo $DHCProuter; ?>"
|
||||
<?php if (!$DHCP){ ?>disabled<?php } ?>>
|
||||
</div>
|
||||
@@ -464,7 +461,6 @@ if (isset($_GET['tab']) && in_array($_GET['tab'], array("sysadmin", "blocklists"
|
||||
<input type="text" class="form-control DHCPgroup"
|
||||
name="leasetime"
|
||||
id="leasetime" value="<?php echo $DHCPleasetime; ?>"
|
||||
data-inputmask="'mask': '9', 'repeat': 7, 'greedy' : false"
|
||||
data-mask <?php if (!$DHCP){ ?>disabled<?php } ?>>
|
||||
</div>
|
||||
</div>
|
||||
@@ -856,7 +852,7 @@ if (isset($_GET['tab']) && in_array($_GET['tab'], array("sysadmin", "blocklists"
|
||||
when enabling DNSSEC. A DNSSEC resolver test can be found
|
||||
<a href="http://dnssec.vs.uni-due.de/" target="_blank">here</a>.</p>
|
||||
<label>Conditional Forwarding</label>
|
||||
<p>If not configured as your DHCP server, Pi-hole won't be able to
|
||||
<p>If not configured as your DHCP server, Pi-hole won't able to
|
||||
determine the names of devices on your local network. As a
|
||||
result, tables such as Top Clients will only show IP addresses.</p>
|
||||
<p>One solution for this is to configure Pi-hole to forward these
|
||||
@@ -880,7 +876,7 @@ if (isset($_GET['tab']) && in_array($_GET['tab'], array("sysadmin", "blocklists"
|
||||
<tr>
|
||||
<div class="input-group">
|
||||
<td>
|
||||
<input type="text" name="conditionalForwardingIP" class="form-control" data-inputmask="'alias': 'ip'" data-mask
|
||||
<input type="text" name="conditionalForwardingIP" class="form-control"
|
||||
<?php if(isset($conditionalForwardingIP)){ ?>value="<?php echo $conditionalForwardingIP; ?>"<?php } ?>>
|
||||
</td>
|
||||
<td><input type="text" name="conditionalForwardingDomain" class="form-control" data-mask
|
||||
@@ -1383,8 +1379,6 @@ if (isset($_GET['tab']) && in_array($_GET['tab'], array("sysadmin", "blocklists"
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<script src="scripts/vendor/jquery.inputmask.js"></script>
|
||||
<script src="scripts/vendor/jquery.inputmask.extensions.js"></script>
|
||||
<script src="scripts/vendor/jquery.confirm.min.js"></script>
|
||||
<script src="scripts/pi-hole/js/settings.js"></script>
|
||||
|
||||
|
||||
Reference in New Issue
Block a user