diff --git a/app/destinations/resources/classes/destinations.php b/app/destinations/resources/classes/destinations.php
index 6f81f54f33..efcc87f364 100644
--- a/app/destinations/resources/classes/destinations.php
+++ b/app/destinations/resources/classes/destinations.php
@@ -476,10 +476,11 @@ if (!class_exists('destinations')) {
$language2 = new text;
//build the destination select list in html
- $response .= " ".$response_button."\n";
-
+ $response .= " ";
+ $response .= button::create([
+ 'type'=>'button',
+ 'icon'=>'external-link-alt',
+ 'id'=>'btn_dest_go',
+ 'title'=>$text['label-edit'],
+ 'onclick'=>"let types = document.getElementById('{destination_id}_type').options; let opts = document.getElementById('{$destination_id}').options; if(opts[opts.selectedIndex].id && opts[opts.selectedIndex].id.length > 0) {window.open('/app/'+types[types.selectedIndex].className+'/'+types[types.selectedIndex].id+'_edit.php?id='+opts[opts.selectedIndex].id, '_blank');}"
+ ])."\n";
//debug information
//echo $response;
diff --git a/app/destinations/resources/destinations.php b/app/destinations/resources/destinations.php
index e8095231bf..ae026b5e6e 100644
--- a/app/destinations/resources/destinations.php
+++ b/app/destinations/resources/destinations.php
@@ -30,7 +30,8 @@
echo " \n";
echo " \n";
foreach($destinations as $key => $rows) {
- if ($key == $action && permission_exists($destination->singular($key)."_destinations")) {
+ $singular = $destination->singular($key);
+ if ($key == $action && permission_exists("{$singular}_destinations")) {
if (is_array($rows)) {
foreach($rows as $row) {
@@ -50,7 +51,8 @@
$select_label = str_replace('email-icon', '✉', $select_label);
//add the select option
- echo " \n";
+ $uuid = isset($row[$singular.'_uuid']) ? $row[$singular.'_uuid'] : $row['uuid'];
+ echo " \n";
}
}
}
diff --git a/app/voicemails/app_config.php b/app/voicemails/app_config.php
index 75e7526146..595ff12c8a 100644
--- a/app/voicemails/app_config.php
+++ b/app/voicemails/app_config.php
@@ -34,9 +34,10 @@
$apps[$x]['destinations'][$y]['type'] = "sql";
$apps[$x]['destinations'][$y]['label'] = "voicemails";
$apps[$x]['destinations'][$y]['name'] = "voicemails";
- $apps[$x]['destinations'][$y]['sql'] = "select voicemail_id as destination, '*99' || voicemail_id as extension, voicemail_description as description from v_voicemails";
+ $apps[$x]['destinations'][$y]['sql'] = "select voicemail_uuid, voicemail_id as destination, '*99' || voicemail_id as extension, voicemail_description as description from v_voicemails";
$apps[$x]['destinations'][$y]['where'] = "where domain_uuid = '\${domain_uuid}' and voicemail_enabled = 'true' ";
$apps[$x]['destinations'][$y]['order_by'] = "voicemail_id asc ";
+ $apps[$x]['destinations'][$y]['field']['voicemail_uuid'] = "voicemail_uuid";
$apps[$x]['destinations'][$y]['field']['destination'] = "voicemail_id";
$apps[$x]['destinations'][$y]['field']['extension'] = "voicemail_id";
$apps[$x]['destinations'][$y]['field']['description'] = "voicemail_description";