diff --git a/pandora_console/include/ajax/events.php b/pandora_console/include/ajax/events.php index 0873923f2c..38decc719d 100644 --- a/pandora_console/include/ajax/events.php +++ b/pandora_console/include/ajax/events.php @@ -2089,7 +2089,6 @@ if ($get_events_fired) { foreach ($data as $event) { $return[] = [ 'fired' => $event['id_evento'], - 'sound' => 'include/sounds/Star_Trek_emergency_simulation.wav', 'message' => ui_print_string_substr( strip_tags(io_safe_output($event['evento'])), 75, diff --git a/pandora_console/operation/events/events.php b/pandora_console/operation/events/events.php index 5f3a733318..525e12c021 100644 --- a/pandora_console/operation/events/events.php +++ b/pandora_console/operation/events/events.php @@ -962,12 +962,20 @@ if ($pure) { ?> 'Air craft alarm', + 'air_shock_alarm.wav' => 'Air shock alarm', + 'alien_alarm.wav' => 'Alien alarm', + 'alien_beacon.wav' => 'Alien beacon', + 'bell_school_ringing.wav' => 'Bell school ringing', + 'Door_Alarm.wav' => 'Door alarm', + 'EAS_beep.wav' => 'EAS beep', + 'Firewarner.wav' => 'Fire warner', + 'HardPCMAlarm.wav' => 'Hard PCM Alarm', + 'negativebeep.wav' => 'Negative beep', + 'Star_Trek_emergency_simulation.wav' => 'StarTrek emergency simulation', +]; + +$inputs[] = [ + 'label' => \__('Sounds'), + 'class' => 'flex-row', + 'arguments' => [ + 'type' => 'select', + 'fields' => $sounds, + 'name' => 'sound_id', + 'selected' => 'Star_Trek_emergency_simulation.wav', + 'return' => true, + 'class' => 'fullwidth', + ], +]; + // Print form. HTML::printForm( [ @@ -375,6 +402,7 @@ function forgetPreviousEvents() { function check_event() { if (running) { + var sound = '../../include/sounds/' + $('#sound_id').val(); jQuery.post ("../../ajax.php", { "page" : "include/ajax/events", @@ -392,12 +420,11 @@ function check_event() { 'src','../../images/sound_events_console_alert.gif' ); $('audio').remove(); - if(data[0].sound == '') { - data[0].sound = 'include/sounds/Star_Trek_emergency_simulation.wav'; - } $('body') - .append("