Skip to content

Commit 6dfc01d

Browse files
committed
Merge branch 'bug-fix' of https://github.com/goautodial/v4.0 into bug-fix
2 parents 881fe0c + 1479979 commit 6dfc01d

File tree

10 files changed

+158
-193
lines changed

10 files changed

+158
-193
lines changed

agent.php

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -787,21 +787,21 @@ function response($order_id,$amount,$response_code,$response_desc){
787787
<div class="mda-form-group label-floating">
788788
<input id="first_name" name="first_name" type="text" maxlength="30" value="<?php echo $first_name;?>"
789789
class="mda-form-control ng-pristine ng-empty ng-invalid ng-invalid-required ng-touched input-disabled" disabled required>
790-
<label for="first_name">First Name</label>
790+
<label for="first_name"><?=$lh->translationFor('first_name')?></label>
791791
</div>
792792
</div>
793793
<div class="col-sm-4">
794794
<div class="mda-form-group label-floating">
795795
<input id="middle_initial" name="middle_initial" type="text" maxlength="1" value="<?php echo $middle_initial;?>"
796796
class="mda-form-control ng-pristine ng-empty ng-invalid ng-invalid-required ng-touched input-disabled" disabled>
797-
<label for="middle_initial">Middle Initial</label>
797+
<label for="middle_initial"><?=$lh->translationFor('middle_initial')?></label>
798798
</div>
799799
</div>
800800
<div class="col-sm-4">
801801
<div class="mda-form-group label-floating">
802802
<input id="last_name" name="last_name" type="text" maxlength="30" value="<?php echo $last_name;?>"
803803
class="mda-form-control ng-pristine ng-empty ng-invalid ng-invalid-required ng-touched input-disabled" disabled required>
804-
<label for="last_name">Last Name</label>
804+
<label for="last_name"><?=$lh->translationFor('last_name')?></label>
805805
</div>
806806
</div>
807807
</div>

modules/GOagent/GOagentJS.php

Lines changed: 33 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -49,6 +49,8 @@
4949

5050
$module_dir = (!empty($module_dir)) ? $module_dir : '/modules/GOagent/';
5151

52+
$show_letters = false; // Show letters on dial pad
53+
5254
//ini_set('display_errors', 'on');
5355
//error_reporting(E_ALL);
5456

@@ -340,6 +342,9 @@
340342
echo "var {$idx} = $val;\n";
341343
} else {
342344
echo "var {$idx} = '{$val}';\n";
345+
if ($idx == 'am_message_exten') {
346+
echo "var campaign_am_message_exten = '8320';\n";
347+
}
343348
if ($idx == 'auto_dial_level') {
344349
echo "var starting_dial_level = '{$val}';\n";
345350
}
@@ -1208,6 +1213,20 @@ class: resized ? 'fa fa-chevron-down' : 'fa fa-chevron-up'
12081213
$("#go_agent_status").append("<li><div id='RecordControl' class='center-block hidden-xs' style='text-align: center;'><button id='btnRecordCall' onclick='btnRecordCall();' title='<?=$lh->translationFor('start_recording')?>' class='btn btn-danger btn-sm' style='margin: 0 5px 5px 0; font-size: 16px;'><?=$lh->translationFor('start_recording')?></button></div></li>");
12091214
$("#go_agent_dialpad").append("<li><div id='AgentDialPad' class='center-block' style='text-align: center; min-width: 200px;'></div></li>");
12101215
$("#AgentDialPad").append("<button type='button' id='dialer-pad-1' class='btn btn-default btn-lg btn-raised' style='padding: 10px 25px; margin: 0 5px 5px 0; font-size: 16px; font-family: monospace;'> 1 </button>");
1216+
<?php
1217+
if ($show_letters) {
1218+
?>
1219+
$("#AgentDialPad").append("<button type='button' id='dialer-pad-2' class='btn btn-default btn-lg btn-raised' style='padding: 5px 19.5px; margin: 0 5px 5px 0; font-size: 12px; font-family: monospace;'><span style='display: flex; justify-content: center;'>ABC</span><span style='display: flex; justify-content: center;'>2</span></button>");
1220+
$("#AgentDialPad").append("<button type='button' id='dialer-pad-3' class='btn btn-default btn-lg btn-raised' style='padding: 5px 19.5px; margin: 0 0 5px 0; font-size: 12px; font-family: monospace;'><span style='display: flex; justify-content: center;'>DEF</span><span style='display: flex; justify-content: center;'>3</span></button>");
1221+
$("#AgentDialPad").append("<button type='button' id='dialer-pad-4' class='btn btn-default btn-lg btn-raised' style='padding: 5px 19.5px; margin: 0 5px 5px 0; font-size: 12px; font-family: monospace;'><span style='display: flex; justify-content: center;'>GHI</span><span style='display: flex; justify-content: center;'>4</span></button>");
1222+
$("#AgentDialPad").append("<button type='button' id='dialer-pad-5' class='btn btn-default btn-lg btn-raised' style='padding: 5px 19.5px; margin: 0 5px 5px 0; font-size: 12px; font-family: monospace;'><span style='display: flex; justify-content: center;'>JKL</span><span style='display: flex; justify-content: center;'>5</span></button>");
1223+
$("#AgentDialPad").append("<button type='button' id='dialer-pad-6' class='btn btn-default btn-lg btn-raised' style='padding: 5px 19.5px; margin: 0 0 5px 0; font-size: 12px; font-family: monospace;'><span style='display: flex; justify-content: center;'>MNO</span><span style='display: flex; justify-content: center;'>6</span></button>");
1224+
$("#AgentDialPad").append("<button type='button' id='dialer-pad-7' class='btn btn-default btn-lg btn-raised' style='padding: 5px 16.3px; margin: 0 5px 5px 0; font-size: 12px; font-family: monospace;'><span style='display: flex; justify-content: center;'>PQRS</span><span style='display: flex; justify-content: center;'>7</span></button>");
1225+
$("#AgentDialPad").append("<button type='button' id='dialer-pad-8' class='btn btn-default btn-lg btn-raised' style='padding: 5px 19.5px; margin: 0 5px 5px 0; font-size: 12px; font-family: monospace;'><span style='display: flex; justify-content: center;'>TUV</span><span style='display: flex; justify-content: center;'>8</span></button>");
1226+
$("#AgentDialPad").append("<button type='button' id='dialer-pad-9' class='btn btn-default btn-lg btn-raised' style='padding: 5px 16.3px; margin: 0 0 5px 0; font-size: 12px; font-family: monospace;'><span style='display: flex; justify-content: center;'>WXYZ</span><span style='display: flex; justify-content: center;'>9</span></button>");
1227+
<?php
1228+
} else {
1229+
?>
12111230
$("#AgentDialPad").append("<button type='button' id='dialer-pad-2' class='btn btn-default btn-lg btn-raised' style='padding: 10px 25px; margin: 0 5px 5px 0; font-size: 16px; font-family: monospace;'> 2 </button>");
12121231
$("#AgentDialPad").append("<button type='button' id='dialer-pad-3' class='btn btn-default btn-lg btn-raised' style='padding: 10px 25px; margin: 0 0 5px 0; font-size: 16px; font-family: monospace;'> 3 </button>");
12131232
$("#AgentDialPad").append("<button type='button' id='dialer-pad-4' class='btn btn-default btn-lg btn-raised' style='padding: 10px 25px; margin: 0 5px 5px 0; font-size: 16px; font-family: monospace;'> 4 </button>");
@@ -1216,6 +1235,9 @@ class: resized ? 'fa fa-chevron-down' : 'fa fa-chevron-up'
12161235
$("#AgentDialPad").append("<button type='button' id='dialer-pad-7' class='btn btn-default btn-lg btn-raised' style='padding: 10px 25px; margin: 0 5px 5px 0; font-size: 16px; font-family: monospace;'> 7 </button>");
12171236
$("#AgentDialPad").append("<button type='button' id='dialer-pad-8' class='btn btn-default btn-lg btn-raised' style='padding: 10px 25px; margin: 0 5px 5px 0; font-size: 16px; font-family: monospace;'> 8 </button>");
12181237
$("#AgentDialPad").append("<button type='button' id='dialer-pad-9' class='btn btn-default btn-lg btn-raised' style='padding: 10px 25px; margin: 0 0 5px 0; font-size: 16px; font-family: monospace;'> 9 </button>");
1238+
<?php
1239+
}
1240+
?>
12191241
$("#AgentDialPad").append("<button type='button' id='dialer-pad-ast' class='btn btn-default btn-lg btn-raised hidden' style='padding: 10px 25px; margin: 0 5px 5px 0; font-size: 16px; font-family: monospace;'> * </button>");
12201242
$("#AgentDialPad").append("<button type='button' id='dialer-pad-clear' class='btn btn-default btn-lg btn-raised' style='padding: 12.5px 23px; margin: 0 5px 5px 0; font-size: 16px; font-family: monospace;' title='<?=$lh->translationFor('clear')?>'> <i class='fa fa-times'></i> </button>");
12211243
$("#AgentDialPad").append("<button type='button' id='dialer-pad-0' class='btn btn-default btn-lg btn-raised' style='padding: 10px 25px; margin: 0 5px 5px 0; font-size: 16px; font-family: monospace;'> 0 </button>");
@@ -1258,6 +1280,17 @@ class: resized ? 'fa fa-chevron-down' : 'fa fa-chevron-up'
12581280
break;
12591281
}
12601282
});
1283+
1284+
// Fix for the double click on hangup button
1285+
$("#btnDialHangup").click(function() {
1286+
var thisBtn = $(this);
1287+
thisBtn.prop('disabled', true);
1288+
1289+
setTimeout(function() {
1290+
// enable click after 1 second
1291+
thisBtn.prop('disabled', false);
1292+
}, 1000); // 1 second delay
1293+
});
12611294

