mirror of
https://github.com/pandorafms/pandorafms.git
synced 2025-07-30 01:05:39 +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='',
|
$class='',
|
||||||
$onChange='',
|
$onChange='',
|
||||||
$autocomplete='',
|
$autocomplete='',
|
||||||
$autofocus=false
|
$autofocus=false,
|
||||||
|
$onKeyDown=''
|
||||||
) {
|
) {
|
||||||
if ($maxlength == 0) {
|
if ($maxlength == 0) {
|
||||||
$maxlength = 255;
|
$maxlength = 255;
|
||||||
@ -1575,6 +1576,10 @@ function html_print_input_text(
|
|||||||
$attr['onchange'] = $onChange;
|
$attr['onchange'] = $onChange;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if ($onKeyDown != '') {
|
||||||
|
$attr['onkeydown'] = $onKeyDown;
|
||||||
|
}
|
||||||
|
|
||||||
if ($autocomplete !== '') {
|
if ($autocomplete !== '') {
|
||||||
$attr['autocomplete'] = $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['function']) === true) ? $data['function'] : ''),
|
||||||
((isset($data['class']) === true) ? $data['class'] : ''),
|
((isset($data['class']) === true) ? $data['class'] : ''),
|
||||||
((isset($data['onChange']) === true) ? $data['onChange'] : ''),
|
((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;
|
break;
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user