From b61d13fcf5dfda0700da8422b5e0d6629cd4e637 Mon Sep 17 00:00:00 2001 From: FusionPBX Date: Mon, 13 Jul 2020 11:22:52 -0600 Subject: [PATCH] Re-enable local destination on destination_edit.php --- app/destinations/destination_edit.php | 32 +++++++++++++-------------- 1 file changed, 16 insertions(+), 16 deletions(-) diff --git a/app/destinations/destination_edit.php b/app/destinations/destination_edit.php index b07b6efa53..d0a2947f1d 100644 --- a/app/destinations/destination_edit.php +++ b/app/destinations/destination_edit.php @@ -55,7 +55,7 @@ switch ($_GET['type']) { case 'inbound': $destination_type = 'inbound'; break; case 'outbound': $destination_type = 'outbound'; break; - //case 'local': $destination_type = 'local'; break; + case 'local': $destination_type = 'local'; break; default: $destination_type = 'inbound'; } @@ -830,7 +830,7 @@ if (strlen($destination_type) == 0) { $destination_type = 'inbound'; } if (strlen($destination_context) == 0) { $destination_context = 'public'; } if ($destination_type =="outbound") { $destination_context = $_SESSION['domain_name']; } - //if ($destination_type =="local") { $destination_context = $_SESSION['domain_name']; } + if ($destination_type =="local") { $destination_context = $_SESSION['domain_name']; } //initialize the destinations object $destination = new destinations; @@ -864,7 +864,7 @@ echo " if (document.getElementById('tr_buy')) { document.getElementById('tr_buy').style.display = 'none'; }\n"; echo " if (document.getElementById('tr_carrier')) { document.getElementById('tr_carrier').style.display = 'none'; }\n"; echo " document.getElementById('tr_account_code').style.display = 'none';\n"; -// echo " document.getElementById('destination_context').value = '".$destination_context."'"; + //echo " document.getElementById('destination_context').value = '".$destination_context."'"; echo " }\n"; echo " else if (dir == 'inbound') {\n"; echo " if (document.getElementById('tr_caller_id_name')) { document.getElementById('tr_caller_id_name').style.display = ''; }\n"; @@ -878,18 +878,18 @@ echo " document.getElementById('tr_account_code').style.display = '';\n"; echo " document.getElementById('destination_context').value = 'public'"; echo " }\n"; - //echo " else if (dir == 'local') {\n"; - //echo " if (document.getElementById('tr_caller_id_name')) { document.getElementById('tr_caller_id_name').style.display = 'none'; }\n"; - //echo " if (document.getElementById('tr_caller_id_number')) { document.getElementById('tr_caller_id_number').style.display = 'none'; }\n"; - //echo " document.getElementById('tr_actions').style.display = '';\n"; - //echo " if (document.getElementById('tr_fax_detection')) { document.getElementById('tr_fax_detection').style.display = 'none'; }\n"; - //echo " document.getElementById('tr_cid_name_prefix').style.display = 'none';\n"; - //echo " if (document.getElementById('tr_sell')) { document.getElementById('tr_sell').style.display = 'none'; }\n"; - //echo " if (document.getElementById('tr_buy')) { document.getElementById('tr_buy').style.display = 'none'; }\n"; - //echo " if (document.getElementById('tr_carrier')) { document.getElementById('tr_carrier').style.display = 'none'; }\n"; - //echo " document.getElementById('tr_account_code').style.display = '';\n"; + echo " else if (dir == 'local') {\n"; + echo " if (document.getElementById('tr_caller_id_name')) { document.getElementById('tr_caller_id_name').style.display = 'none'; }\n"; + echo " if (document.getElementById('tr_caller_id_number')) { document.getElementById('tr_caller_id_number').style.display = 'none'; }\n"; + echo " document.getElementById('tr_actions').style.display = '';\n"; + echo " if (document.getElementById('tr_fax_detection')) { document.getElementById('tr_fax_detection').style.display = 'none'; }\n"; + echo " document.getElementById('tr_cid_name_prefix').style.display = 'none';\n"; + echo " if (document.getElementById('tr_sell')) { document.getElementById('tr_sell').style.display = 'none'; }\n"; + echo " if (document.getElementById('tr_buy')) { document.getElementById('tr_buy').style.display = 'none'; }\n"; + echo " if (document.getElementById('tr_carrier')) { document.getElementById('tr_carrier').style.display = 'none'; }\n"; + echo " document.getElementById('tr_account_code').style.display = '';\n"; //echo " document.getElementById('destination_context').value = '".$destination_context."'"; - //echo " }\n"; + echo " }\n"; echo " "; echo " }\n"; echo " \n"; @@ -940,11 +940,11 @@ switch ($destination_type) { case "inbound" : $selected[0] = "selected='selected'"; break; case "outbound" : $selected[1] = "selected='selected'"; break; - //case "local" : $selected[2] = "selected='selected'"; break; + case "local" : $selected[2] = "selected='selected'"; break; } echo " \n"; echo " \n"; - //echo " \n"; + echo " \n"; unset($selected); echo " \n"; echo "
\n";