From b7aaf582eb47acd12fa594e2f715e05fb5635ae2 Mon Sep 17 00:00:00 2001 From: FusionPBX Date: Wed, 15 Dec 2021 09:40:14 -0700 Subject: [PATCH] Add device line label. (#6192) * Add device line label. --- app/devices/app_config.php | 4 ++++ app/devices/device_edit.php | 10 +++++++++- 2 files changed, 13 insertions(+), 1 deletion(-) diff --git a/app/devices/app_config.php b/app/devices/app_config.php index f4eca6aa62..475cbeaaf3 100644 --- a/app/devices/app_config.php +++ b/app/devices/app_config.php @@ -536,6 +536,10 @@ $apps[$x]['db'][$y]['fields'][$z]['type'] = "text"; $apps[$x]['db'][$y]['fields'][$z]['description']['en-us'] = "Enter the outbound proxy."; $z++; + $apps[$x]['db'][$y]['fields'][$z]['name'] = "label"; + $apps[$x]['db'][$y]['fields'][$z]['type'] = "text"; + $apps[$x]['db'][$y]['fields'][$z]['description']['en-us'] = "Enter the label."; + $z++; $apps[$x]['db'][$y]['fields'][$z]['name'] = "display_name"; $apps[$x]['db'][$y]['fields'][$z]['type'] = "text"; $apps[$x]['db'][$y]['fields'][$z]['description']['en-us'] = "Enter the display name."; diff --git a/app/devices/device_edit.php b/app/devices/device_edit.php index 4c8e5b60b9..9a3a99ca67 100644 --- a/app/devices/device_edit.php +++ b/app/devices/device_edit.php @@ -17,7 +17,7 @@ The Initial Developer of the Original Code is Mark J Crane - Portions created by the Initial Developer are Copyright (C) 2008-2020 + Portions created by the Initial Developer are Copyright (C) 2008-2021 the Initial Developer. All Rights Reserved. */ @@ -128,6 +128,7 @@ //$server_address = $_POST["server_address"]; //$outbound_proxy_primary = $_POST["outbound_proxy_primary"]; //$outbound_proxy_secondary = $_POST["outbound_proxy_secondary"]; + //$label = $_POST["label"]; //$display_name = $_POST["display_name"]; //$user_id = $_POST["user_id"]; //$auth_id = $_POST["auth_id"]; @@ -316,6 +317,7 @@ } else if ($new_line && isset($_SESSION['provision']['server_address_secondary'])) { $array['devices'][0]['device_lines'][$y]['server_address_secondary'] = $_SESSION['provision']['server_address_secondary']['text']; } + $array['devices'][0]['device_lines'][$y]['label'] = $row["label"]; $array['devices'][0]['device_lines'][$y]['display_name'] = $row["display_name"]; $array['devices'][0]['device_lines'][$y]['user_id'] = $row["user_id"]; if (permission_exists('device_line_auth_id')) { @@ -547,6 +549,7 @@ $device_lines[$x]['outbound_proxy_secondary'] = $_SESSION['provision']['outbound_proxy_secondary']['text']; $device_lines[$x]['server_address_primary'] = $_SESSION['provision']['server_address_primary']['text']; $device_lines[$x]['server_address_secondary'] = $_SESSION['provision']['server_address_secondary']['text']; + $device_lines[$x]['label'] = ''; $device_lines[$x]['display_name'] = ''; $device_lines[$x]['user_id'] = ''; $device_lines[$x]['auth_id'] = ''; @@ -1041,6 +1044,7 @@ if (permission_exists('device_line_outbound_proxy_secondary')) { echo " ".$text['label-outbound_proxy_secondary']."\n"; } + echo " ".$text['label-label']."\n"; echo " ".$text['label-display_name']."\n"; echo " ".$text['label-user_id']."\n"; if (permission_exists('device_line_auth_id')) { @@ -1181,6 +1185,10 @@ echo " \n"; } + echo " \n"; + echo " \n"; + echo " \n"; + echo " \n"; echo " \n"; echo " \n";