Add xml_cdr_export_csv and xml_cdr_export_pdf permission checks.

This commit is contained in:
FusionPBX
2021-01-17 23:55:23 -07:00
committed by GitHub
parent 012b5b2184
commit 9788b7b99f

View File

@@ -188,8 +188,12 @@
echo button::create(['type'=>'button','label'=>$text['button-export'],'icon'=>$_SESSION['theme']['button_icon_export'],'onclick'=>"toggle_select('export_format'); this.blur();"]);
echo "<select class='formfld' style='display: none; width: auto;' name='export_format' id='export_format' onchange=\"display_message('".$text['message-preparing_download']."'); toggle_select('export_format'); document.getElementById('frm_export').submit();\">";
echo " <option value='' disabled='disabled' selected='selected'>".$text['label-format']."</option>";
echo " <option value='csv'>CSV</option>";
echo " <option value='pdf'>PDF</option>";
if (permission_exists('xml_cdr_export_csv')) {
echo " <option value='csv'>CSV</option>";
}
if (permission_exists('xml_cdr_export_pdf')) {
echo " <option value='pdf'>PDF</option>";
}
echo " </select>";
}
if (!$archive_request && permission_exists('xml_cdr_delete')) {