2013-09-20 Sergio Martin <sergio.martin@artica.es>
* godmode/alerts/alert_list.list.php godmode/alerts/alert_list.builder.php: Fix the alerts creation to allow create an alert with default action. bug #2353 Improve default actions string too. git-svn-id: https://svn.code.sf.net/p/pandora/code/trunk@8790 c3f86ba8-e40f-0410-aaad-9ba5e7f4b01f
This commit is contained in:
parent
95161631dd
commit
ff90b824f4
|
@ -1,3 +1,10 @@
|
|||
2013-09-20 Sergio Martin <sergio.martin@artica.es>
|
||||
|
||||
* godmode/alerts/alert_list.list.php
|
||||
godmode/alerts/alert_list.builder.php: Fix the alerts creation
|
||||
to allow create an alert with default action. bug #2353
|
||||
Improve default actions string too.
|
||||
|
||||
2013-09-18 Juan Manuel Ramon <juanmanuel.ramon@artica.es>
|
||||
|
||||
* godmode/alerts/configure_alert_action.php: Fix update
|
||||
|
|
|
@ -106,10 +106,9 @@ if (!empty($groups_user)) {
|
|||
$sql = "SELECT id, name FROM talert_actions WHERE id_group IN ($groups)";
|
||||
$actions = db_get_all_rows_sql($sql);
|
||||
}
|
||||
|
||||
$table->data[2][1] = '<div class="actions_container">';
|
||||
$table->data[2][1] = html_print_select(index_array ($actions, 'id', 'name'),'action_select','','','','',true, '', true, '', false, 'width: 250px;');
|
||||
$table->data[2][1] .= '<span id="advanced_action" class="advanced_actions"><br>';
|
||||
$table->data[2][1] .= html_print_select(index_array ($actions, 'id', 'name'),'action_select','','',__('Default action'),'0',true, '', true, '', false, 'width: 250px;');
|
||||
$table->data[2][1] .= '<span id="advanced_action" class="advanced_actions invisible"><br>';
|
||||
$table->data[2][1] .= __('Number of alerts match from').' ';
|
||||
$table->data[2][1] .= html_print_input_text ('fires_min', '', '', 4, 10, true);
|
||||
$table->data[2][1] .= ' '.__('to').' ';
|
||||
|
@ -176,8 +175,8 @@ $(document).ready (function () {
|
|||
$("#action_loading").show ();
|
||||
});
|
||||
|
||||
$("#action_select").change(function () {
|
||||
if ($("#action_select").attr ("value") != '0') {
|
||||
$(".actions_container [name='action_select']").change(function () {
|
||||
if ($(this).val() != '0') {
|
||||
$('#advanced_action').show();
|
||||
}
|
||||
else {
|
||||
|
|
|
@ -457,7 +457,7 @@ foreach ($simple_alerts as $alert) {
|
|||
WHERE id = ".$alert["id_alert_template"]);
|
||||
if ($default_action != "") {
|
||||
$data[3] .= "<tr><td>";
|
||||
$data[3] .= __("Default"). " : ".db_get_sql ("SELECT name FROM talert_actions WHERE id = $default_action");
|
||||
$data[3] .= __("Default"). " : ".db_get_sql ("SELECT name FROM talert_actions WHERE id = $default_action") . ' <em>(' . __('Always') . ')</em>';
|
||||
$data[3] .= "</td>";
|
||||
$data[3] .= "<td></td>";
|
||||
$data[3] .= "</tr>";
|
||||
|
|
Loading…
Reference in New Issue