From d2147cb133bd08954cd66d1e15c0c2cf44c558cf Mon Sep 17 00:00:00 2001 From: markjcrane Date: Fri, 7 Aug 2015 15:06:07 -0500 Subject: [PATCH] Remove switch_select_destination function from the remaining features that used it and replace with the destination php class. --- app/call_centers/call_center_agent_edit.php | 8 +- app/call_centers/call_center_queue_edit.php | 6 +- app/call_flows/call_flow_edit.php | 2 - app/dialplan/dialplan_add.php | 13 +- app/dialplan_inbound/dialplan_inbound_add.php | 13 +- app/ring_groups/ring_group_edit.php | 1 - app/voicemails/voicemail_edit.php | 1 - app/voicemails/voicemail_option_edit.php | 1 - resources/switch.php | 959 ------------------ 9 files changed, 18 insertions(+), 986 deletions(-) diff --git a/app/call_centers/call_center_agent_edit.php b/app/call_centers/call_center_agent_edit.php index 71bda8a5b4..d36c3807ba 100644 --- a/app/call_centers/call_center_agent_edit.php +++ b/app/call_centers/call_center_agent_edit.php @@ -300,6 +300,9 @@ 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") { $call_center_agent_uuid = $_GET["id"]; @@ -475,10 +478,7 @@ if (count($_POST)>0 && strlen($_POST["persistformvar"]) == 0) { echo " ".$text['label-contact']."\n"; echo "\n"; echo "\n"; - - //switch_select_destination(select_type, select_label, select_name, select_value, select_style, action); - switch_select_destination("call_center_contact", "", "agent_contact", $agent_contact, "width: 350px;", ""); - + echo $destination->select('call_center_contact', 'agent_contact', $agent_contact); echo "
\n"; echo $text['description-contact']."\n"; echo "\n"; diff --git a/app/call_centers/call_center_queue_edit.php b/app/call_centers/call_center_queue_edit.php index f183a65fef..77ab53a661 100644 --- a/app/call_centers/call_center_queue_edit.php +++ b/app/call_centers/call_center_queue_edit.php @@ -402,6 +402,9 @@ 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") { $call_center_queue_uuid = $_GET["id"]; @@ -815,8 +818,7 @@ if (count($_POST)>0 && strlen($_POST["persistformvar"]) == 0) { echo " ".$text['label-timeout_action']."\n"; echo "\n"; echo "\n"; - //switch_select_destination(select_type, select_label, select_name, select_value, select_style, action); - switch_select_destination("dialplan", "", "queue_timeout_action", $queue_timeout_action, "", ""); + echo $destination->select('dialplan', 'queue_timeout_action', $queue_timeout_action); echo "
\n"; echo $text['description-timeout_action']."\n"; echo "\n"; diff --git a/app/call_flows/call_flow_edit.php b/app/call_flows/call_flow_edit.php index ef46bc865b..254601b5d8 100644 --- a/app/call_flows/call_flow_edit.php +++ b/app/call_flows/call_flow_edit.php @@ -556,8 +556,6 @@ if (count($_POST) > 0 && strlen($_POST["persistformvar"]) == 0) { $select_value = $call_flow_app.':'.$call_flow_data; } //show the destination list - //switch_select_destination($select_type, $select_label, $select_name, $select_value, $select_style, $action='') - //switch_select_destination("dialplan", $destination_label, "call_flow_destination", $select_value, "", $call_flow_data); echo $destination->select('dialplan', 'call_flow_destination', $select_value); unset($select_value); echo "
\n"; diff --git a/app/dialplan/dialplan_add.php b/app/dialplan/dialplan_add.php index 81fd689d44..41d3f3bcbd 100644 --- a/app/dialplan/dialplan_add.php +++ b/app/dialplan/dialplan_add.php @@ -259,6 +259,9 @@ if (count($_POST)>0 && strlen($_POST["persistformvar"]) == 0) { return; } //end if (count($_POST)>0 && strlen($_POST["persistformvar"]) == 0) +//initialize the destinations object +$destination = new destinations; + ?>