From 31d199a637a3f7f4dc58bd2a0d67b81acecb83b3 Mon Sep 17 00:00:00 2001 From: agree <37550360+greenbea@users.noreply.github.com> Date: Tue, 31 Mar 2020 17:51:00 -0400 Subject: [PATCH] Conference center announcement control (#5224) * Update conference_room_edit.php --- app/conference_centers/app_config.php | 22 ++++- app/conference_centers/app_languages.php | 84 ++++++++++++----- .../conference_room_edit.php | 90 ++++++++++++++++--- .../scripts/app/conference_center/index.lua | 46 +++++----- 4 files changed, 186 insertions(+), 56 deletions(-) diff --git a/app/conference_centers/app_config.php b/app/conference_centers/app_config.php index 53c50d7bfa..b5177a9972 100644 --- a/app/conference_centers/app_config.php +++ b/app/conference_centers/app_config.php @@ -123,7 +123,17 @@ $apps[$x]['permissions'][$y]['groups'][] = "admin"; $apps[$x]['permissions'][$y]['groups'][] = "user"; $y++; - $apps[$x]['permissions'][$y]['name'] = "conference_room_announce"; + $apps[$x]['permissions'][$y]['name'] = "conference_room_announce_name"; + $apps[$x]['permissions'][$y]['groups'][] = "superadmin"; + $apps[$x]['permissions'][$y]['groups'][] = "admin"; + $apps[$x]['permissions'][$y]['groups'][] = "user"; + $y++; + $apps[$x]['permissions'][$y]['name'] = "conference_room_announce_count"; + $apps[$x]['permissions'][$y]['groups'][] = "superadmin"; + $apps[$x]['permissions'][$y]['groups'][] = "admin"; + $apps[$x]['permissions'][$y]['groups'][] = "user"; + $y++; + $apps[$x]['permissions'][$y]['name'] = "conference_room_announce_recording"; $apps[$x]['permissions'][$y]['groups'][] = "superadmin"; $apps[$x]['permissions'][$y]['groups'][] = "admin"; $apps[$x]['permissions'][$y]['groups'][] = "user"; @@ -300,10 +310,18 @@ $apps[$x]['db'][$y]['fields'][$z]['type'] = "text"; $apps[$x]['db'][$y]['fields'][$z]['description']['en-us'] = "Wait for the moderator to join before starting the conference."; $z++; - $apps[$x]['db'][$y]['fields'][$z]['name'] = "announce"; + $apps[$x]['db'][$y]['fields'][$z]['name'] = "announce_name"; $apps[$x]['db'][$y]['fields'][$z]['type'] = "text"; $apps[$x]['db'][$y]['fields'][$z]['description']['en-us'] = "Introduce participants as they enter the conference."; $z++; + $apps[$x]['db'][$y]['fields'][$z]['name'] = "announce_count"; + $apps[$x]['db'][$y]['fields'][$z]['type'] = "text"; + $apps[$x]['db'][$y]['fields'][$z]['description']['en-us'] = "Announce number of participants when entering the conference."; + $z++; + $apps[$x]['db'][$y]['fields'][$z]['name'] = "announce_recording"; + $apps[$x]['db'][$y]['fields'][$z]['type'] = "text"; + $apps[$x]['db'][$y]['fields'][$z]['description']['en-us'] = "Announce to participants that conference is being recorded."; + $z++; $apps[$x]['db'][$y]['fields'][$z]['name'] = "sounds"; $apps[$x]['db'][$y]['fields'][$z]['type'] = "text"; $apps[$x]['db'][$y]['fields'][$z]['description']['en-us'] = "Play sound when someone enters or exists the conference."; diff --git a/app/conference_centers/app_languages.php b/app/conference_centers/app_languages.php index 5d20e8c385..9e0ffd2e39 100644 --- a/app/conference_centers/app_languages.php +++ b/app/conference_centers/app_languages.php @@ -1304,26 +1304,68 @@ $text['label-caller-id-name']['ru-ru'] = "Caller ID имя звонящего"; $text['label-caller-id-name']['sv-se'] = "Namnpresentation"; $text['label-caller-id-name']['uk-ua'] = "Caller ID Ім’я"; -$text['label-announce']['en-us'] = "Announce"; -$text['label-announce']['en-gb'] = "Announce"; -$text['label-announce']['ar-eg'] = ""; -$text['label-announce']['de-at'] = "Ankündigen"; //copied from de-de -$text['label-announce']['de-ch'] = "Ankündigen"; //copied from de-de -$text['label-announce']['de-de'] = "Ankündigen"; -$text['label-announce']['es-cl'] = "Anunciar"; -$text['label-announce']['es-mx'] = "Anunciar"; //copied from es-cl -$text['label-announce']['fr-ca'] = "Annonce"; //copied from fr-fr -$text['label-announce']['fr-fr'] = "Annonce"; -$text['label-announce']['he-il'] = ""; -$text['label-announce']['it-it'] = "Annuncio"; -$text['label-announce']['nl-nl'] = "Aankondiging"; -$text['label-announce']['pl-pl'] = "Zapowiedz"; -$text['label-announce']['pt-br'] = "Anunciar"; //copied from pt-pt -$text['label-announce']['pt-pt'] = "Anunciar"; -$text['label-announce']['ro-ro'] = ""; -$text['label-announce']['ru-ru'] = "Анонс"; -$text['label-announce']['sv-se'] = "Meddela"; -$text['label-announce']['uk-ua'] = "Анонс"; +$text['label-announce_name']['en-us'] = "Announce Name"; +$text['label-announce_name']['en-gb'] = "Announce Name"; +$text['label-announce_name']['ar-eg'] = ""; +$text['label-announce_name']['de-at'] = "Ankündigen"; //copied from de-de +$text['label-announce_name']['de-ch'] = "Ankündigen"; //copied from de-de +$text['label-announce_name']['de-de'] = "Ankündigen"; +$text['label-announce_name']['es-cl'] = "Anunciar"; +$text['label-announce_name']['es-mx'] = "Anunciar"; //copied from es-cl +$text['label-announce_name']['fr-ca'] = "Annonce"; //copied from fr-fr +$text['label-announce_name']['fr-fr'] = "Annonce"; +$text['label-announce_name']['he-il'] = ""; +$text['label-announce_name']['it-it'] = "Annuncio"; +$text['label-announce_name']['nl-nl'] = "Aankondiging"; +$text['label-announce_name']['pl-pl'] = "Zapowiedz"; +$text['label-announce_name']['pt-br'] = "Anunciar"; //copied from pt-pt +$text['label-announce_name']['pt-pt'] = "Anunciar"; +$text['label-announce_name']['ro-ro'] = ""; +$text['label-announce_name']['ru-ru'] = "Анонс"; +$text['label-announce_name']['sv-se'] = "Meddela"; +$text['label-announce_name']['uk-ua'] = "Анонс"; + +$text['label-announce_count']['en-us'] = "Announce Count"; +$text['label-announce_count']['en-gb'] = "Announce Count"; +$text['label-announce_count']['ar-eg'] = ""; +$text['label-announce_count']['de-at'] = "Ankündigen"; //copied from de-de +$text['label-announce_count']['de-ch'] = "Ankündigen"; //copied from de-de +$text['label-announce_count']['de-de'] = "Ankündigen"; +$text['label-announce_count']['es-cl'] = "Anunciar"; +$text['label-announce_count']['es-mx'] = "Anunciar"; //copied from es-cl +$text['label-announce_count']['fr-ca'] = "Annonce"; //copied from fr-fr +$text['label-announce_count']['fr-fr'] = "Annonce"; +$text['label-announce_count']['he-il'] = ""; +$text['label-announce_count']['it-it'] = "Annuncio"; +$text['label-announce_count']['nl-nl'] = "Aankondiging"; +$text['label-announce_count']['pl-pl'] = "Zapowiedz"; +$text['label-announce_count']['pt-br'] = "Anunciar"; //copied from pt-pt +$text['label-announce_count']['pt-pt'] = "Anunciar"; +$text['label-announce_count']['ro-ro'] = ""; +$text['label-announce_count']['ru-ru'] = "Анонс"; +$text['label-announce_count']['sv-se'] = "Meddela"; +$text['label-announce_count']['uk-ua'] = "Анонс"; + +$text['label-announce_recording']['en-us'] = "Announce Recording"; +$text['label-announce_recording']['en-gb'] = "Announce Recording"; +$text['label-announce_recording']['ar-eg'] = ""; +$text['label-announce_recording']['de-at'] = "Ankündigen"; //copied from de-de +$text['label-announce_recording']['de-ch'] = "Ankündigen"; //copied from de-de +$text['label-announce_recording']['de-de'] = "Ankündigen"; +$text['label-announce_recording']['es-cl'] = "Anunciar"; +$text['label-announce_recording']['es-mx'] = "Anunciar"; //copied from es-cl +$text['label-announce_recording']['fr-ca'] = "Annonce"; //copied from fr-fr +$text['label-announce_recording']['fr-fr'] = "Annonce"; +$text['label-announce_recording']['he-il'] = ""; +$text['label-announce_recording']['it-it'] = "Annuncio"; +$text['label-announce_recording']['nl-nl'] = "Aankondiging"; +$text['label-announce_recording']['pl-pl'] = "Zapowiedz"; +$text['label-announce_recording']['pt-br'] = "Anunciar"; //copied from pt-pt +$text['label-announce_recording']['pt-pt'] = "Anunciar"; +$text['label-announce_recording']['ro-ro'] = ""; +$text['label-announce_recording']['ru-ru'] = "Анонс"; +$text['label-announce_recording']['sv-se'] = "Meddela"; +$text['label-announce_recording']['uk-ua'] = "Анонс"; $text['description-users']['en-us'] = "Assign additional users as administrators of this conference room."; $text['description-users']['en-gb'] = "Assign additional users as administrators of this conference room."; @@ -1598,4 +1640,4 @@ $text['button-view_active']['ru-ru'] = "Просмотр Активных"; $text['button-view_active']['sv-se'] = "Visa Aktiva"; $text['button-view_active']['uk-ua'] = ""; -?> \ No newline at end of file +?> diff --git a/app/conference_centers/conference_room_edit.php b/app/conference_centers/conference_room_edit.php index 4a79e270d6..13fadb50ff 100644 --- a/app/conference_centers/conference_room_edit.php +++ b/app/conference_centers/conference_room_edit.php @@ -66,7 +66,9 @@ $start_datetime = $_POST["start_datetime"]; $stop_datetime = $_POST["stop_datetime"]; $wait_mod = $_POST["wait_mod"]; - $announce = $_POST["announce"]; + $announce_name = $_POST["announce_name"]; + $announce_recording = $_POST["announce_recording"]; + $announce_count = $_POST["announce_count"]; $sounds = $_POST["sounds"]; $mute = $_POST["mute"]; $created = $_POST["created"]; @@ -285,7 +287,9 @@ if (count($_POST) > 0 && strlen($_POST["persistformvar"]) == 0) { if (strlen($record) == 0) { $record = 'false'; } if (strlen($max_members) == 0) { $max_members = 0; } if (strlen($wait_mod) == 0) { $wait_mod = 'true'; } - if (strlen($announce) == 0) { $announce = 'true'; } + if (strlen($announce_name) == 0) { $announce_name = 'true'; } + if (strlen($announce_recording) == 0) { $announce_recording = 'true'; } + if (strlen($announce_count) == 0) { $announce_count = 'true'; } if (strlen($mute) == 0) { $mute = 'false'; } if (strlen($enabled) == 0) { $enabled = 'true'; } if (strlen($sounds) == 0) { $sounds = 'false'; } @@ -323,7 +327,9 @@ if (count($_POST) > 0 && strlen($_POST["persistformvar"]) == 0) { $array['conference_rooms'][0]['start_datetime'] = $start_datetime; $array['conference_rooms'][0]['stop_datetime'] = $stop_datetime; $array['conference_rooms'][0]['wait_mod'] = $wait_mod; - $array['conference_rooms'][0]['announce'] = $announce; + $array['conference_rooms'][0]['announce_name'] = $announce_name; + $array['conference_rooms'][0]['announce_recording'] = $announce_recording; + $array['conference_rooms'][0]['announce_count'] = $announce_count; $array['conference_rooms'][0]['sounds'] = $sounds; $array['conference_rooms'][0]['mute'] = $mute; $array['conference_rooms'][0]['created'] = 'now()'; @@ -415,8 +421,14 @@ if (count($_POST) > 0 && strlen($_POST["persistformvar"]) == 0) { if (strlen($wait_mod) > 0) { $array['conference_rooms'][0]['wait_mod'] = $wait_mod; } - if (strlen($announce) > 0) { - $array['conference_rooms'][0]['announce'] = $announce; + if (strlen($announce_name) > 0) { + $array['conference_rooms'][0]['announce_name'] = $announce_name; + } + if (strlen($announce_name) > 0) { + $array['conference_rooms'][0]['announce_recording'] = $announce_recording; + } + if (strlen($announce_name) > 0) { + $array['conference_rooms'][0]['announce_count'] = $announce_count; } if (strlen($mute) > 0) { $array['conference_rooms'][0]['mute'] = $mute; @@ -490,7 +502,9 @@ if (count($_POST) > 0 && strlen($_POST["persistformvar"]) == 0) { $start_datetime = $row["start_datetime"]; $stop_datetime = $row["stop_datetime"]; $wait_mod = $row["wait_mod"]; - $announce = $row["announce"]; + $announce_name = $row["announce_name"]; + $announce_recording = $row["announce_recording"]; + $announce_count = $row["announce_count"]; $sounds = $row["sounds"]; $mute = $row["mute"]; $created = $row["created"]; @@ -555,7 +569,9 @@ if (count($_POST) > 0 && strlen($_POST["persistformvar"]) == 0) { if (strlen($record) == 0) { $record = 'false'; } if (strlen($max_members) == 0) { $max_members = 0; } if (strlen($wait_mod) == 0) { $wait_mod = 'true'; } - if (strlen($announce) == 0) { $announce = 'true'; } + if (strlen($announce_name) == 0) { $announce_name = 'true'; } + if (strlen($announce_recording) == 0) { $announce_recording = 'true'; } + if (strlen($announce_count) == 0) { $announce_count = 'true'; } if (strlen($mute) == 0) { $mute = 'false'; } if (strlen($sounds) == 0) { $sounds = 'false'; } if (strlen($enabled) == 0) { $enabled = 'true'; } @@ -756,19 +772,67 @@ if (count($_POST) > 0 && strlen($_POST["persistformvar"]) == 0) { echo "\n"; } - if (permission_exists('conference_room_announce')) { + if (permission_exists('conference_room_announce_name')) { echo "