From dd1a2351951bded91de477a10f77759f0e511c6f Mon Sep 17 00:00:00 2001 From: Mark Crane Date: Wed, 13 Aug 2014 08:41:44 +0000 Subject: [PATCH] Add ring group skip active --- app/ring_groups/app_config.php | 4 ++++ app/ring_groups/app_languages.php | 10 ++++++++++ app/ring_groups/ring_group_edit.php | 27 +++++++++++++++++++++++++++ 3 files changed, 41 insertions(+) diff --git a/app/ring_groups/app_config.php b/app/ring_groups/app_config.php index a5750097b8..bdc70bfa58 100644 --- a/app/ring_groups/app_config.php +++ b/app/ring_groups/app_config.php @@ -158,6 +158,10 @@ $apps[$x]['db'][$y]['fields'][$z]['type'] = "text"; $apps[$x]['db'][$y]['fields'][$z]['description']['en-us'] = "Select the ringback."; $z++; + $apps[$x]['db'][$y]['fields'][$z]['name'] = "ring_group_skip_active"; + $apps[$x]['db'][$y]['fields'][$z]['type'] = "text"; + $apps[$x]['db'][$y]['fields'][$z]['description']['en-us'] = "Skip destinations with active calls."; + $z++; $apps[$x]['db'][$y]['fields'][$z]['name'] = "ring_group_enabled"; $apps[$x]['db'][$y]['fields'][$z]['type'] = "text"; $apps[$x]['db'][$y]['fields'][$z]['description']['en-us'] = "Select enable or disable the ring group."; diff --git a/app/ring_groups/app_languages.php b/app/ring_groups/app_languages.php index 057afd2c64..d0c865485a 100644 --- a/app/ring_groups/app_languages.php +++ b/app/ring_groups/app_languages.php @@ -71,6 +71,11 @@ $text['description-destinations']['fr-fr'] = "Ajouter des destinations et des paramètres au groupe de sonnerie."; $text['description-destinations']['pt-pt'] = "Adicionar destinos e parâmetros ao grupo."; + $text['description-skip_active']['en-us'] = "Skip destinations with active calls."; + $text['description-skip_active']['es-cl'] = "Saltar destinos con llamadas activas."; + $text['description-skip_active']['fr-fr'] = "Passer destinations avec des appels actifs."; + $text['description-skip_active']['pt-pt'] = "Ir destinos com ligações ativas."; + $text['description-enabled']['en-us'] ='Set the status of this ring group.'; $text['description-enabled']['es-cl'] = "Define el estado de este grupo de llamado."; $text['description-enabled']['fr-fr'] = "Choisir l'état de ce groupe de sonnerie"; @@ -196,6 +201,11 @@ $text['label-duration']['fr-fr'] = "Durée"; $text['label-duration']['pt-pt'] = "Duração"; + $text['label-skip_active']['en-us'] = "Skip Active"; + $text['label-skip_active']['es-cl'] = "Saltar activo"; + $text['label-skip_active']['fr-fr'] = "Passer active"; + $text['label-skip_active']['pt-pt'] = "Ir ativa"; + $text['label-enabled']['en-us'] = "Enabled"; $text['label-enabled']['es-cl'] = "Activado"; $text['label-enabled']['fr-fr'] = "Actif"; diff --git a/app/ring_groups/ring_group_edit.php b/app/ring_groups/ring_group_edit.php index 1168673224..7d855f6be0 100644 --- a/app/ring_groups/ring_group_edit.php +++ b/app/ring_groups/ring_group_edit.php @@ -78,6 +78,7 @@ else { $ring_group_timeout_action = check_str($_POST["ring_group_timeout_action"]); $ring_group_cid_name_prefix = check_str($_POST["ring_group_cid_name_prefix"]); $ring_group_ringback = check_str($_POST["ring_group_ringback"]); + $ring_group_skip_active = check_str($_POST["ring_group_skip_active"]); $ring_group_enabled = check_str($_POST["ring_group_enabled"]); $ring_group_description = check_str($_POST["ring_group_description"]); $dialplan_uuid = check_str($_POST["dialplan_uuid"]); @@ -326,6 +327,7 @@ else { $ring_group_timeout_data = $row["ring_group_timeout_data"]; $ring_group_cid_name_prefix = $row["ring_group_cid_name_prefix"]; $ring_group_ringback = $row["ring_group_ringback"]; + $ring_group_skip_active = $row["ring_group_skip_active"]; $ring_group_enabled = $row["ring_group_enabled"]; $ring_group_description = $row["ring_group_description"]; $dialplan_uuid = $row["dialplan_uuid"]; @@ -374,6 +376,7 @@ else { } //set defaults + if (strlen($ring_group_skip_active) == 0) { $ring_group_skip_active = 'false'; } if (strlen($ring_group_enabled) == 0) { $ring_group_enabled = 'true'; } //set the context for users that are not in the superadmin group @@ -679,6 +682,30 @@ else { echo " "; echo " "; + echo "\n"; + echo "\n"; + echo " ".$text['label-skip_active'].":\n"; + echo "\n"; + echo "\n"; + echo " \n"; + echo "
\n"; + echo $text['description-skip_active']."\n"; + echo "\n"; + echo "\n"; + echo "\n"; echo "\n"; echo " ".$text['label-enabled'].":\n";