diff --git a/app/voicemail_greetings/app_languages.php b/app/voicemail_greetings/app_languages.php index 49f3f19022..a03c5c6838 100644 --- a/app/voicemail_greetings/app_languages.php +++ b/app/voicemail_greetings/app_languages.php @@ -809,3 +809,57 @@ $text['description-message']['tr-tr'] = "Kayıt mesajı."; $text['description-message']['zh-cn'] = "录音消息。"; $text['description-message']['ja-jp'] = "録音メッセージ。"; $text['description-message']['ko-kr'] = "녹음 메시지입니다."; + +$text['label-update_greeting']['en-us'] = "Update"; +$text['label-update_greeting']['en-gb'] = "Update"; +$text['label-update_greeting']['ar-eg'] = "تحديث"; +$text['label-update_greeting']['de-at'] = "Aktualisieren"; +$text['label-update_greeting']['de-ch'] = "Aktualisieren"; +$text['label-update_greeting']['de-de'] = "Aktualisieren"; +$text['label-update_greeting']['el-gr'] = "Εκσυγχρονίζω"; +$text['label-update_greeting']['es-cl'] = "Actualizar"; +$text['label-update_greeting']['es-mx'] = "Actualizar"; +$text['label-update_greeting']['fr-ca'] = "Mise à jour"; +$text['label-update_greeting']['fr-fr'] = "Mise à jour"; +$text['label-update_greeting']['he-il'] = "לְעַדְכֵּן"; +$text['label-update_greeting']['it-it'] = "Aggiornamento"; +$text['label-update_greeting']['ka-ge'] = "განახლების შეტყობინება"; +$text['label-update_greeting']['nl-nl'] = "Update"; +$text['label-update_greeting']['pl-pl'] = "Aktualizacja"; +$text['label-update_greeting']['pt-br'] = "Atualizar"; +$text['label-update_greeting']['pt-pt'] = "Atualização"; +$text['label-update_greeting']['ro-ro'] = "Actualizare"; +$text['label-update_greeting']['ru-ru'] = "Обновлять"; +$text['label-update_greeting']['sv-se'] = "Uppdatera"; +$text['label-update_greeting']['uk-ua'] = "Оновлення"; +$text['label-update_greeting']['tr-tr'] = "Güncelleme"; +$text['label-update_greeting']['zh-cn'] = "更新"; +$text['label-update_greeting']['ja-jp'] = "アップデート"; +$text['label-update_greeting']['ko-kr'] = "업데이트"; + +$text['description-update_greeting']['en-us'] = "When enabled a greeting will be created to replace the previous one."; +$text['description-update_greeting']['en-gb'] = "When enabled a greeting will be created to replace the previous one."; +$text['description-update_greeting']['ar-eg'] = "عند تمكينه، سيُخلق تحية لت-replace السابقة."; +$text['description-update_greeting']['de-at'] = "Wenn aktiviert, wird eine Begrüßung erstellt, um die vorherige zu ersetzen."; +$text['description-update_greeting']['de-ch'] = "Wenn aktiviert, wird eine Begrüßung erstellt, um die vorherige zu ersetzen."; +$text['description-update_greeting']['de-de'] = "Wenn aktiviert, wird eine Begrüßung erstellt, um die vorherige zu ersetzen."; +$text['description-update_greeting']['el-gr'] = "Όταν ενεργοποιηθεί, θα δημιουργηθεί μια χαιρετισμός για να αντικαταστήσει τον προηγούμενο."; +$text['description-update_greeting']['es-cl'] = "Al habilitarse, se creará un saludo para reemplazar el anterior."; +$text['description-update_greeting']['es-mx'] = "Al habilitarse, se creará un saludo para reemplazar el anterior."; +$text['description-update_greeting']['fr-ca'] = "Lors de l'activation, un salut d'accueil sera créé pour remplacer le précédent."; +$text['description-update_greeting']['fr-fr'] = "Lors de l'activation, un message de bienvenue sera créé pour remplacer le précédent."; +$text['description-update_greeting']['he-il'] = "כשזה מופעל, תיווצר ברכה כדי להחליף את הקודמת."; +$text['description-update_greeting']['it-it'] = "Quando abilitato, verrà creato un saluto per sostituire il precedente."; +$text['description-update_greeting']['ka-ge'] = "გამოყენებისას შექმნილი იქნება გმადლობები, რომ წინა ერთს შეიცვალოს."; +$text['description-update_greeting']['nl-nl'] = "Wanneer ingeschakeld, wordt een groet gemaakt om de vorige te vervangen."; +$text['description-update_greeting']['pl-pl'] = "Po włączeniu utworzony zostanie powitanie, aby zastąpić poprzednie."; +$text['description-update_greeting']['pt-br'] = "Ao ser habilitado, um cumprimento será criado para substituir o anterior."; +$text['description-update_greeting']['pt-pt'] = "Ao ser ativado, será criado um cumprimento para substituir o anterior."; +$text['description-update_greeting']['ro-ro'] = "Când este activat, va fi creat un salut pentru a înlocui cel anterior."; +$text['description-update_greeting']['ru-ru'] = "При включении будет создан приветствие, чтобы заменить предыдущее."; +$text['description-update_greeting']['sv-se'] = "När det är aktiverat, skapas ett hälsningsmeddelande för att ersätta det tidigare."; +$text['description-update_greeting']['uk-ua'] = "При увімкненні буде створено вітання, щоб замінювати попереднє."; +$text['description-update_greeting']['tr-tr'] = "Etkinleştirildiğinde, öncekiyi değiştirmek için bir selam oluşturulur."; +$text['description-update_greeting']['zh-cn'] = "启用时,将创建一个问候来替换之前的问候。"; +$text['description-update_greeting']['ja-jp'] = "有効にすると、前のものを置き換える挨拶が作成されます。"; +$text['description-update_greeting']['ko-kr'] = "활성화되면 이전 것을 대체하는 인사 메시지가 생성됩니다."; \ No newline at end of file diff --git a/app/voicemail_greetings/voicemail_greeting_edit.php b/app/voicemail_greetings/voicemail_greeting_edit.php index 80ac9ca895..6ffbdf2655 100644 --- a/app/voicemail_greetings/voicemail_greeting_edit.php +++ b/app/voicemail_greetings/voicemail_greeting_edit.php @@ -17,7 +17,7 @@ The Initial Developer of the Original Code is Mark J Crane - Portions created by the Initial Developer are Copyright (C) 2008-2025 + Portions created by the Initial Developer are Copyright (C) 2008-2026 the Initial Developer. All Rights Reserved. Contributor(s): @@ -201,8 +201,19 @@ if (!empty($_POST) && empty($_POST["persistformvar"])) { //set file name $greeting_filename = 'greeting_'.$greeting_id.'.'.$greeting_format; - //text to audio - make a new audio file from the message + //determine whether to create the recording + $update_greeting = false; if ($speech_enabled && !empty($greeting_voice) && !empty($greeting_message)) { + if ($action == 'add') { + $update_greeting = true; + } + if ($action == 'update' && $_POST["update_greeting"] == 'true') { + $update_greeting = true; + } + } + + //text to audio - make a new audio file from the message + if ($update_greeting && $speech_enabled && !empty($greeting_voice) && !empty($greeting_message)) { $speech->audio_path = $greeting_path; $speech->audio_filename = $greeting_filename; $speech->audio_format = $greeting_format; @@ -257,17 +268,15 @@ if (!empty($_POST) && empty($_POST["persistformvar"])) { } //redirect - header("Location: voicemail_greetings.php?id=".$voicemail_id); + header("Location: voicemail_greeting_edit.php?id=".$voicemail_greeting_uuid."&voicemail_id=".$voicemail_id); exit; } } //pre-populate the form - if ( - $action == 'update' && + if ($action == 'update' && !empty($voicemail_greeting_uuid) && is_uuid($voicemail_greeting_uuid) && - (empty($_POST["persistformvar"]) || $_POST["persistformvar"] != "true") - ) { + (empty($_POST["persistformvar"]) || $_POST["persistformvar"] != "true")) { $sql = "select * from v_voicemail_greetings "; $sql .= "where domain_uuid = :domain_uuid "; $sql .= "and voicemail_greeting_uuid = :voicemail_greeting_uuid "; @@ -344,9 +353,9 @@ if (!empty($_POST) && empty($_POST["persistformvar"])) { echo "\n"; echo "\n"; } -// else { -// echo "\n"; -// } + // else { + // echo "\n"; + // } //voices echo "\n"; @@ -458,6 +467,29 @@ if (!empty($_POST) && empty($_POST["persistformvar"])) { echo $text['description-message']."\n"; echo "\n"; echo "\n"; + + if ($action == 'update') { + echo "\n"; + echo "\n"; + echo " ".$text['label-update_greeting']."\n"; + echo "\n"; + echo "\n"; + if ($input_toggle_style_switch) { + echo " \n"; + } + echo " \n"; + if ($input_toggle_style_switch) { + echo " \n"; + echo " \n"; + } + echo "
\n"; + echo $text['description-update_greeting']."\n"; + echo "\n"; + echo "\n"; + } } echo "\n";