Extensions: Only show Call Control button on edit.

This commit is contained in:
Nate Jones 2015-05-05 16:45:35 +00:00
parent 6b4c4e8c73
commit 60856cc6f5
1 changed files with 2 additions and 2 deletions

View File

@ -860,10 +860,10 @@ if (count($_POST) > 0 && strlen($_POST["persistformvar"]) == 0) {
}
echo "<td width='70%' align='right' valign='top'>\n";
echo " <input type='button' class='btn' alt='".$text['button-back']."' onclick=\"window.location='extensions.php'\" value='".$text['button-back']."'>\n";
if (permission_exists('follow_me') || permission_exists('call_forward') || permission_exists('do_not_disturb')) {
if ($action == 'update' && (permission_exists('follow_me') || permission_exists('call_forward') || permission_exists('do_not_disturb'))) {
echo " <input type='button' class='btn' alt='".$text['button-calls']."' onclick=\"window.location='../calls/call_edit.php?id=".$extension_uuid."';\" value='".$text['button-calls']."'>\n";
}
if ($action != "add") {
if ($action == "update") {
echo " <input type='button' class='btn' alt='".$text['button-copy']."' onclick=\"copy_extension();\" value='".$text['button-copy']."'>\n";
}
echo " <input type='submit' class='btn' value='".$text['button-save']."'>\n";