From a94c70551df09f59d02a4de600d728f6841f3be8 Mon Sep 17 00:00:00 2001 From: Luis Date: Mon, 10 May 2021 09:17:14 +0000 Subject: [PATCH] Ent 7155 bug edicion tickets integria --- pandora_console/include/functions_html.php | 18 ++++-- .../configure_integriaims_incident.php | 56 ++++++++++--------- 2 files changed, 42 insertions(+), 32 deletions(-) diff --git a/pandora_console/include/functions_html.php b/pandora_console/include/functions_html.php index e80fa6f9fd..50da74c24c 100644 --- a/pandora_console/include/functions_html.php +++ b/pandora_console/include/functions_html.php @@ -4987,10 +4987,13 @@ function html_print_input_multicheck(array $data):string /** * Print an autocomplete input filled out with Integria IMS users. * - * @param string $name The name of ajax control, by default is "users". - * @param string $default The default value to show in the ajax control. - * @param boolean $return If it is true return a string with the output instead to echo the output. - * @param string $size Size. + * @param string $name The name of ajax control, by default is "users". + * @param string $default The default value to show in the ajax control. + * @param boolean $return If it is true return a string with the output instead to echo the output. + * @param string $size Size. + * @param boolean $disable Disable the button (optional, button enabled by default). + * @param boolean $required Attribute required. + * @param string $class Text inpunt class. * * @return mixed If the $return is true, return the output as string. */ @@ -5000,7 +5003,8 @@ function html_print_autocomplete_users_from_integria( $return=false, $size='30', $disable=false, - $required=false + $required=false, + $class=null ) { global $config; @@ -5012,6 +5016,10 @@ function html_print_autocomplete_users_from_integria( $attrs['required'] = 'required'; } + if (empty($class) === false) { + $attrs['class'] = $class; + } + html_print_input_text_extended( $name, $default, diff --git a/pandora_console/operation/incidents/configure_integriaims_incident.php b/pandora_console/operation/incidents/configure_integriaims_incident.php index 195ee7350f..aeadb5e10a 100644 --- a/pandora_console/operation/incidents/configure_integriaims_incident.php +++ b/pandora_console/operation/incidents/configure_integriaims_incident.php @@ -163,32 +163,30 @@ $table->colspan[3][0] = 3; $help_macros = isset($_GET['from_event']) ? ui_print_help_icon('response_macros', true) : ''; -if (isset($_GET['from_event'])) { - if ($update) { - $input_value_title = $incident_details[3]; - $input_value_type = $incident_details[17]; - $input_value_status = $incident_details[6]; - $input_value_group = $incident_details[8]; - $input_value_criticity = $incident_details[7]; - $input_value_owner = $incident_details[5]; - $input_value_content = $incident_details[4]; - } else if (isset($_GET['from_event'])) { - $input_value_title = $config['cr_incident_title']; - $input_value_type = $config['cr_incident_type']; - $input_value_status = $config['cr_incident_status']; - $input_value_group = $config['cr_default_group']; - $input_value_criticity = $config['cr_default_criticity']; - $input_value_owner = $config['cr_default_owner']; - $input_value_content = $config['cr_incident_content']; - } else { - $input_value_title = ''; - $input_value_type = ''; - $input_value_status = ''; - $input_value_group = ''; - $input_value_criticity = ''; - $input_value_owner = ''; - $input_value_content = ''; - } +if ($update) { + $input_value_title = $incident_details[3]; + $input_value_type = $incident_details[17]; + $input_value_status = $incident_details[6]; + $input_value_group = $incident_details[8]; + $input_value_criticity = $incident_details[7]; + $input_value_owner = $incident_details[5]; + $input_value_content = $incident_details[4]; +} else if (isset($_GET['from_event'])) { + $input_value_title = $config['cr_incident_title']; + $input_value_type = $config['cr_incident_type']; + $input_value_status = $config['cr_incident_status']; + $input_value_group = $config['cr_default_group']; + $input_value_criticity = $config['cr_default_criticity']; + $input_value_owner = $config['cr_default_owner']; + $input_value_content = $config['cr_incident_content']; +} else { + $input_value_title = ''; + $input_value_type = ''; + $input_value_status = ''; + $input_value_group = ''; + $input_value_criticity = ''; + $input_value_owner = ''; + $input_value_content = ''; } $table->data[0][0] = '

'.__('Title').': '.$help_macros.'

'; @@ -290,7 +288,11 @@ $table->data[2][2] = '

'.__('Own $table->data[2][2] .= '

'.html_print_autocomplete_users_from_integria( 'owner', $input_value_owner, - true + true, + '30', + false, + false, + 'w100p' ).'
'; $table->data[3][0] = '

'.__('Description').': '.$help_macros.'

';