Operator Panel: Show status change buttons only if extensions assigned to current user.
This commit is contained in:
@@ -65,8 +65,8 @@ echo " <td valign='top' align='left' width='50%' nowrap>";
|
|||||||
echo " <b>".$text['title-operator_panel']."</b>";
|
echo " <b>".$text['title-operator_panel']."</b>";
|
||||||
echo " </td>";
|
echo " </td>";
|
||||||
echo " <td valign='top' align='center' nowrap>";
|
echo " <td valign='top' align='center' nowrap>";
|
||||||
echo " <input type='hidden' id='current_user_status' value=''>";
|
|
||||||
|
|
||||||
|
if (sizeof($_SESSION['user']['extensions']) > 0) {
|
||||||
$status_options = Array(
|
$status_options = Array(
|
||||||
"Available" => $text['label-status_available'],
|
"Available" => $text['label-status_available'],
|
||||||
"Available (On Demand)" => $text['label-status_on_demand'],
|
"Available (On Demand)" => $text['label-status_on_demand'],
|
||||||
@@ -77,6 +77,7 @@ $status_options = Array(
|
|||||||
foreach ($status_options as $status_value => $status_label) {
|
foreach ($status_options as $status_value => $status_label) {
|
||||||
echo " <input type='button' class='btn' value=\"".$status_label."\" onclick=\"send_cmd('index.php?status='+escape('".$status_value."'));\">";
|
echo " <input type='button' class='btn' value=\"".$status_label."\" onclick=\"send_cmd('index.php?status='+escape('".$status_value."'));\">";
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
echo " </td>";
|
echo " </td>";
|
||||||
echo " <td valign='top' align='right' width='50%' nowrap>";
|
echo " <td valign='top' align='right' width='50%' nowrap>";
|
||||||
|
|||||||
Reference in New Issue
Block a user