Update call_center_agent_edit.php

This commit is contained in:
FusionPBX 2018-06-30 18:56:48 -06:00 committed by GitHub
parent 995d8e6a21
commit dcd2267877
1 changed files with 17 additions and 17 deletions

View File

@ -325,7 +325,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 $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');
@ -370,17 +370,17 @@
echo " ".$text['label-agent_name']."\n";
echo "</td>\n";
echo "<td class='vtable' align='left'>\n";
echo " <input class='formfld' type='text' name='agent_name' maxlength='255' value=\"$agent_name\" />\n";
echo " <input class='formfld' type='text' name='agent_name' maxlength='255' value=\"".escape($agent_name)."\" />\n";
/*
echo "<select id=\"agent_name\" name=\"agent_name\" class='formfld'>\n";
echo "<option value=\"\"></option>\n";
if (is_array($users)) {
foreach($users as $field) {
if ($field[username] == $agent_name) {
echo "<option value='".$field[username]."' selected='selected'>".$field[username]."</option>\n";
echo "<option value='".escape($field[username])."' selected='selected'>".escape($field[username])."</option>\n";
}
else {
echo "<option value='".$field[username]."'>".$field[username]."</option>\n";
echo "<option value='".escape($field[username])."'>".escape($field[username])."</option>\n";
}
}
}
@ -396,7 +396,7 @@
echo " ".$text['label-type']."\n";
echo "</td>\n";
echo "<td class='vtable' align='left'>\n";
echo " <input class='formfld' type='text' name='agent_type' maxlength='255' value=\"$agent_type\" pattern='^(callback|uuid-standby)$'>\n";
echo " <input class='formfld' type='text' name='agent_type' maxlength='255' value=\"".escape($agent_type)."\" pattern='^(callback|uuid-standby)$'>\n";
echo "<br />\n";
echo $text['description-type']."\n";
echo "</td>\n";
@ -407,7 +407,7 @@
echo " ".$text['label-call_timeout']."\n";
echo "</td>\n";
echo "<td class='vtable' align='left'>\n";
echo " <input class='formfld' type='number' name='agent_call_timeout' maxlength='255' min='1' step='1' value='$agent_call_timeout'>\n";
echo " <input class='formfld' type='number' name='agent_call_timeout' maxlength='255' min='1' step='1' value='".escape($agent_call_timeout)."'>\n";
echo "<br />\n";
echo $text['description-call_timeout']."\n";
echo "</td>\n";
@ -420,10 +420,10 @@
echo " <option value=\"\"></option>\n";
foreach($users as $field) {
if ($user_uuid == $field['user_uuid']) {
echo " <option value='".$field['user_uuid']."' selected='selected'>".$field['username']."</option>\n";
echo " <option value='".escape($field['user_uuid'])."' selected='selected'>".escape($field['username'])."</option>\n";
}
else {
echo " <option value='".$field['user_uuid']."' $selected>".$field['username']."</option>\n";
echo " <option value='".escape($field['user_uuid'])."' $selected>".escape($field['username'])."</option>\n";
}
}
echo " </select>";
@ -438,7 +438,7 @@
echo " ".$text['label-agent_id']."\n";
echo "</td>\n";
echo "<td class='vtable' align='left'>\n";
echo " <input class='formfld' type='number' name='agent_id' id='agent_id' maxlength='255' min='1' step='1' value='$agent_id'>\n";
echo " <input class='formfld' type='number' name='agent_id' id='agent_id' maxlength='255' min='1' step='1' value='".escape($agent_id)."'>\n";
echo " <div style='display: none;' id='duplicate_agent_id_response'></div>\n";
echo "<br />\n";
echo $text['description-agent_id']."\n";
@ -450,7 +450,7 @@
echo " ".$text['label-agent_password']."\n";
echo "</td>\n";
echo "<td class='vtable' align='left'>\n";
echo " <input class='formfld' type='password' name='agent_password' autocomplete='off' onmouseover=\"this.type='text';\" onfocus=\"this.type='text';\" onmouseout=\"if (!\$(this).is(':focus')) { this.type='password'; }\" onblur=\"this.type='password';\" maxlength='255' min='1' step='1' value='$agent_password'>\n";
echo " <input class='formfld' type='password' name='agent_password' autocomplete='off' onmouseover=\"this.type='text';\" onfocus=\"this.type='text';\" onmouseout=\"if (!\$(this).is(':focus')) { this.type='password'; }\" onblur=\"this.type='password';\" maxlength='255' min='1' step='1' value='".escape($agent_password)."'>\n";
echo "<br />\n";
echo $text['description-agent_password']."\n";
echo "</td>\n";
@ -508,7 +508,7 @@
echo " ".$text['label-no_answer_delay_time']."\n";
echo "</td>\n";
echo "<td class='vtable' align='left'>\n";
echo " <input class='formfld' type='number' name='agent_no_answer_delay_time' maxlength='255' min='1' step='1' value='$agent_no_answer_delay_time'>\n";
echo " <input class='formfld' type='number' name='agent_no_answer_delay_time' maxlength='255' min='1' step='1' value='".escape($agent_no_answer_delay_time)."'>\n";
echo "<br />\n";
echo $text['description-no_answer_delay_time']."\n";
echo "</td>\n";
@ -519,7 +519,7 @@
echo " ".$text['label-max_no_answer']."\n";
echo "</td>\n";
echo "<td class='vtable' align='left'>\n";
echo " <input class='formfld' type='number' name='agent_max_no_answer' maxlength='255' min='0' step='1' value='$agent_max_no_answer'>\n";
echo " <input class='formfld' type='number' name='agent_max_no_answer' maxlength='255' min='0' step='1' value='".escape($agent_max_no_answer)."'>\n";
echo "<br />\n";
echo $text['description-max_no_answer']."\n";
echo "</td>\n";
@ -530,7 +530,7 @@
echo " ".$text['label-wrap_up_time']."\n";
echo "</td>\n";
echo "<td class='vtable' align='left'>\n";
echo " <input class='formfld' type='number' name='agent_wrap_up_time' maxlength='255' min='1' step='1' value='$agent_wrap_up_time'>\n";
echo " <input class='formfld' type='number' name='agent_wrap_up_time' maxlength='255' min='1' step='1' value='".escape($agent_wrap_up_time)."'>\n";
echo "<br />\n";
echo $text['description-wrap_up_time']."\n";
echo "</td>\n";
@ -541,7 +541,7 @@
echo " ".$text['label-reject_delay_time']."\n";
echo "</td>\n";
echo "<td class='vtable' align='left'>\n";
echo " <input class='formfld' type='number' name='agent_reject_delay_time' maxlength='255' min='1' step='1' value='$agent_reject_delay_time'>\n";
echo " <input class='formfld' type='number' name='agent_reject_delay_time' maxlength='255' min='1' step='1' value='".escape($agent_reject_delay_time)."'>\n";
echo "<br />\n";
echo $text['description-reject_delay_time']."\n";
echo "</td>\n";
@ -552,7 +552,7 @@
echo " ".$text['label-busy_delay_time']."\n";
echo "</td>\n";
echo "<td class='vtable' align='left'>\n";
echo " <input class='formfld' type='number' name='agent_busy_delay_time' maxlength='255' min='1' step='1' value='$agent_busy_delay_time'>\n";
echo " <input class='formfld' type='number' name='agent_busy_delay_time' maxlength='255' min='1' step='1' value='".escape($agent_busy_delay_time)."'>\n";
echo "<br />\n";
echo $text['description-busy_delay_time']."\n";
echo "</td>\n";
@ -564,7 +564,7 @@
echo " ".$text['label-agent_logout']."\n";
echo "</td>\n";
echo "<td class='vtable' align='left'>\n";
echo " <input class='formfld' type='text' name='agent_logout' maxlength='255' value='$agent_logout'>\n";
echo " <input class='formfld' type='text' name='agent_logout' maxlength='255' value='".escape($agent_logout)."'>\n";
echo "<br />\n";
echo $text['description-agent_logout']."\n";
echo "</td>\n";
@ -574,7 +574,7 @@
echo " <tr>\n";
echo " <td colspan='2' align='right'>\n";
if ($action == "update") {
echo " <input type='hidden' name='call_center_agent_uuid' value='$call_center_agent_uuid'>\n";
echo " <input type='hidden' name='call_center_agent_uuid' value='".escape($call_center_agent_uuid)."'>\n";
}
echo " <br />";
echo " <input type='submit' class='btn' value='".$text['button-save']."'>\n";