From 11cc31c0adb7cf48362a031cdfa703b7aed7d751 Mon Sep 17 00:00:00 2001 From: Jonathan Date: Thu, 23 Nov 2023 10:23:57 +0100 Subject: [PATCH] #11705 Event custom id edit by EW only --- pandora_console/include/functions_events.php | 32 ++++++++++++-------- 1 file changed, 20 insertions(+), 12 deletions(-) diff --git a/pandora_console/include/functions_events.php b/pandora_console/include/functions_events.php index a7bd74096e..dada577ac8 100644 --- a/pandora_console/include/functions_events.php +++ b/pandora_console/include/functions_events.php @@ -4636,21 +4636,29 @@ function events_page_details($event, $server_id=0) } $table_details->data[] = $data; + $readonly = true; + if (check_acl($config['id_user'], 0, 'EW')) { + $readonly = false; + } $data = []; $data[0] = __('Event Custom ID'); - $data[1] = '
'.html_print_input_text('event_custom_id', $event['event_custom_id'], '', false, 255, true, false, false, '', 'w60p'); - $data[1] .= html_print_button( - __('Update'), - 'update_event_custom_id', - false, - 'update_event_custom_id('.$event['id_evento'].', '.$event['server_id'].');', - [ - 'icon' => 'next', - 'mode' => 'link', - ], - true - ).'
'; + $data[1] = '
'.html_print_input_text('event_custom_id', $event['event_custom_id'], '', false, 255, true, $readonly, false, '', 'w60p'); + if ($readonly === false) { + $data[1] .= html_print_button( + __('Update'), + 'update_event_custom_id', + false, + 'update_event_custom_id('.$event['id_evento'].', '.$event['server_id'].');', + [ + 'icon' => 'next', + 'mode' => 'link', + ], + true + ); + } + + $data[1] .= '
'; $table_details->data[] = $data; $details = '
'.html_print_table($table_details, true).'
';