";
- if (is_array($result) && @sizeof($result) != 0) {
+ if (is_array($result) && @sizeof($result) != 0 && permission_exists('ring_group_forward')) {
echo button::create(['type'=>'button','label'=>$text['button-save'],'icon'=>$_SESSION['theme']['button_icon_save'],'collapse'=>false,'style'=>"position: absolute; margin-top: -35px; margin-left: -72px;",'onclick'=>"list_form_submit('form_list_ring_group_forward');"]);
}
@@ -231,25 +235,42 @@
echo "
\n";
echo " | ".escape($row['ring_group_name'])." | \n";
echo " ".escape($row['ring_group_extension'])." | \n";
- echo " ";
- echo " ";
- // switch
- if (substr($_SESSION['theme']['input_toggle_style']['text'], 0, 6) == 'switch') {
- echo " \n";
+ if (permission_exists('ring_group_forward')) {
+ echo " | ";
+ echo " ";
+ // switch
+ if (substr($_SESSION['theme']['input_toggle_style']['text'], 0, 6) == 'switch') {
+ echo " \n";
+ }
+ // select
+ else {
+ echo " \n";
+ }
}
- // select
else {
- echo " \n";
+ echo " | ";
+ if ($row["ring_group_forward_enabled"] == 'true') {
+ echo $text['option-enabled'];
+ }
+ else {
+ echo $text['option-disabled'];
+ }
}
echo " | \n";
- echo " ";
- echo " ";
+ if (permission_exists('ring_group_forward')) {
+ echo " | ";
+ echo " ";
+ }
+ else {
+ echo " | ";
+ echo escape(format_phone($row["ring_group_forward_destination"] ?? ''));
+ }
echo " | \n";
echo "
\n";
$x++;
@@ -262,8 +283,10 @@
echo "
";
//$n++;
- echo "