From ea07641c7c14f71251d9039f1c7b063d430d6769 Mon Sep 17 00:00:00 2001 From: boffart <> Date: Thu, 14 Nov 2024 10:07:58 +0300 Subject: [PATCH] =?UTF-8?q?#835=20=D0=9F=D0=BE=D0=BF=D1=80=D0=B0=D0=B2?= =?UTF-8?q?=D0=B8=D0=BB=20=D0=BE=D0=BF=D0=B8=D1=81=D0=B0=D0=BD=D0=B8=D0=B5?= =?UTF-8?q?=20Select=20=D1=8D=D0=BB=D0=B5=D0=BC=D0=B5=D0=BD=D1=82=D0=B0=20?= =?UTF-8?q?=D1=84=D0=BE=D1=80=D0=BC=D1=8B?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../Forms/DefaultIncomingRouteForm.php | 21 +++++++------------ 1 file changed, 8 insertions(+), 13 deletions(-) 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); }