Merge pull request #1904 from RaspAP/fix/static-lease-mac

Apply input mask to MAC address field using [0-9a-fA-F] pattern
This commit is contained in:
Bill Zimmerman
2025-07-15 08:02:26 +02:00
committed by GitHub
2 changed files with 4 additions and 4 deletions

View File

@@ -606,10 +606,10 @@ $(document).ready(function(){
},
placeholder: "___.___.___.___"
});
$('.date').mask('FF:FF:FF:FF:FF:FF', {
$('.mac_address').mask('FF:FF:FF:FF:FF:FF', {
translation: {
"F": {
pattern: /[0-9a-z]/, optional: true
'F': {
pattern: /[0-9a-fA-F]/, optional: false
}
},
placeholder: "__:__:__:__:__:__"

View File

@@ -30,7 +30,7 @@
<div class="row dhcp-static-lease-row js-new-dhcp-static-lease">
<div class="col-md-4 col-xs-3">
<input type="text" name="mac" value="" placeholder="<?php echo _("MAC address") ?>" class="form-control date" autofocus="autofocus">
<input type="text" name="mac" value="" placeholder="<?php echo _("MAC address") ?>" class="form-control mac_address" autofocus="autofocus">
</div>
<div class="col-md-3 col-xs-3">
<input type="text" name="ip" value="" placeholder="<?php echo _("IP address") ?>" class="form-control ip_address" maxlength="15">