From b17519d2a0bb246421c929ee84c17ed9935d8e40 Mon Sep 17 00:00:00 2001 From: vgilc Date: Fri, 10 Feb 2012 13:57:36 +0000 Subject: [PATCH] 2012-02-10 Vanessa Gil * include/functions_events.php operation/events/events_list.php operation/events/events_validate: Allowed post a comment without changing the event's state. git-svn-id: https://svn.code.sf.net/p/pandora/code/trunk@5556 c3f86ba8-e40f-0410-aaad-9ba5e7f4b01f --- pandora_console/ChangeLog | 6 ++++++ pandora_console/include/functions_events.php | 11 +++++++++-- pandora_console/operation/events/events_list.php | 12 +++++++----- pandora_console/operation/events/events_validate.php | 3 ++- 4 files changed, 24 insertions(+), 8 deletions(-) diff --git a/pandora_console/ChangeLog b/pandora_console/ChangeLog index 08070fe6c8..843b5606a7 100644 --- a/pandora_console/ChangeLog +++ b/pandora_console/ChangeLog @@ -1,3 +1,9 @@ +2012-02-10 Vanessa Gil + * include/functions_events.php + operation/events/events_list.php + operation/events/events_validate: Allowed post a comment + without changing the event's state. + 2012-02-10 Miguel de Dios * * extensions/module_groups.php, include/functions_modules.php, diff --git a/pandora_console/include/functions_events.php b/pandora_console/include/functions_events.php index 28255a6481..0ce9ebe7a1 100644 --- a/pandora_console/include/functions_events.php +++ b/pandora_console/include/functions_events.php @@ -172,7 +172,10 @@ function events_validate_event ($id_event, $similars = true, $comment = '', $new $new_status_string = __('Validated'); break; case 2: - $new_status_string = __('Setted in process'); + $new_status_string = __('Set in process'); + break; + case 3: + $new_status_string = __('Added comment'); break; } @@ -194,7 +197,11 @@ function events_validate_event ($id_event, $similars = true, $comment = '', $new if($fullevent['user_comment'] != ''){ $comment .= '
'.$fullevent['user_comment']; } - + + if ($new_status == 3){ //only add a comment + $new_status = $fullevent["estado"]; + } + $values = array( 'estado' => $new_status, 'id_usuario' => $config['id_user'], diff --git a/pandora_console/operation/events/events_list.php b/pandora_console/operation/events/events_list.php index c43562c11a..d793c095a3 100644 --- a/pandora_console/operation/events/events_list.php +++ b/pandora_console/operation/events/events_list.php @@ -844,15 +844,17 @@ foreach ($result as $event) { $string .= '' . html_print_textarea("comment_".$event["id_evento"], 2, 10, '', 'style="min-height: 10px; width: 250px;"', true) . ''; $string .= ''; $string .= '
'; + if($event["estado"] == 0) { - $string .= html_print_select(array('1' => __('Validate'), '2' => __('Set in process')), 'select_validate_'.$event["id_evento"], '', '', '', 0, true, false, false, 'select_validate').'

'; + $string .= html_print_select(array('1' => __('Validate'), '2' => __('Set in process'), '3' => __('Add comment')), 'select_validate_'.$event["id_evento"], '', '', '', 0, true, false, false, 'select_validate').'

'; } - $string .= ''; if($event["estado"] == 2) { - $string .= html_print_button (__('Validate'), 'validate', false, '', 'class="sub ok validate_event" id="validate-'.$event["id_evento"].'"', true).'
'; - }else { - $string .= html_print_button (__('Change status'), 'validate', false, '', 'class="sub ok validate_event" id="validate-'.$event["id_evento"].'"', true).''; + $string .= html_print_select(array('1' => __('Validate'), '3' => __('Add comment')), 'select_validate_'.$event["id_evento"], '', '', '', 0, true, false, false, 'select_validate').'

'; } + + $string .= '
'; + + $string .= html_print_button (__('Change status'), 'validate', false, '', 'class="sub ok validate_event" id="validate-'.$event["id_evento"].'"', true).''; $string .= ''; $string .= ''; if($event["id_alert_am"] != 0) { diff --git a/pandora_console/operation/events/events_validate.php b/pandora_console/operation/events/events_validate.php index d17e519f5f..06aa36e342 100644 --- a/pandora_console/operation/events/events_validate.php +++ b/pandora_console/operation/events/events_validate.php @@ -100,7 +100,8 @@ $string .= '' . html_print_textarea("comment" $string .= ''; $string .= '
'; -$string .= html_print_select(array('1' => __('Validate'), '2' => __('Set in process')), 'select_validate', '', '', '', 0, true, false, false, 'select_validate').'

'; +$string .= html_print_select(array('1' => __('Validate'), '2' => __('Set in process'), '3' => __('Add comment')), 'select_validate', '', '', '', 0, true, false, false, 'select_validate').'

'; + $string .= html_print_submit_button (__('Change status'), 'validate', false, 'class="sub ok validate_event" id="validate"', true).'
'; $string .= '';