diff --git a/app/destinations/destination_edit.php b/app/destinations/destination_edit.php
index 9fcf6629cc..c1eb925e54 100644
--- a/app/destinations/destination_edit.php
+++ b/app/destinations/destination_edit.php
@@ -476,6 +476,10 @@ if (count($_POST) > 0 && strlen($_POST["persistformvar"]) == 0) {
} //if ($_POST["persistformvar"] != "true")
} //(count($_POST) > 0 && strlen($_POST["persistformvar"]) == 0)
+
+//initialize the destinations object
+ $destination = new destinations;
+
//pre-populate the form
if (count($_GET) > 0 && $_POST["persistformvar"] != "true") {
$destination_uuid = $_GET["id"];
@@ -651,8 +655,7 @@ if (count($_POST) > 0 && strlen($_POST["persistformvar"]) == 0) {
$label = explode("XML", $data);
$divider = ($row['dialplan_detail_type'] != '') ? ":" : null;
$detail_action = $row['dialplan_detail_type'].$divider.$row['dialplan_detail_data'];
- switch_select_destination("dialplan", $label[0], "dialplan_details[".$x."][dialplan_detail_data]", $detail_action, "width: 60%;", $row['dialplan_detail_type']);
-
+ $destination->select('dialplan', 'dialplan_details['.$x.'][dialplan_detail_data]', $detail_action);
echo " \n";
echo "
";
if (strlen($row['destination_uuid']) > 0) {
diff --git a/app/gateways/app_config.php b/app/gateways/app_config.php
index 26fa5a8560..f193de9caa 100644
--- a/app/gateways/app_config.php
+++ b/app/gateways/app_config.php
@@ -21,6 +21,7 @@
$apps[$x]['description']['pt-br'] = "";
//destination details
+ /*
$y = 0;
$apps[$x]['destinations'][$y]['type'] = "sql";
$apps[$x]['destinations'][$y]['label'] = "gateways";
@@ -38,6 +39,7 @@
$apps[$x]['destinations'][$y]['select_value']['dialplan'] = "bridge:sofia/gateway/\${destination}/";
$apps[$x]['destinations'][$y]['select_value']['ivr'] = "menu-exec-app:bridge sofia/gateway/\${destination}/";
$apps[$x]['destinations'][$y]['select_label'] = "\${name}@\${domain_name} \${description}";
+ */
//permission details
$y = 0;
diff --git a/app/ivr_menus/ivr_menu_edit.php b/app/ivr_menus/ivr_menu_edit.php
index 8ae74dcdf3..8693b78845 100644
--- a/app/ivr_menus/ivr_menu_edit.php
+++ b/app/ivr_menus/ivr_menu_edit.php
@@ -259,6 +259,10 @@ if (count($_POST) > 0 && strlen($_POST["persistformvar"]) == 0) {
} //if ($_POST["persistformvar"] != "true")
} //(count($_POST)>0 && strlen($_POST["persistformvar"]) == 0)
+
+//initialize the destinations object
+ $destination = new destinations;
+
//pre-populate the form
if (strlen($ivr_menu_uuid) == 0) { $ivr_menu_uuid = check_str($_REQUEST["id"]); }
if (strlen($ivr_menu_uuid) > 0 && $_POST["persistformvar"] != "true") {
@@ -674,9 +678,7 @@ if (count($_POST) > 0 && strlen($_POST["persistformvar"]) == 0) {
echo " \n";
echo " | \n";
echo "\n";
- $tmp_select_value = '';
- switch_select_destination("ivr", $ivr_menu_options_label, 'ivr_menu_options['.$c.'][ivr_menu_option_param]', $tmp_select_value, "width:175px", $ivr_menu_option_action);
- unset($tmp_select_value);
+ $destination->select('ivr', 'ivr_menu_options['.$c.'][ivr_menu_option_param]', $destination_action);
echo " | \n";
echo "\n";
echo " | \n";
echo "\n";
- //switch_select_destination(select_type, select_label, select_name, select_value, select_style, action);
- switch_select_destination("dialplan", "", "ivr_menu_exit_action", $ivr_menu_exit_action, "", "");
+ $destination->select('dialplan', 'ivr_menu_exit_action', $ivr_menu_exit_action);
echo " \n";
echo " ".$text['description-exit_action']."\n";
echo " | \n";
diff --git a/app/ivr_menus/ivr_menu_option_edit.php b/app/ivr_menus/ivr_menu_option_edit.php
index 2731baf6be..982081a1ed 100644
--- a/app/ivr_menus/ivr_menu_option_edit.php
+++ b/app/ivr_menus/ivr_menu_option_edit.php
@@ -278,13 +278,12 @@ if (count($_POST)>0 && strlen($_POST["persistformvar"]) == 0) {
echo "\n";
echo "\n";
- //switch_select_destination($select_type, $select_label, $select_name, $select_value, $select_style, $action='')
- $tmp_select_value = '';
+ $destination_action = '';
if (strlen($ivr_menu_option_action.$ivr_menu_option_param) > 0) {
- $tmp_select_value = $ivr_menu_option_action.':'.$ivr_menu_option_param;
+ $destination_action = $ivr_menu_option_action.':'.$ivr_menu_option_param;
}
- switch_select_destination("ivr", $ivr_menu_options_label, "ivr_menu_option_param", $tmp_select_value, "width: 350px;", $ivr_menu_option_action);
- unset($tmp_select_value);
+ $destination->select('ivr', 'ivr_menu_option_param', $destination_action);
+ unset($destination_action);
echo " \n";
echo $text['description-destination']."\n";
|