mirror of
https://github.com/pandorafms/pandorafms.git
synced 2025-07-28 16:24:54 +02:00
#9478 permisions & confirm on delete alert action
This commit is contained in:
parent
a385ff93a3
commit
8be0236af1
@ -1462,25 +1462,19 @@ function ui_format_alert_row(
|
|||||||
|
|
||||||
$actionText .= ui_print_help_tip(__('The default actions will be executed every time that the alert is fired and no other action is executed'), true);
|
$actionText .= ui_print_help_tip(__('The default actions will be executed every time that the alert is fired and no other action is executed'), true);
|
||||||
// Is possible manage actions if have LW permissions in the agent group of the alert module.
|
// Is possible manage actions if have LW permissions in the agent group of the alert module.
|
||||||
if (check_acl($config['id_user'], $id_group, 'LW') || check_acl($config['id_user'], $id_group, 'LM')) {
|
if (check_acl($config['id_user'], $id_group, 'LM')) {
|
||||||
$actionText .= '<form method="post" action="index.php?sec=galertas&sec2=godmode/alerts/alert_list" class="delete_link display_in">';
|
$actionText .= '<a href="index.php?sec=galertas&sec2=godmode/alerts/alert_list&tab=list&delete_action=1&id_alert='.$alert['id'].'&id_agent='.$agente['alias'].'&id_action='.$action['original_id'].'" onClick="if (!confirm(\' '.__('Are you sure you want to delete alert action?').'\')) return false;">'.html_print_image(
|
||||||
$actionText .= html_print_input_image(
|
|
||||||
'delete',
|
|
||||||
'images/delete.svg',
|
'images/delete.svg',
|
||||||
1,
|
|
||||||
'padding:0px; margin-left:5px; margin-right:5px; width: 22px;',
|
|
||||||
true,
|
true,
|
||||||
[
|
[
|
||||||
|
'alt' => __('Delete action'),
|
||||||
'title' => __('Delete action'),
|
'title' => __('Delete action'),
|
||||||
'class' => 'main_menu_icon invert_filter',
|
'class' => 'main_menu_icon invert_filter vertical_baseline',
|
||||||
]
|
]
|
||||||
);
|
).'</a>';
|
||||||
|
}
|
||||||
|
|
||||||
$actionText .= html_print_input_hidden('id_agent', $agente['alias'], true);
|
if (check_acl($config['id_user'], $id_group, 'LW')) {
|
||||||
$actionText .= html_print_input_hidden('delete_action', 1, true);
|
|
||||||
$actionText .= html_print_input_hidden('id_alert', $alert['id'], true);
|
|
||||||
$actionText .= html_print_input_hidden('id_action', $action['original_id'], true);
|
|
||||||
$actionText .= '</form>';
|
|
||||||
$actionText .= html_print_input_image(
|
$actionText .= html_print_input_image(
|
||||||
'update_action',
|
'update_action',
|
||||||
'/images/edit.svg',
|
'/images/edit.svg',
|
||||||
@ -1570,23 +1564,18 @@ function ui_format_alert_row(
|
|||||||
$tableActionButtons[] = '';
|
$tableActionButtons[] = '';
|
||||||
|
|
||||||
// Edit.
|
// Edit.
|
||||||
if (check_acl($config['id_user'], $id_group, 'LW')
|
if (check_acl($config['id_user'], $id_group, 'LM')) {
|
||||||
|| check_acl($config['id_user'], $id_group, 'LM')
|
|
||||||
) {
|
|
||||||
$tableActionButtons[] = html_print_input_hidden('id_agent_module', $alert['id_agent_module'], true);
|
$tableActionButtons[] = html_print_input_hidden('id_agent_module', $alert['id_agent_module'], true);
|
||||||
|
|
||||||
if (check_acl($config['id_user'], $id_group, 'LM')
|
$tableActionButtons[] = '<a href="index.php?sec=galertas&sec2=godmode/alerts/alert_list&tab=list&delete_alert=1&id_alert='.$alert['id'].'&id_agent='.$alert['agent_name'].'" onClick="if (!confirm(\' '.__('Are you sure you want to delete alert?').'\')) return false;">'.html_print_image(
|
||||||
) {
|
'images/delete.svg',
|
||||||
$tableActionButtons[] = '<a href="index.php?sec=galertas&sec2=godmode/alerts/alert_list&tab=list&delete_alert=1&id_alert='.$alert['id'].'&id_agent='.$alert['agent_name'].'" onClick="if (!confirm(\' '.__('Are you sure you want to delete alert?').'\')) return false;">'.html_print_image(
|
true,
|
||||||
'images/delete.svg',
|
[
|
||||||
true,
|
'alt' => __('Delete'),
|
||||||
[
|
'title' => __('Delete'),
|
||||||
'alt' => __('Delete'),
|
'class' => 'main_menu_icon invert_filter vertical_baseline',
|
||||||
'title' => __('Delete'),
|
]
|
||||||
'class' => 'main_menu_icon invert_filter vertical_baseline',
|
).'</a>';
|
||||||
]
|
|
||||||
).'</a>';
|
|
||||||
}
|
|
||||||
|
|
||||||
$tableActionButtons[] = '<a href="javascript:show_add_action(\''.$alert['id'].'\');">'.html_print_image(
|
$tableActionButtons[] = '<a href="javascript:show_add_action(\''.$alert['id'].'\');">'.html_print_image(
|
||||||
'images/plus-black.svg',
|
'images/plus-black.svg',
|
||||||
|
Loading…
x
Reference in New Issue
Block a user