diff --git a/app/ring_groups/app_config.php b/app/ring_groups/app_config.php index 13711f40e5..dce411f3ec 100644 --- a/app/ring_groups/app_config.php +++ b/app/ring_groups/app_config.php @@ -368,14 +368,16 @@ $apps[$x]['db'][$y]['fields'][$z]['type'] = "numeric"; $apps[$x]['db'][$y]['fields'][$z]['description']['en-us'] = ""; $z++; - $apps[$x]['db'][$y]['fields'][$z]['name'] = "destination_prompt"; - $apps[$x]['db'][$y]['fields'][$z]['type'] = "numeric"; //confirm,announce - $apps[$x]['db'][$y]['fields'][$z]['description']['en-us'] = ""; - $z++; $apps[$x]['db'][$y]['fields'][$z]['name'] = "destination_enabled"; $apps[$x]['db'][$y]['fields'][$z]['type']['pgsql'] = "boolean"; $apps[$x]['db'][$y]['fields'][$z]['type']['sqlite'] = "text"; $apps[$x]['db'][$y]['fields'][$z]['type']['mysql'] = "text"; + $apps[$x]['db'][$y]['fields'][$z]['toggle'] = ['true','false']; + $apps[$x]['db'][$y]['fields'][$z]['description']['en-us'] = ""; + $z++; + $apps[$x]['db'][$y]['fields'][$z]['name'] = "destination_prompt"; + $apps[$x]['db'][$y]['fields'][$z]['type'] = "numeric"; + $apps[$x]['db'][$y]['fields'][$z]['description']['en-us'] = ""; $z++; $apps[$x]['db'][$y]['fields'][$z]['name'] = "insert_date"; $apps[$x]['db'][$y]['fields'][$z]['type']['pgsql'] = 'timestamptz'; diff --git a/app/ring_groups/app_languages.php b/app/ring_groups/app_languages.php index 218ab2a9d4..cf45aacf96 100644 --- a/app/ring_groups/app_languages.php +++ b/app/ring_groups/app_languages.php @@ -883,6 +883,27 @@ $text['label-destination_timeout']['ru-ru'] = "Тайм-аут"; $text['label-destination_timeout']['sv-se'] = "Tidsgräns"; $text['label-destination_timeout']['uk-ua'] = "Таймаут"; +$text['label-destination_enabled']['en-us'] = "Enabled"; +$text['label-destination_enabled']['en-gb'] = "Enabled"; +$text['label-destination_enabled']['ar-eg'] = ""; +$text['label-destination_enabled']['de-at'] = "Aktiviert"; //copied from de-de +$text['label-destination_enabled']['de-ch'] = "Aktiviert"; //copied from de-de +$text['label-destination_enabled']['de-de'] = "Aktiviert"; +$text['label-destination_enabled']['es-cl'] = "Activado"; +$text['label-destination_enabled']['es-mx'] = "Activado"; //copied from es-cl +$text['label-destination_enabled']['fr-ca'] = "Activé"; //copied from fr-fr +$text['label-destination_enabled']['fr-fr'] = "Activé"; +$text['label-destination_enabled']['he-il'] = "מופעל"; +$text['label-destination_enabled']['it-it'] = "Abilitato"; +$text['label-destination_enabled']['nl-nl'] = "Aan"; +$text['label-destination_enabled']['pl-pl'] = "Włączony"; +$text['label-destination_enabled']['pt-br'] = "Ativado"; +$text['label-destination_enabled']['pt-pt'] = "Habilitado"; +$text['label-destination_enabled']['ro-ro'] = ""; +$text['label-destination_enabled']['ru-ru'] = "Включено"; +$text['label-destination_enabled']['sv-se'] = "Aktiverad"; +$text['label-destination_enabled']['uk-ua'] = "Включено"; + $text['label-destination_prompt_confirm']['en-us'] = "Confirm"; $text['label-destination_prompt_confirm']['en-gb'] = "Confirm"; $text['label-destination_prompt_confirm']['ar-eg'] = ""; diff --git a/app/ring_groups/ring_group_edit.php b/app/ring_groups/ring_group_edit.php index 44913131e6..817d28448a 100644 --- a/app/ring_groups/ring_group_edit.php +++ b/app/ring_groups/ring_group_edit.php @@ -377,8 +377,8 @@ $array['ring_groups'][0]["ring_group_destinations"][$y]["destination_number"] = $row['destination_number']; $array['ring_groups'][0]["ring_group_destinations"][$y]["destination_delay"] = $row['destination_delay']; $array['ring_groups'][0]["ring_group_destinations"][$y]["destination_timeout"] = $row['destination_timeout']; - $array['ring_groups'][0]["ring_group_destinations"][$y]["destination_prompt"] = $row['destination_prompt']; $array['ring_groups'][0]["ring_group_destinations"][$y]["destination_enabled"] = $row['destination_enabled']; + $array['ring_groups'][0]["ring_group_destinations"][$y]["destination_prompt"] = $row['destination_prompt']; $array['ring_groups'][0]["ring_group_destinations"][$y]["domain_uuid"] = $domain_uuid; } $y++; @@ -755,7 +755,7 @@ if (permission_exists('ring_group_prompt')) { echo " ".$text['label-destination_prompt']."\n"; } - echo " "."Enable"."\n"; + echo " ".$text['label-destination_enabled']."\n"; if ($show_destination_delete && permission_exists('ring_group_destination_delete')) { echo " \n"; echo " ".$text['label-delete']."\n"; @@ -770,13 +770,19 @@ if (strlen($row['ring_group_destination_uuid']) > 0) { echo " \n"; - } else { - $row['destination_enabled'] = 'true'; - } + } echo " \n"; echo " \n"; - echo " \n"; + if (!is_uuid($row['ring_group_destination_uuid'])) { // new record + if (substr($_SESSION['theme']['input_toggle_style']['text'], 0, 6) == 'switch') { + $onkeyup = "onkeyup=\"document.getElementById('ring_group_destinations_".$x."_destination_enabled').checked = (this.value != '' ? true : false);\""; // switch + } + else { + $onkeyup = "onkeyup=\"document.getElementById('ring_group_destinations_".$x."_destination_enabled').value = (this.value != '' ? true : false);\""; // select + } + } + echo " \n"; echo " \n"; echo " \n"; echo " \n"; echo " \n"; - if (permission_exists('ring_group_prompt')) { echo " \n"; echo " \n"; echo " \n"; } - echo " \n"; - ###iphone - - echo "