From 1f2695c38ae89e5b8643a59945a0c5e25e22dc91 Mon Sep 17 00:00:00 2001 From: reliberate Date: Fri, 14 Aug 2015 17:08:21 -0600 Subject: [PATCH 1/5] Minimized Theme: Adjust domain selector icon padding when logout button hidden. --- themes/minimized/template.php | 13 +++++++++---- 1 file changed, 9 insertions(+), 4 deletions(-) diff --git a/themes/minimized/template.php b/themes/minimized/template.php index 1fa791cb71..6cbc4f4c66 100644 --- a/themes/minimized/template.php +++ b/themes/minimized/template.php @@ -886,12 +886,14 @@ legend { } #logout_icon { + width: 28px; + height: 23px; + border: none; filter: alpha(opacity=80); opacity: 0.85; -moz-opacity: 0.85; -khtml-opacity: 0.85; margin-left: 8px; - margin-right: 18px; } #logout_icon:hover { @@ -903,6 +905,9 @@ legend { } #domain_selector_icon { + width: 28px; + height: 23px; + border: none; filter: alpha(opacity=80); opacity: 0.85; -moz-opacity: 0.85; @@ -1403,17 +1408,17 @@ SPAN.playback_progress_bar { - + 1) { - echo "".$_SESSION['domain_name'].""; + echo "".$_SESSION['domain_name'].""; } //logout icon if ($_SESSION['username'] != '' && $_SESSION['theme']['logout_icon_visible']['text'] == "true") { $username_full = $_SESSION['username'].((count($_SESSION['domains']) > 1) ? "@".$_SESSION["user_context"] : null); - echo ""; + echo ""; unset($username_full); } ?> From a4d324ac4605c255cb0429c857052ce0c50eb0b6 Mon Sep 17 00:00:00 2001 From: reliberate Date: Fri, 14 Aug 2015 18:23:49 -0600 Subject: [PATCH 2/5] Destination Add/Edit: Hide irrelevant controls if Type is Outbound, dynamically set Context accordingly. --- app/destinations/destination_edit.php | 104 ++++++++++++++++++-------- 1 file changed, 74 insertions(+), 30 deletions(-) diff --git a/app/destinations/destination_edit.php b/app/destinations/destination_edit.php index 6d422b2543..e715c48b97 100644 --- a/app/destinations/destination_edit.php +++ b/app/destinations/destination_edit.php @@ -545,6 +545,48 @@ if (count($_POST) > 0 && strlen($_POST["persistformvar"]) == 0) { $document['title'] = $text['title-destination-add']; } +//js controls + echo "\n"; + //show the content echo "
\n"; echo "\n"; @@ -571,7 +613,7 @@ if (count($_POST) > 0 && strlen($_POST["persistformvar"]) == 0) { echo " ".$text['label-destination_type']."\n"; echo "\n"; echo "\n"; if (permission_exists('outbound_caller_id_select')) { - echo "\n"; + echo "\n"; echo "\n"; @@ -608,7 +650,7 @@ if (count($_POST) > 0 && strlen($_POST["persistformvar"]) == 0) { echo "\n"; echo "\n"; - echo "\n"; + echo "\n"; echo "\n"; @@ -625,13 +667,13 @@ if (count($_POST) > 0 && strlen($_POST["persistformvar"]) == 0) { echo " ".$text['label-destination_context']."\n"; echo "\n"; echo "\n"; echo "\n"; - echo "\n"; + echo "\n"; echo "\n"; @@ -672,36 +714,38 @@ if (count($_POST) > 0 && strlen($_POST["persistformvar"]) == 0) { echo "\n"; if (file_exists($_SERVER['DOCUMENT_ROOT'].PROJECT_PATH."/app/fax/app_config.php")){ - echo "\n"; - echo "\n"; - echo "\n"; - echo "\n"; + if (is_array($result) && sizeof($result) > 0) { + echo "\n"; + echo "\n"; + echo "\n"; + echo "\n"; + } } - echo "\n"; + echo "\n"; echo "\n"; @@ -714,7 +758,7 @@ if (count($_POST) > 0 && strlen($_POST["persistformvar"]) == 0) { // billing if (file_exists($_SERVER['DOCUMENT_ROOT'].PROJECT_PATH."/app/billing/app_config.php")){ - echo "\n"; + echo "\n"; echo "\n"; @@ -726,7 +770,7 @@ if (count($_POST) > 0 && strlen($_POST["persistformvar"]) == 0) { echo "\n"; echo "\n"; - echo "\n"; + echo "\n"; echo "\n"; @@ -738,7 +782,7 @@ if (count($_POST) > 0 && strlen($_POST["persistformvar"]) == 0) { echo "\n"; echo "\n"; - echo "\n"; + echo "\n"; echo "\n"; @@ -771,7 +815,7 @@ if (count($_POST) > 0 && strlen($_POST["persistformvar"]) == 0) { echo " ".$text['label-domain']."\n"; echo "\n"; echo "\n"; + echo "\n"; echo "\n";
\n"; - echo " \n"; switch ($destination_type) { case "inbound" : $selected[1] = "selected='selected'"; break; case "outbound" : $selected[2] = "selected='selected'"; break; @@ -597,7 +639,7 @@ if (count($_POST) > 0 && strlen($_POST["persistformvar"]) == 0) { echo "
\n"; echo " ".$text['label-destination_caller_id_name']."\n"; echo "
\n"; echo " ".$text['label-destination_caller_id_number']."\n"; echo "\n"; - echo " \n"; + echo " \n"; echo "
\n"; echo $text['description-destination_context']."\n"; echo "
\n"; echo " ".$text['label-detail_action']."\n"; echo "
\n"; - echo " ".$text['label-fax_uuid']."\n"; - echo "\n"; $sql = "select * from v_fax "; $sql .= "where domain_uuid = '".$domain_uuid."' "; $sql .= "order by fax_name asc "; $prep_statement = $db->prepare(check_sql($sql)); $prep_statement->execute(); $result = $prep_statement->fetchAll(PDO::FETCH_ASSOC); - echo " \n"; unset ($prep_statement, $extension); - echo "
\n"; - echo " ".$text['description-fax_uuid']."\n"; - echo "
\n"; + echo " ".$text['label-fax_uuid']."\n"; + echo "\n"; + echo " \n"; + echo "
\n"; + echo " ".$text['description-fax_uuid']."\n"; + echo "
\n"; echo " ".$text['label-destination_cid_name_prefix']."\n"; echo "
\n"; echo " ".$text['label-monthly_price']."\n"; echo "
\n"; echo " ".$text['label-monthly_price_buy']."\n"; echo "
\n"; echo " ".$text['label-carrier']."\n"; echo "\n"; - echo " \n"; if (strlen($domain_uuid) == 0) { echo " \n"; } From 0adcd1c0d880a57104885a972b63e9a70beab5c3 Mon Sep 17 00:00:00 2001 From: reliberate Date: Fri, 14 Aug 2015 20:32:56 -0600 Subject: [PATCH 3/5] Destinations (Class): Enable preferred number formatting for Destination options. --- resources/classes/destinations.php | 3 +++ 1 file changed, 3 insertions(+) diff --git a/resources/classes/destinations.php b/resources/classes/destinations.php index 1354e60c71..ec81998200 100644 --- a/resources/classes/destinations.php +++ b/resources/classes/destinations.php @@ -190,7 +190,9 @@ class destinations { if (count($row['result']['data']) > 0 and strlen($row['select_value'][$destination_type]) > 0) { $response .= " \n"; + $label2 = $label; foreach ($row['result']['data'] as $data) { + $did = ($label2 == 'destinations') ? true : false; $select_value = $row['select_value'][$destination_type]; $select_label = $row['select_label']; foreach ($row['field'] as $key => $value) { @@ -217,6 +219,7 @@ class destinations { $select_label = str_replace("\${domain_name}", $_SESSION['domain_name'], $select_label); $select_label = str_replace("\${context}", $_SESSION['context'], $select_label); if ($select_value == $destination_value) { $selected = "selected='selected' "; $select_found = true; } else { $selected = ''; } + if ($did) { $select_label = format_phone(trim($select_label)); } $response .= " \n"; } $response .= " \n"; From 26a810459be61014cc6c3266b03abbc1c3596671 Mon Sep 17 00:00:00 2001 From: reliberate Date: Sat, 15 Aug 2015 09:07:01 -0600 Subject: [PATCH 4/5] Destinations: Hide unrelated form elements on edit of Outbound Destination. --- app/destinations/destination_edit.php | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/app/destinations/destination_edit.php b/app/destinations/destination_edit.php index e715c48b97..ce238e627d 100644 --- a/app/destinations/destination_edit.php +++ b/app/destinations/destination_edit.php @@ -884,6 +884,11 @@ if (count($_POST) > 0 && strlen($_POST["persistformvar"]) == 0) { echo "

