Hello all,
I started playing with a module to show a keypad for the security block
There are several, but I picked this one
https://a.kabachnik.info/jquery-numpad.html
Mainly because there is a decent documentation and example included. And it has a pincode example
But despite those, I need a bit of a pointer, as I am not a programmer
I placed the module in vendor/Numpad and I edited the enterCode function in main.js as below:
This shows some keypad keys, so I'm on the right track;-) But it is badly formatted. So there is still something wrong with the css inclusion I think.
Or the object to reference this from ($'body') is not correct.
I haven't even come to the stage to get the actual code out of the numpad,
Any pointer is welcome.
Kind regards,
Bert
Code: Select all
function enterCode(armLevel) {
$(
'<link rel="stylesheet" href="vendor/Numpad/jquery.numpad.css">'
).appendTo('head');
$.ajax({
url: 'vendor/Numpad/jquery.numpad.js',
async: false,
datatype: 'script',
});
var code;
//code = prompt(language.misc.enter_pincode);
$('body').numpad({
hideDecimalButton:true,
hidePlusMinusButton:true });
if (code != null) switchSecurity(armLevel, code);
}