Update extension_edit.php

This commit is contained in:
FusionPBX
2021-09-17 13:05:48 -06:00
committed by GitHub
parent 5c819ea050
commit 221a88c673

View File

@@ -1416,30 +1416,6 @@
echo " <input type=\"button\" class=\"btn\" name=\"\" alt=\"".$text['button-add']."\" onclick=\"window.location='".PROJECT_PATH."/app/destinations/destinations.php'\" value='".$text['button-add']."'>\n";
}
}
elseif (permission_exists('outbound_caller_id_select')) {
if (count($destinations) > 0) {
echo " <select name='emergency_caller_id_name' id='emergency_caller_id_name' class='formfld'>\n";
echo " <option value=''></option>\n";
foreach ($destinations as &$row) {
$tmp = $row["destination_caller_id_name"];
if(strlen($tmp) == 0){
$tmp = $row["destination_description"];
}
if(strlen($tmp) > 0){
if ($emergency_caller_id_name == $tmp) {
echo " <option value='".escape($tmp)."' selected='selected'>".escape($tmp)."</option>\n";
}
else {
echo " <option value='".escape($tmp)."'>".escape($tmp)."</option>\n";
}
}
}
echo " </select>\n";
}
else {
echo " <input type=\"button\" class=\"btn\" name=\"\" alt=\"".$text['button-add']."\" onclick=\"window.location='".PROJECT_PATH."/app/destinations/destinations.php'\" value='".$text['button-add']."'>\n";
}
}
else {
echo " <input class='formfld' type='text' name='emergency_caller_id_name' maxlength='255' value=\"".escape($emergency_caller_id_name)."\">\n";
}
@@ -1484,30 +1460,6 @@
echo " <input type=\"button\" class=\"btn\" name=\"\" alt=\"".$text['button-add']."\" onclick=\"window.location='".PROJECT_PATH."/app/destinations/destinations.php'\" value='".$text['button-add']."'>\n";
}
}
elseif (permission_exists('outbound_caller_id_select')) {
if (count($destinations) > 0) {
echo " <select name='emergency_caller_id_number' id='emergency_caller_id_number' class='formfld'>\n";
echo " <option value=''></option>\n";
foreach ($destinations as &$row) {
$tmp = $row["destination_caller_id_number"];
if(strlen($tmp) == 0){
$tmp = $row["destination_number"];
}
if(strlen($tmp) > 0){
if ($emergency_caller_id_number == $tmp) {
echo " <option value='".escape($tmp)."' selected='selected'>".escape($tmp)."</option>\n";
}
else {
echo " <option value='".escape($tmp)."'>".escape($tmp)."</option>\n";
}
}
}
echo " </select>\n";
}
else {
echo " <input type=\"button\" class=\"btn\" name=\"\" alt=\"".$text['button-add']."\" onclick=\"window.location='".PROJECT_PATH."/app/destinations/destinations.php'\" value='".$text['button-add']."'>\n";
}
}
else {
echo " <input class='formfld' type='text' name='emergency_caller_id_number' maxlength='255' min='0' step='1' value=\"".escape($emergency_caller_id_number)."\">\n";
}