"; echo ""; +//adjust form if outbound destination + if ($destination_type == 'outbound') { + echo "\n"; + } + //include the footer require_once "resources/footer.php"; From 22ac756b16cf7940e59398b554bf81ca7602aedc Mon Sep 17 00:00:00 2001 From: reliberate Date: Sat, 15 Aug 2015 10:41:34 -0600 Subject: [PATCH 5/5] Destinations: Hide Account Code field on Add/Edit of Outbound Destinations. --- app/destinations/destination_edit.php | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/app/destinations/destination_edit.php b/app/destinations/destination_edit.php index ce238e627d..b22127f6cf 100644 --- a/app/destinations/destination_edit.php +++ b/app/destinations/destination_edit.php @@ -557,6 +557,7 @@ if (count($_POST) > 0 && strlen($_POST["persistformvar"]) == 0) { 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 = 'none';\n"; echo " document.getElementById('destination_context').value = '".$_SESSION['domain_name']."'"; echo " }\n"; echo " else if (dir == 'inbound') {\n"; @@ -568,6 +569,7 @@ if (count($_POST) > 0 && strlen($_POST["persistformvar"]) == 0) { echo " if (document.getElementById('tr_sell')) { document.getElementById('tr_sell').style.display = ''; }\n"; echo " if (document.getElementById('tr_buy')) { document.getElementById('tr_buy').style.display = ''; }\n"; echo " if (document.getElementById('tr_carrier')) { document.getElementById('tr_carrier').style.display = ''; }\n"; + echo " document.getElementById('tr_account_code').style.display = '';\n"; echo " document.getElementById('destination_context').value = 'public'"; echo " }\n"; echo " "; @@ -796,7 +798,7 @@ if (count($_POST) > 0 && strlen($_POST["persistformvar"]) == 0) { if ($action == "add") { $destination_accountcode = $_SESSION['domain_name']; } } - echo "
\n"; echo " ".$text['label-account_code']."\n"; echo "