Add hexadecimal filter mask to MAC address input

This commit is contained in:
billz 2024-01-12 18:01:48 +00:00
parent f778cd78a7
commit e5c7ca4053
2 changed files with 9 additions and 1 deletions

View file

@ -468,6 +468,14 @@ $(document).ready(function(){
},
placeholder: "___.___.___.___"
});
$('.date').mask('FF:FF:FF:FF:FF:FF', {
translation: {
"F": {
pattern: /[0-9a-z]/, optional: true
}
},
placeholder: "__:__:__:__:__:__"
});
});
$('#wg-upload,#wg-manual').on('click', function (e) {

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" autofocus="autofocus">
<input type="text" name="mac" value="" placeholder="<?php echo _("MAC address") ?>" class="form-control date" 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">