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 " | ";
-
+ echo " \n";
+ // switch
+ if (substr($_SESSION['theme']['input_toggle_style']['text'], 0, 6) == 'switch') {
+ echo " \n";
+ }
+ // select
+ else {
+ echo " \n";
+ }
+ echo " | \n";
if ($show_destination_delete && permission_exists('ring_group_destination_delete')) {
if (is_uuid($row['ring_group_destination_uuid'])) {
echo " ";
diff --git a/themes/default/app_config.php b/themes/default/app_config.php
index 09e8652d93..6e8f47e84a 100644
--- a/themes/default/app_config.php
+++ b/themes/default/app_config.php
@@ -1655,6 +1655,46 @@
$apps[$x]['default_settings'][$y]['default_setting_enabled'] = "false";
$apps[$x]['default_settings'][$y]['default_setting_description'] = "Set the color (and opacity) of input placeholder text.";
$y++;
+ $apps[$x]['default_settings'][$y]['default_setting_uuid'] = "f409564a-5f06-4d93-b8ae-7fa38838252a";
+ $apps[$x]['default_settings'][$y]['default_setting_category'] = "theme";
+ $apps[$x]['default_settings'][$y]['default_setting_subcategory'] = "input_toggle_switch_background_color_false";
+ $apps[$x]['default_settings'][$y]['default_setting_name'] = "text";
+ $apps[$x]['default_settings'][$y]['default_setting_value'] = "#c0c0c0";
+ $apps[$x]['default_settings'][$y]['default_setting_enabled'] = "false";
+ $apps[$x]['default_settings'][$y]['default_setting_description'] = "Set the color of the toggle switch container when it is in the off/false position.";
+ $y++;
+ $apps[$x]['default_settings'][$y]['default_setting_uuid'] = "7d922f86-a085-4a9a-9656-677c596101c6";
+ $apps[$x]['default_settings'][$y]['default_setting_category'] = "theme";
+ $apps[$x]['default_settings'][$y]['default_setting_subcategory'] = "input_toggle_switch_background_color_true";
+ $apps[$x]['default_settings'][$y]['default_setting_name'] = "text";
+ $apps[$x]['default_settings'][$y]['default_setting_value'] = "#2e82d0";
+ $apps[$x]['default_settings'][$y]['default_setting_enabled'] = "false";
+ $apps[$x]['default_settings'][$y]['default_setting_description'] = "Set the color of the toggle switch container when it is in the on/true position.";
+ $y++;
+ $apps[$x]['default_settings'][$y]['default_setting_uuid'] = "26ba3dec-55c2-4884-8d6e-3b05022865a7";
+ $apps[$x]['default_settings'][$y]['default_setting_category'] = "theme";
+ $apps[$x]['default_settings'][$y]['default_setting_subcategory'] = "input_toggle_switch_handle_color";
+ $apps[$x]['default_settings'][$y]['default_setting_name'] = "text";
+ $apps[$x]['default_settings'][$y]['default_setting_value'] = "#ffffff";
+ $apps[$x]['default_settings'][$y]['default_setting_enabled'] = "false";
+ $apps[$x]['default_settings'][$y]['default_setting_description'] = "Set the color of the toggle switch handle.";
+ $y++;
+ $apps[$x]['default_settings'][$y]['default_setting_uuid'] = "e375d855-fc96-46ff-abd0-199c812bdb25";
+ $apps[$x]['default_settings'][$y]['default_setting_category'] = "theme";
+ $apps[$x]['default_settings'][$y]['default_setting_subcategory'] = "input_toggle_switch_handle_symbol";
+ $apps[$x]['default_settings'][$y]['default_setting_name'] = "boolean";
+ $apps[$x]['default_settings'][$y]['default_setting_value'] = "true";
+ $apps[$x]['default_settings'][$y]['default_setting_enabled'] = "false";
+ $apps[$x]['default_settings'][$y]['default_setting_description'] = "Set whether the off/false 'O' and on/true '|' symbol appears on the toggle switch handle.";
+ $y++;
+ $apps[$x]['default_settings'][$y]['default_setting_uuid'] = "e3fc36f3-c11e-4030-8338-1bff25e55748";
+ $apps[$x]['default_settings'][$y]['default_setting_category'] = "theme";
+ $apps[$x]['default_settings'][$y]['default_setting_subcategory'] = "input_toggle_style";
+ $apps[$x]['default_settings'][$y]['default_setting_name'] = "text";
+ $apps[$x]['default_settings'][$y]['default_setting_value'] = "switch_round";
+ $apps[$x]['default_settings'][$y]['default_setting_enabled'] = "false";
+ $apps[$x]['default_settings'][$y]['default_setting_description'] = "Set the toggle control style. Options: 'select' (default), 'switch_square', 'switch_round'";
+ $y++;
$apps[$x]['default_settings'][$y]['default_setting_uuid'] = "c2630eb3-a04e-4a32-9990-45f37af70005";
$apps[$x]['default_settings'][$y]['default_setting_category'] = "theme";
$apps[$x]['default_settings'][$y]['default_setting_subcategory'] = "login_input_background_color";
diff --git a/themes/default/css.php b/themes/default/css.php
index 324392234b..5f9ed03185 100644
--- a/themes/default/css.php
+++ b/themes/default/css.php
@@ -1672,6 +1672,125 @@ header('Expires: '.gmdate('D, d M Y H:i:s',time()+3600).' GMT');
border-color: ;
}
+/* TOGGLE SWITCH *******************************************************/
+
+ .switch { /* container */
+ position: relative;
+ display: inline-block;
+ width: 50px;
+
+ height: 28px;
+
+
+ height: 26px;
+
+ margin: 1px;
+
+ -moz-border-radius: ;
+ -webkit-border-radius: ;
+ -khtml-border-radius: ;
+ border-radius: ;
+
+ }
+
+ .switch > input {
+ display: none;
+ }
+
+ .slider {
+ position: absolute;
+ cursor: pointer;
+ top: 0;
+ left: 0;
+ right: 0;
+ bottom: 0;
+ background: ;
+
+
+ -moz-border-radius: ;
+ -webkit-border-radius: ;
+ -khtml-border-radius: ;
+ border-radius: ;
+
+
+
+ border-radius: 22px;
+
+ -webkit-transition: .2s;
+ transition: .2s;
+ }
+
+ .slider:before { /* when disabled */
+ position: absolute;
+
+ text-align: center;
+
+ padding-top: 3px;
+
+ padding-top: 2px;
+
+ content: 'O';
+ color: ;
+
+ content: '';
+
+
+ height: 24px;
+ width: 24px;
+
+
+ height: 22px;
+ width: 22px;
+
+ top: 2px;
+ left: 2px;
+ bottom: 2px;
+ background: ;
+
+
+ -moz-border-radius: ;
+ -webkit-border-radius: ;
+ -khtml-border-radius: ;
+ border-radius: ;
+
+
+
+ border-radius: 50%;
+
+ -webkit-transition: .2s;
+ transition: .2s;
+ }
+
+ input:checked + .slider { /* when enabled */
+ background: ;
+ }
+
+ input:focus + .slider { /* when focused, required for switch movement */
+ }
+
+ input:checked + .slider:before { /* distance switch moves horizontally */
+
+ text-align: center;
+
+ padding-top: 2px;
+
+ padding-top: 1px;
+
+ content: '|';
+ color: ;
+
+
+ -webkit-transform: translateX(22px);
+ -ms-transform: translateX(22px);
+ transform: translateX(22px);
+
+
+ -webkit-transform: translateX(24px);
+ -ms-transform: translateX(24px);
+ transform: translateX(24px);
+
+ }
+
/* TABLES *****************************************************************/
table {
|