mirror of
https://github.com/pandorafms/pandorafms.git
synced 2025-07-29 08:45:12 +02:00
Added onKeyDown feature for text inputs
This commit is contained in:
parent
6a7e9ba400
commit
172bbed817
@ -1550,7 +1550,8 @@ function html_print_input_text(
|
||||
$class='',
|
||||
$onChange='',
|
||||
$autocomplete='',
|
||||
$autofocus=false
|
||||
$autofocus=false,
|
||||
$onKeyDown=''
|
||||
) {
|
||||
if ($maxlength == 0) {
|
||||
$maxlength = 255;
|
||||
@ -1575,6 +1576,10 @@ function html_print_input_text(
|
||||
$attr['onchange'] = $onChange;
|
||||
}
|
||||
|
||||
if ($onKeyDown != '') {
|
||||
$attr['onkeydown'] = $onKeyDown;
|
||||
}
|
||||
|
||||
if ($autocomplete !== '') {
|
||||
$attr['autocomplete'] = $autocomplete;
|
||||
}
|
||||
@ -3451,7 +3456,9 @@ function html_print_input($data, $wrapper='div', $input_only=false)
|
||||
((isset($data['function']) === true) ? $data['function'] : ''),
|
||||
((isset($data['class']) === true) ? $data['class'] : ''),
|
||||
((isset($data['onChange']) === true) ? $data['onChange'] : ''),
|
||||
((isset($data['autocomplete']) === true) ? $data['autocomplete'] : '')
|
||||
((isset($data['autocomplete']) === true) ? $data['autocomplete'] : ''),
|
||||
false,
|
||||
((isset($data['onKeyDown']) === true) ? $data['onKeyDown'] : '')
|
||||
);
|
||||
break;
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user