diff --git a/src/AdminCabinet/Forms/DefaultIncomingRouteForm.php b/src/AdminCabinet/Forms/DefaultIncomingRouteForm.php index 2dada927..e3af5f92 100644 --- a/src/AdminCabinet/Forms/DefaultIncomingRouteForm.php +++ b/src/AdminCabinet/Forms/DefaultIncomingRouteForm.php @@ -65,22 +65,17 @@ public function initialize($entity = null, $options = null): void break; } case 'audio_message_id' :{ - // Audio_message_id - $fileId = (string)$options['soundfiles']; - if (empty($fileId)) { - $fileId = 'none'; - } $audioMessage = new Select( 'audio_message_id', - $fileId, + $options['soundfiles'], [ - 'using' => [ - 'id', - 'name', - ], - 'useEmpty' => false, - 'class' => 'ui selection dropdown search audio-message-select', - ] + 'using' => [ + 'id', + 'name', + ], + 'useEmpty' => true, + 'class' => 'ui selection dropdown search audio-message-select', + ] ); $this->add($audioMessage); }