Call Centers: Updates for PHP 8.1
This commit is contained in:
@@ -17,7 +17,7 @@
|
||||
|
||||
The Initial Developer of the Original Code is
|
||||
Mark J Crane <markjcrane@fusionpbx.com>
|
||||
Portions created by the Initial Developer are Copyright (C) 2008-2020
|
||||
Portions created by the Initial Developer are Copyright (C) 2008-2023
|
||||
the Initial Developer. All Rights Reserved.
|
||||
|
||||
Contributor(s):
|
||||
@@ -87,7 +87,7 @@
|
||||
|
||||
//get http post variables and set them to php variables
|
||||
if (!empty($_POST)) {
|
||||
$call_center_agent_uuid = $_POST["call_center_agent_uuid"];
|
||||
$call_center_agent_uuid = $_POST["call_center_agent_uuid"] ?? null;
|
||||
$user_uuid = $_POST["user_uuid"];
|
||||
$agent_name = $_POST["agent_name"];
|
||||
$agent_type = $_POST["agent_type"];
|
||||
@@ -360,7 +360,7 @@
|
||||
function check_duplicates() {
|
||||
//check agent id
|
||||
var agent_id = document.getElementById('agent_id').value;
|
||||
$("#duplicate_agent_id_response").load("call_center_agent_edit.php?check=duplicate&agent_id="+agent_id+"&agent_uuid=<?php echo escape($call_center_agent_uuid); ?>", function() {
|
||||
$("#duplicate_agent_id_response").load("call_center_agent_edit.php?check=duplicate&agent_id="+agent_id+"&agent_uuid=<?php echo escape($call_center_agent_uuid ?? ''); ?>", function() {
|
||||
var duplicate_agent_id = false;
|
||||
if ($("#duplicate_agent_id_response").html() != '') {
|
||||
$('#agent_id').addClass('formfld_highlight_bad');
|
||||
@@ -454,13 +454,8 @@
|
||||
echo " <td class='vtable' align='left'>";
|
||||
echo " <select name=\"user_uuid\" class='formfld' style='width: auto;'>\n";
|
||||
echo " <option value=\"\"></option>\n";
|
||||
foreach($users as $field) {
|
||||
if ($user_uuid == $field['user_uuid']) {
|
||||
echo " <option value='".escape($field['user_uuid'])."' selected='selected'>".escape($field['username'])."</option>\n";
|
||||
}
|
||||
else {
|
||||
echo " <option value='".escape($field['user_uuid'])."' $selected>".escape($field['username'])."</option>\n";
|
||||
}
|
||||
foreach ($users as $field) {
|
||||
echo " <option value='".escape($field['user_uuid'])."' ".(!empty($user_uuid) && $user_uuid == $field['user_uuid'] ? "selected='selected'" : null).">".escape($field['username'])."</option>\n";
|
||||
}
|
||||
echo " </select>";
|
||||
unset($users);
|
||||
@@ -509,31 +504,11 @@
|
||||
echo "</td>\n";
|
||||
echo "<td class='vtable' align='left'>\n";
|
||||
echo " <select class='formfld' name='agent_status'>\n";
|
||||
echo " <option value=''></option>\n";
|
||||
if ($agent_status == "Logged Out") {
|
||||
echo " <option value='Logged Out' SELECTED >".$text['option-logged_out']."</option>\n";
|
||||
}
|
||||
else {
|
||||
echo " <option value='Logged Out'>".$text['option-logged_out']."</option>\n";
|
||||
}
|
||||
if ($agent_status == "Available") {
|
||||
echo " <option value='Available' SELECTED >".$text['option-available']."</option>\n";
|
||||
}
|
||||
else {
|
||||
echo " <option value='Available'>".$text['option-available']."</option>\n";
|
||||
}
|
||||
if ($agent_status == "Available (On Demand)") {
|
||||
echo " <option value='Available (On Demand)' SELECTED >".$text['option-available_on_demand']."</option>\n";
|
||||
}
|
||||
else {
|
||||
echo " <option value='Available (On Demand)'>".$text['option-available_on_demand']."</option>\n";
|
||||
}
|
||||
if ($agent_status == "On Break") {
|
||||
echo " <option value='On Break' SELECTED >".$text['option-on_break']."</option>\n";
|
||||
}
|
||||
else {
|
||||
echo " <option value='On Break'>".$text['option-on_break']."</option>\n";
|
||||
}
|
||||
echo " <option value=''></option>\n";
|
||||
echo " <option value='Logged Out' ".(!empty($agent_status) && $agent_status == "Logged Out" ? "selected='selected'" : null).">".$text['option-logged_out']."</option>\n";
|
||||
echo " <option value='Available' ".(!empty($agent_status) && $agent_status == "Available" ? "selected='selected'" : null).">".$text['option-available']."</option>\n";
|
||||
echo " <option value='Available (On Demand)' ".(!empty($agent_status) && $agent_status == "Available (On Demand)" ? "selected='selected'" : null).">".$text['option-available_on_demand']."</option>\n";
|
||||
echo " <option value='On Break' ".(!empty($agent_status) && $agent_status == "On Break" ? "selected='selected'" : null).">".$text['option-on_break']."</option>\n";
|
||||
echo " </select>\n";
|
||||
echo "<br />\n";
|
||||
echo $text['description-status']."\n";
|
||||
@@ -601,8 +576,8 @@
|
||||
echo "</td>\n";
|
||||
echo "<td class='vtable' align='left'>\n";
|
||||
echo " <select class='formfld' name='agent_record'>\n";
|
||||
echo " <option value='true' ".($agent_record == "true" ? "selected='selected'" : '')." >".$text['option-true']."</option>\n";
|
||||
echo " <option value='false' ".($agent_record != "true" ? "selected='selected'" : '').">".$text['option-false']."</option>\n";
|
||||
echo " <option value='true'>".$text['option-true']."</option>\n";
|
||||
echo " <option value='false' ".(!empty($agent_record) && $agent_record != "true" ? "selected='selected'" : null).">".$text['option-false']."</option>\n";
|
||||
echo " </select>\n";
|
||||
echo "<br />\n";
|
||||
echo $text['description-record_template']."\n";
|
||||
@@ -635,4 +610,4 @@
|
||||
//include the footer
|
||||
require_once "resources/footer.php";
|
||||
|
||||
?>
|
||||
?>
|
||||
Reference in New Issue
Block a user