12621295
$("li[id^='btn']").click(function() {
12631296
var btnID = $(this).attr('id').replace('btn', '');

modules/osTicket/lang/en_US

Lines changed: 0 additions & 5 deletions
This file was deleted.

modules/osTicket/lang/es_ES

Lines changed: 0 additions & 5 deletions
This file was deleted.

modules/osTicket/module.php

Lines changed: 0 additions & 174 deletions
This file was deleted.
-6.28 KB
Binary file not shown.

php/APIHandler.php

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1089,10 +1089,11 @@ public function API_addDialStatus($postfields){
10891089
return $this->API_Request("goCampaigns", $postfields);
10901090
}
10911091

1092-
public function API_getAllAreacodes(){
1092+
public function API_getAllAreacodes($options){
10931093
$postfields = array(
1094-
'goAction' => 'goGetAllAreacodes'
1094+
'goAction' => 'goGetAllAreacodes',
10951095
);
1096+
$postfields = array_merge($postfields, $options);
10961097
return $this->API_Request("goAreacodes", $postfields);
10971098
}
10981099

php/GetAreaCodes.php

Lines changed: 67 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,67 @@
1+
<?php
2+
/**
3+
* @file GetAreaCodes.php
4+
* @brief Handles Areacode variables and HTML
5+
* @copyright Copyright (c) 2018 GOautodial Inc.
6+
* @author Christopher Lomuntad
7+
*
8+
* @par <b>License</b>:
9+
* This program is free software: you can redistribute it and/or modify
10+
* it under the terms of the GNU Affero General Public License as published by
11+
* the Free Software Foundation, either version 3 of the License, or
12+
* (at your option) any later version.
13+
*
14+
* This program is distributed in the hope that it will be useful,
15+
* but WITHOUT ANY WARRANTY; without even the implied warranty of
16+
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
17+
* GNU Affero General Public License for more details.
18+
*
19+
* You should have received a copy of the GNU Affero General Public License
20+
* along with this program. If not, see <http://www.gnu.org/licenses/>.
21+
*/
22+
23+
require_once('APIHandler.php');
24+
$api = \creamy\APIHandler::getInstance();
25+
26+
$draw = $_POST["draw"];
27+
$start = $_POST["start"];
28+
$length = $_POST["length"];
29+
$columns = $_POST["columns"];
30+
$search = $_POST["search"];
31+
$order = $_POST["order"];
32+
$user_group = $_SESSION["usergroup"];
33+
$perm = $api->goGetPermissions('campaign', $user_group);
34+
35+
$options = array(
36+
"draw" => $draw,
37+
"start" => $start,
38+
"length" => $length,
39+
"order" => $columns[$order[0]["column"]]["data"],
40+
"dir" => $order[0]["dir"],
41+
"search" => $search["value"],
42+
"can_update" => $perm->campaign_update
43+
);
44+
45+
$output = $api->API_getAllAreacodes($options);
46+
47+
//$data = '[';
48+
//$i = 0;
49+
50+
51+
//for($i=0;$i<=count($output->campaign_id);$i++) {
52+
// if(!empty($output->pause_code[$i])){
53+
// $data .= '[';
54+
// $data .= '"'.$output->pause_code[$i].'",';
55+
// $data .= '"'.str_replace('+',' ',$output->pause_code_name[$i]).'",';
56+
// $data .= '"'.$output->billable[$i].'",';
57+
// $data .= '"<a style=\"margin-right: 5px;\" href=\"#\" class=\"btn-edit-pc btn btn-primary'.($perm->campaign_update === 'N' ? ' hidden' : '').'\" data-camp-id=\"'.$output->campaign_id[$i].'\" data-code=\"'.$output->pause_code[$i].'\" data-name=\"'.str_replace('+',' ',$output->pause_code_name[$i]).'\" data-billable=\"'.$output->billable[$i].'\"><span class=\"fa fa-pencil\"></span></a><a href=\"#\" class=\"btn-delete-pc btn btn-danger'.($perm->pausecodes_delete === 'N' ? ' hidden' : '').'\" data-camp-id=\"'.$output->campaign_id[$i].'\" data-code=\"'.$output->pause_code[$i].'\"><span class=\"fa fa-trash\"></span></a>"';
58+
// $data .= '],';
59+
// }
60+
//}
61+
62+
//$data = rtrim($data, ",");
63+
//$data .= ']';
64+
65+
echo json_encode($output);
66+
67+
?>

php/goCRMAPISettings.php-sample

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
<?php
22
define ('gourl', 'https://HOSTNAME/goAPIv2'); //replace HOSTNAME with your FQDN
33
define ('goUser', 'goAPI');
4-
define ('goPass', 'goAPIpass1234');
4+
define ('goPass', 'KToB93bzjGd1RS4mDqePJ6Uk.jgNRrK');
55
define ('responsetype', 'json');
66
?>

0 commit comments

Comments
 (0)