From 56451a5587e592b28cccebc08663f67b3e624c6f Mon Sep 17 00:00:00 2001 From: Arturo Gonzalez Date: Wed, 1 Feb 2017 09:48:37 +0100 Subject: [PATCH] Added "function" value to input text. Ticket #183 --- pandora_console/include/functions_html.php | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/pandora_console/include/functions_html.php b/pandora_console/include/functions_html.php index fb8ece9fb6..ab581a2e70 100644 --- a/pandora_console/include/functions_html.php +++ b/pandora_console/include/functions_html.php @@ -878,7 +878,7 @@ function html_print_extended_select_for_cron ($hour = '*', $minute = '*', $mday * * @return string HTML code if return parameter is true. */ -function html_print_input_text_extended ($name, $value, $id, $alt, $size, $maxlength, $disabled, $script, $attributes, $return = false, $password = false) { +function html_print_input_text_extended ($name, $value, $id, $alt, $size, $maxlength, $disabled, $script, $attributes, $return = false, $password = false, $function = "") { static $idcounter = 0; if ($maxlength == 0) @@ -959,7 +959,7 @@ function html_print_input_text_extended ($name, $value, $id, $alt, $size, $maxle } } - $output .= '/>'; + $output .= $function . '/>'; if (!$return) echo $output; @@ -1067,7 +1067,7 @@ function html_print_input_password ($name, $value, $alt = '', * @return string HTML code if return parameter is true. */ -function html_print_input_text ($name, $value, $alt = '', $size = 50, $maxlength = 255, $return = false, $disabled = false, $required = false, $function = "", $class = "") { +function html_print_input_text ($name, $value, $alt = '', $size = 50, $maxlength = 255, $return = false, $disabled = false, $required = false, $function = "", $class = "", $onChange = "") { if ($maxlength == 0) $maxlength = 255; @@ -1080,6 +1080,9 @@ function html_print_input_text ($name, $value, $alt = '', $size = 50, $maxlength $attr['required'] = 'required'; if ($class != '') $attr['class'] = $class; + if ($onChange != "") { + $attr['onchange'] = $onChange; + } return html_print_input_text_extended ($name, $value, 'text-'.$name, $alt, $size, $maxlength, $disabled, '', $attr, $return, false, $function); }