Merge pull request #5846 from winsock/patch-4

Fix typo with destination ID for the new destination buttons
This commit is contained in:
FusionPBX 2021-03-22 23:43:58 -06:00 committed by GitHub
commit b13372c654
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 2 additions and 2 deletions

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