diff --git a/app/destinations/resources/classes/destinations.php b/app/destinations/resources/classes/destinations.php
index 6f81f54f33..d95d234d2e 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; window.location.assign('/app/'+types[types.selectedIndex].className+'/'+types[types.selectedIndex].id+'_edit.php?id='+opts[opts.selectedIndex].id);"
+ ])."\n";
//debug information
//echo $response;
diff --git a/app/destinations/resources/destinations.php b/app/destinations/resources/destinations.php
index e8095231bf..29595bf316 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,7 @@
$select_label = str_replace('email-icon', '✉', $select_label);
//add the select option
- echo " \n";
+ echo " \n";
}
}
}