width = '100%'; $table->id = 'add_alert_table'; $table->class = 'databox filters integria_incidents_options'; $table->head = []; $table->data = []; $table->size = []; $table->size = []; $table->style[0] = 'width: 33%; padding-right: 50px; padding-left: 100px;'; $table->style[1] = 'width: 33%; padding-right: 50px; padding-left: 50px;'; $table->style[2] = 'width: 33%; padding-right: 100px; padding-left: 50px;'; $table->colspan[0][0] = 2; $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 = ''; } } $table->data[0][0] = '

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

'; $table->data[0][0] .= '
'.html_print_input_text( 'incident_title', $input_value_title, __('Name'), 50, 100, true, false, true, '', 'w100p' ).'
'; $table->data[0][2] = html_print_image('images/integria_logo_gray.png', true, ['style' => 'width: 70%; float: right;'], false); $table->data[1][0] = '

'.__('Type').':

'; $table->data[1][0] .= '
'.html_print_select( $integria_types_values, 'type', $input_value_type, '', __('Select'), 0, true, false, true, '', false, 'width: 100%;' ).'
'; $table->data[2][0] = '

'.__('Status').':

'; $table->data[2][0] .= '
'.html_print_select( $integria_status_values, 'status', $input_value_status, '', __('Select'), 1, true, false, true, '', false, 'width: 100%;' ).'
'; $table->data[1][1] = '

'.__('Group').':

'; $table->data[1][1] .= '
'.html_print_select( $integria_group_values, 'group', $input_value_group, '', '', 0, true, false, true, '', false, 'width: 100%;' ).'
'; $table->data[2][1] = '

'.__('Creator').':

'; $table->data[2][1] .= '
'.html_print_input_text( 'creator', $config['integria_user'], '', '30', 100, true, true, false, '', 'w100p' ).ui_print_help_tip(__('This field corresponds to the Integria IMS user specified in Integria IMS setup'), true).'
'; $table->data[1][2] = '

'.__('Priority').':

'; $table->data[1][2] .= '
'.html_print_select( $integria_criticity_values, 'criticity', $input_value_criticity, '', __('Select'), 0, true, false, true, '', false, 'width: 100%;' ).'
'; $table->data[2][2] = '

'.__('Owner').':

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

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

'; $table->data[3][0] .= '
'.html_print_textarea( 'incident_content', 3, 20, $input_value_content, '', true ).'
'; // Print forms and stuff. echo '
'; html_print_table($table); if (!$update) { html_print_input_hidden('create_incident', 1); } else { html_print_input_hidden('update_incident', 1); } echo '
'; echo '
'; if ($update) { html_print_submit_button(__('Update'), 'accion', false, 'form="create_integria_incident_form" class="sub wand"'); } else { html_print_submit_button(__('Create'), 'accion', false, 'form="create_integria_incident_form" class="sub wand"'); } echo '
';