Fix typo with destination ID for the new destination buttons

This commit is contained in:
Andrew Querol
2021-03-23 00:42:33 -05:00
committed by GitHub
parent 49adc1922a
commit 228b3d0b31

View File

@@ -476,7 +476,7 @@ if (!class_exists('destinations')) {
$language2 = new text;
//build the destination select list in html
$response .= " <select id='{destination_id}_type' class='formfld' style='".$select_style."' onchange=\"get_destinations('".$destination_id."', '".$destination_type."', this.value);\">\n";
$response .= " <select id='{$destination_id}_type' class='formfld' style='".$select_style."' onchange=\"get_destinations('".$destination_id."', '".$destination_type."', this.value);\">\n";
$response .= " <option value=''></option>\n";
foreach($_SESSION['destinations']['array'][$destination_type] as $key => $value) {
$singular = $this->singular($key);
@@ -514,7 +514,7 @@ if (!class_exists('destinations')) {
'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');}"
'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