Data precision... (Added integer controll between 0 and 5)
This commit is contained in:
parent
d5f82b568c
commit
6c185386ac
|
@ -398,7 +398,8 @@ if (!enterprise_installed()) {
|
|||
}
|
||||
|
||||
$table_chars->data[$row][0] = __('Data precision for reports');
|
||||
$table_chars->data[$row][1] = html_print_input_text ('graph_precision', $config["graph_precision"], '', 5, 5, true, $disabled_graph_precision);
|
||||
$table_chars->data[$row][0] .= ui_print_help_tip(__('Precision must be a integer number between 0 and 5'), true);
|
||||
$table_chars->data[$row][1] = html_print_input_text ('graph_precision', $config["graph_precision"], '', 5, 5, true, $disabled_graph_precision, false, "onChange=\"change_precision()\"");
|
||||
$row++;
|
||||
|
||||
$table_chars->data[$row][0] = __('Default line thickness for the Custom Graph.');
|
||||
|
@ -752,7 +753,13 @@ function showPreview() {
|
|||
$("#preview_image").html(data);
|
||||
}
|
||||
);
|
||||
|
||||
}
|
||||
|
||||
function change_precision() {
|
||||
var value = $("#text-graph_precision").val();
|
||||
if ((value < 0) || (value > 5)) {
|
||||
$("#text-graph_precision").val(1);
|
||||
}
|
||||
}
|
||||
|
||||
tinyMCE.init({
|
||||
|
|
|
@ -887,7 +887,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)
|
||||
|
@ -968,8 +968,8 @@ function html_print_input_text_extended ($name, $value, $id, $alt, $size, $maxle
|
|||
}
|
||||
}
|
||||
|
||||
$output .= '/>';
|
||||
|
||||
$output .= $function . '/>';
|
||||
|
||||
if (!$return)
|
||||
echo $output;
|
||||
|
||||
|
@ -1073,10 +1073,10 @@ 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 html_print_input_text ($name, $value, $alt = '', $size = 50, $maxlength = 255, $return = false, $disabled = false, $required = false, $function = "") {
|
||||
if ($maxlength == 0)
|
||||
$maxlength = 255;
|
||||
|
||||
|
||||
if ($size == 0)
|
||||
$size = 10;
|
||||
|
||||
|
@ -1084,7 +1084,7 @@ function html_print_input_text ($name, $value, $alt = '', $size = 50, $maxlength
|
|||
if ($required)
|
||||
$attr['required'] = 'required';
|
||||
|
||||
return html_print_input_text_extended ($name, $value, 'text-'.$name, $alt, $size, $maxlength, $disabled, '', $attr, $return);
|
||||
return html_print_input_text_extended ($name, $value, 'text-'.$name, $alt, $size, $maxlength, $disabled, '', $attr, $return, false, $function);
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
Loading…
Reference in New Issue