mirror of
https://github.com/ACSPRI/queXS
synced 2024-04-02 12:12:16 +00:00
Fixes by Alex (thank you!)
This commit is contained in:
@@ -42,7 +42,7 @@ include ("db.inc.php");
|
||||
/**
|
||||
* Authentication
|
||||
*/
|
||||
include ("auth-interviewer.php");
|
||||
require ("auth-interviewer.php");
|
||||
|
||||
/**
|
||||
* XHTML functions
|
||||
@@ -119,21 +119,19 @@ function display_outcomes($contacted,$ca,$case_id)
|
||||
}
|
||||
else
|
||||
{
|
||||
print "<div class=\"form-group\" ><a href=\"?contacted=1\" class=\"btn btn-info\" style=\"margin-left: 15px; margin-right: 30px; min-width: 200px;\">".T_("CONTACTED")."</a>";
|
||||
print "<a href=\"?contacted=0\" class=\"btn btn-default\" style=\"margin-left: 30px; margin-right: 15px; min-width: 200px;\">".T_("NOT CONTACTED")."</a></div>";
|
||||
|
||||
if (isset ($_GET['contacted'])) $contacted = bigintval($_GET['contacted']);
|
||||
else if ($contacted) $contacted = bigintval($contacted);
|
||||
|
||||
if ($contacted || $contacted === 0 ){
|
||||
|
||||
$sql = "SELECT outcome_id,description,contacted
|
||||
FROM outcome
|
||||
WHERE contacted = '$contacted'
|
||||
AND outcome_type_id != '5'
|
||||
AND outcome_id IN ($outcomes)
|
||||
AND outcome_id NOT IN(10,42,43,44,45)"; //don't show completed if not, hide max calls as the supposed to be automatic or admin
|
||||
if ($contacted === false)
|
||||
{
|
||||
print "<div class=\"form-group\" ><a href=\"?contacted=1\" class=\"btn btn-info\" style=\"margin-left: 15px; margin-right: 30px; min-width: 150px;\">".T_("CONTACTED")."</a>";
|
||||
print "<a href=\"?contacted=0\" class=\"btn btn-default\" style=\"margin-left: 30px; margin-right: 15px; min-width: 150px;\">".T_("NOT CONTACTED")."</a></div>";
|
||||
|
||||
if (isset ($_GET['contacted'])) $contacted = bigintval($_GET['contacted']);
|
||||
}
|
||||
else $contacted = bigintval($contacted);
|
||||
|
||||
$sql = "SELECT outcome_id,description,contacted
|
||||
FROM outcome
|
||||
WHERE contacted = '$contacted'
|
||||
AND outcome_id NOT IN(5,10,19,21,40,41,42,43,44,45)";
|
||||
}
|
||||
}
|
||||
$rs = $db->GetAll($sql);
|
||||
@@ -147,8 +145,8 @@ function display_outcomes($contacted,$ca,$case_id)
|
||||
foreach($rs as $r)
|
||||
{
|
||||
if ($do == $r['outcome_id']) $selected = "checked='checked'"; else $selected = "";
|
||||
if (isset($r['contacted']) && $r['contacted'] == 1) $highlight = "text-primary"; else $highlight = "text-default";
|
||||
print "<p><label class='$highlight'><input type='radio' class='radio' name='outcome' id='outcome-{$r['outcome_id']}' value='{$r['outcome_id']}' $selected style='float:left'/> " . T_($r['description']) . "</label></p>";
|
||||
if (isset($r['contacted']) && $r['contacted'] == 1) $highlight = ""; else $highlight = "style='color:black;'";
|
||||
print "<a><label $highlight class='btn-link'><input type='radio' class='radio' name='outcome' id='outcome-{$r['outcome_id']}' value='{$r['outcome_id']}' $selected style='float:left'/> " . T_($r['description']) . "</label></a><br/>";
|
||||
}
|
||||
|
||||
$_POST['confirm'] = true;
|
||||
@@ -300,7 +298,7 @@ if (isset($_GET['newstate']))
|
||||
|
||||
if (browser_ie()) $js = "js/window_ie6_interface2.js"; else $js = "js/window_interface2.js";
|
||||
|
||||
xhtml_head(T_("Set outcome"),true,array("include/bootstrap/css/bootstrap.min.css"/* ,"css/call.css" */),array($js,"include/jquery/jquery.min.js"));
|
||||
xhtml_head(T_("Set outcome"),true,array("include/bootstrap/css/bootstrap.min.css"),array($js,"include/jquery/jquery-1.4.2.min.js"));
|
||||
|
||||
$state = is_on_call($operator_id);
|
||||
switch($state)
|
||||
@@ -319,8 +317,8 @@ switch($state)
|
||||
{
|
||||
//end the case
|
||||
if (!isset($_GET['end'])) print "<div>" . T_("End work") . "</div>";
|
||||
print "<p><a href='javascript:openParent(\"endcase=endcase\")'>" . T_("End case") . "</a></p>";
|
||||
print "<p><a href='javascript:openParent(\"endwork=endwork\")'>" . T_("End work") . "</a></p>";
|
||||
print "<p><a href='javascript:openParent(\"endcase=endcase\")' class='btn btn-primary'>" . T_("End case") . "</a></p>";
|
||||
print "<p><a href='javascript:openParent(\"endwork=endwork\")' class='btn btn-info'>" . T_("End work") . "</a></p>";
|
||||
}
|
||||
else
|
||||
{
|
||||
@@ -346,9 +344,11 @@ switch($state)
|
||||
|
||||
print "<div>" . T_("Press the call button to dial the number for this appointment:") . "</div>";
|
||||
|
||||
print "<form action='?' method='post'><div>";
|
||||
print "<p>" . T_("Number to call:") . " {$r['phone']} - {$r['description']}</p>";
|
||||
print "</div><div><input type='hidden' id='contact_phone' name='contact_phone' value='{$r['contact_phone_id']}'/><input type='submit' value=\"" . T_("Call") . "\" name='submit' id='submit'/></div></form>";
|
||||
print "<form action='?' method='post'>
|
||||
<div><p>" . T_("Number to call:") . " {$r['phone']} - {$r['description']}</p></div>
|
||||
<input type='hidden' id='contact_phone' name='contact_phone' value='{$r['contact_phone_id']}'/>
|
||||
<div><input type='submit' value=\"" . T_("Call") . "\" name='submit' id='submit' class='btn btn-primary'/></div>
|
||||
</form>";
|
||||
}
|
||||
else
|
||||
print "<div>" . T_("Your VoIP extension is not enabled. Please close this window and enable VoIP by clicking once on the red button that says 'VoIP Off'") . "</div>";
|
||||
@@ -419,7 +419,7 @@ switch($state)
|
||||
{
|
||||
print "<option value='{$r['contact_phone_id']}'>{$r['phone']} - {$r['description']}</option>";
|
||||
}
|
||||
print "</select></div><div><input type='submit' value=\"" . T_("Call") . "\" name='submit' id='submit'/></div></form>";
|
||||
print "</select></div><div><input type='submit' value=\"" . T_("Call") . "\" name='submit' id='submit' class='btn btn-primary'/></div></form>";
|
||||
}
|
||||
else
|
||||
print "<div>" . T_("Your VoIP extension is not enabled. Please close this window and enable VoIP by clicking once on the red button that says 'VoIP Off'") . "</div>";
|
||||
@@ -435,13 +435,13 @@ switch($state)
|
||||
//give focus on load
|
||||
print '<script type="text/javascript">$(document).ready(function(){$("#note").focus();});</script>';
|
||||
//put these lower on the screen so they don't get "automatically" clicked
|
||||
print "<p><a href='javascript:openParentNote(\"endcase=endcase\")'>" . T_("End case") . "</a></p>";
|
||||
print "<p><a href='javascript:openParentNote(\"endwork=endwork\")'>" . T_("End work") . "</a></p>";
|
||||
print "<p><a href='javascript:openParentNote(\"endcase=endcase\")' class='btn btn-primary'>" . T_("End case") . "</a></p>";
|
||||
print "<p><a href='javascript:openParentNote(\"endwork=endwork\")' class='btn btn-info'>" . T_("End work") . "</a></p>";
|
||||
}
|
||||
else
|
||||
{
|
||||
print "<p><a href='javascript:openParent(\"endcase=endcase\")'>" . T_("End case") . "</a></p>";
|
||||
print "<p><a href='javascript:openParent(\"endwork=endwork\")'>" . T_("End work") . "</a></p";
|
||||
print "<p><a href='javascript:openParent(\"endcase=endcase\")' class='btn btn-primary'>" . T_("End case") . "</a></p>";
|
||||
print "<p><a href='javascript:openParent(\"endwork=endwork\")' class='btn btn-info'>" . T_("End work") . "</a></p";
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -454,16 +454,16 @@ switch($state)
|
||||
|
||||
if ($rn) // a note is required to be entered
|
||||
{
|
||||
print "<div><label for='note'>" . T_("Enter a reason for this outcome before completing this case:") . "</label><input type='text' id='note' name='note' size='48'/><br/><br/><br/><br/></div>";
|
||||
print "<div><label for='note' class='control-label'>" . T_("Enter a reason for this outcome before completing this case:") . "</label><textarea type='text' id='note' name='note' class='form-control' rows='3'></textarea><br/></div>";
|
||||
print '<script type="text/javascript">$(document).ready(function(){$("#note").focus();});</script>';
|
||||
print "<p><a href='javascript:openParentNote(\"endcase=endcase\")'>" . T_("End case") . "</a></p>";
|
||||
print "<p><a href='javascript:openParentNote(\"endwork=endwork\")'>" . T_("End work") . "</a></p>";
|
||||
print "<p><a href='javascript:openParentNote(\"endcase=endcase\")' class='btn btn-primary'>" . T_("End case") . "</a></p></p>";
|
||||
print "<p><a href='javascript:openParentNote(\"endwork=endwork\")' class='btn btn-info'>" . T_("End work") . "</a></p>";
|
||||
}
|
||||
else
|
||||
{
|
||||
if (!isset($_GET['end'])) print "<div>" . T_("The last call completed this call attempt") . "</div>";
|
||||
print "<p><a href='javascript:openParent(\"endcase=endcase\")'>" . T_("End case") . "</a></p>";
|
||||
print "<p><a href='javascript:openParent(\"endwork=endwork\")'>" . T_("End work") . "</a></p>";
|
||||
if (!isset($_GET['end'])) print "<div class='alert alert-info'>" . T_("The last call completed this call attempt") . "</div>";
|
||||
print "<p><a href='javascript:openParent(\"endcase=endcase\")' class='btn btn-primary'>" . T_("End case") . "</a></p></p>";
|
||||
print "<p><a href='javascript:openParent(\"endwork=endwork\")' class='btn btn-info'>" . T_("End work") . "</a></p>";
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -481,7 +481,7 @@ switch($state)
|
||||
break;
|
||||
case 5: //done -- shouldn't come here as should be coded + done
|
||||
default:
|
||||
print "<div class='status'>" . T_("Error: Close window") . "</div>";
|
||||
print "<div class='alert alert-danger'>" . T_("Error: Close window") . "</div>";
|
||||
break;
|
||||
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user