mirror of
https://github.com/ACSPRI/queXS
synced 2024-04-02 12:12:16 +00:00
Merged selected fixes from Alex (thanks!)
This commit is contained in:
@@ -110,6 +110,7 @@ if ($operator_id)
|
||||
$rs = $db->Execute($sql);
|
||||
if (empty($rs))
|
||||
{
|
||||
xhtml_head(T_("Call History List"),true,$css,$js_head);
|
||||
print "<div class='alert alert-warning col-sm-6'><p>" . T_("No calls ever made") . "</p></div>";
|
||||
}
|
||||
else
|
||||
|
||||
@@ -185,7 +185,7 @@ if (isset($_GET['edit']) || isset($_GET['addext']))
|
||||
WHERE extension_id = " . intval($_GET['edit']);
|
||||
|
||||
$rs = $db->GetRow($sql);
|
||||
}
|
||||
} else $rs = array();
|
||||
|
||||
print "<a href='?' class='btn btn-default pull-left'>" . T_("Go back") . "</a>";
|
||||
?>
|
||||
|
||||
@@ -402,11 +402,11 @@ if ($display)
|
||||
$titles[] = T_("Win file");//Windows VoIP
|
||||
$titles[] = T_("*nix flle");//*nix VoIP
|
||||
}
|
||||
echo "<div class=' col-sm-10'><div class=' panel-body'>";
|
||||
echo "<div class='col-sm-9'><div class='panel-body'>";
|
||||
xhtml_table($rs,$columns,$titles);
|
||||
echo "</div></div>";
|
||||
|
||||
echo "<div class='form-group col-sm-2'>
|
||||
echo "<div class='form-group col-sm-3'>
|
||||
<div class='panel-body'><a href='operators.php?add=add' class='btn btn-default btn-block'><i class='fa fa-lg fa-user-plus'></i> " . T_("Add an operator") . "</a></div>
|
||||
<div class='panel-body'><a href='extensionstatus.php' class='btn btn-default btn-block'><i class='fa fa-lg fa-whatsapp'></i> " . T_("Extensions") . "</a></div>
|
||||
<div class='panel-body'><a href='operatorquestionnaire.php' class='btn btn-default btn-block'><i class='fa fa-lg fa-link'></i> " . T_("Assign to questionnaire") . "</a></div>
|
||||
|
||||
@@ -164,7 +164,7 @@ xhtml_head(T_("Assign operators to questionnaires"),true,array("../include/boots
|
||||
print "questionnaire_id = new Array(";
|
||||
|
||||
$s = "";
|
||||
|
||||
$q = array();
|
||||
foreach($questionnaires as $q)
|
||||
{
|
||||
$s .= "'{$q['questionnaire_id']}',";
|
||||
@@ -251,7 +251,7 @@ foreach($questionnaires as $q)
|
||||
}
|
||||
print "</tr></thead>";
|
||||
|
||||
|
||||
$v = array();
|
||||
foreach($operators as $v)
|
||||
{
|
||||
|
||||
|
||||
@@ -538,7 +538,7 @@ else if (isset($_GET['delete']))
|
||||
}
|
||||
else
|
||||
{
|
||||
xhtml_head(T_("Questionnaire management"),true,$css,$js_head, false, false, false, "Questionnaire list");
|
||||
xhtml_head(T_("Questionnaire management"),true,$css,$js_head, false, false, false,T_("Questionnaire list"));
|
||||
echo "<div class='form-group'>
|
||||
<a href='' onclick='history.back();return false;' class='btn btn-default'><i class='fa fa-chevron-left fa-lg text-primary'></i> " . T_("Go back") . "</a>
|
||||
<a href='new.php' class='btn btn-default col-sm-offset-6' ><i class='fa fa-file-text-o fa-lg'></i> " . T_("Create a new questionnaire") . "</a>
|
||||
|
||||
@@ -116,7 +116,7 @@ if (isset($_POST['ed']))
|
||||
if (isset($_POST['type'])){
|
||||
|
||||
//check that we have correct var types and quantity
|
||||
$prph = 0; $pcd = 0; $st = 0; $fn = 0; $eml =0;
|
||||
$prph = 0; $pcd = 0; $st = 0; $fn = 0; $eml =0; $ln =0;
|
||||
foreach($_POST['type'] as $key => $val) {
|
||||
if ($val == 3) $prph++;
|
||||
else if ($val == 5) $pcd++;
|
||||
@@ -293,17 +293,17 @@ if (isset($_GET['edit']) )
|
||||
$sql = "SELECT * FROM sample_import WHERE sample_import_id = $sample_import_id";
|
||||
$sd = $db->GetRow($sql);
|
||||
|
||||
if($sd['enabled'] == 1) $dis = disabled; // -> disable edit and delete if sample is enabled
|
||||
if($sd['enabled'] == 1) $dis = "disabled"; else $dis = false;// -> disable edit and delete if sample is enabled
|
||||
|
||||
$sql = "SELECT type, description
|
||||
FROM sample_var_type";
|
||||
$rd = $db->GetAll($sql);
|
||||
|
||||
$selected = "selected=\"selected\"";
|
||||
$sql = "SELECT sir.var_id,
|
||||
CONCAT('<input type=\"text\" onInput=\"$(this).attr(\'name\',\'var[',sir.var_id,']\');\" value=\"' ,sir.var, '\" required class=\"form-control\" style=\"min-width: 300px;\" $dis />') as var,
|
||||
CONCAT ('<select name=\"type[',sir.var_id,']\" class=\"form-control\" $dis >
|
||||
<option value=\"' ,svt.type, '\" $selected>' ,svt.description, '</option>";
|
||||
$selected = "selected=\"selected\"";
|
||||
|
||||
foreach($rd as $r)
|
||||
{
|
||||
$sql .= "<option value=\"{$r['type']}\">" . T_($r['description']) . "</option>";
|
||||
|
||||
@@ -136,9 +136,14 @@ xhtml_head(T_("Assign outcomes to cases"),true,$css,$js_head);//array("../css/ta
|
||||
|
||||
<?php
|
||||
$sql = "SELECT c.case_id as value, c.case_id as description, CASE WHEN c.case_id = '$case_id' THEN 'selected=\'selected\'' ELSE '' END AS selected
|
||||
FROM `case` as c, `outcome` as o
|
||||
FROM `case` AS c, `outcome` AS o, `questionnaire` AS q, `sample` AS s, `sample_import` AS si
|
||||
WHERE c.current_outcome_id = o.outcome_id
|
||||
AND o.outcome_type_id = 2";
|
||||
AND q.questionnaire_id = c.questionnaire_id
|
||||
AND s.sample_id = c.sample_id
|
||||
AND s.import_id = si.sample_import_id
|
||||
AND q.enabled = 1
|
||||
AND si.enabled =1
|
||||
AND o.outcome_type_id =2";
|
||||
|
||||
$rs = $db->GetAll($sql);
|
||||
|
||||
@@ -158,14 +163,14 @@ if (!empty($rs))
|
||||
</div><form method="get" action="?" class="form-inline ">
|
||||
<div class="modal-body">
|
||||
<?php
|
||||
$call_id = bigintval($_GET['call_id']);
|
||||
if (isset($_GET['call_id'])){ $call_id = bigintval($_GET['call_id']);
|
||||
$sql = "SELECT o.outcome_id as value,description, CASE WHEN o.outcome_id = c.outcome_id THEN 'selected=\'selected\'' ELSE '' END AS selected
|
||||
FROM outcome as o, `call` as c
|
||||
WHERE c.call_id = '$call_id'";
|
||||
$rs2 = $db->GetAll($sql);
|
||||
translate_array($rs2,array("description"));
|
||||
display_chooser($rs2, "set_outcome_id", "set_outcome_id",true,false,false,false); ?>
|
||||
<input type="hidden" name="call_id" value="<?php echo $call_id;?>"/><input type="hidden" name="case_id" value="<?php echo $case_id;?>"/>
|
||||
<input type="hidden" name="call_id" value="<?php echo $call_id;?>"/><input type="hidden" name="case_id" value="<?php echo $case_id;?>"/> <?php } ?>
|
||||
</div>
|
||||
<div class="modal-footer">
|
||||
<button type="button" class="btn btn-default" data-dismiss="modal"><?php echo T_("Cancel"); ?></button>
|
||||
@@ -506,15 +511,15 @@ if ($case_id != false)
|
||||
//Display all availability groups as checkboxes
|
||||
print "<form action='?' method='get' class='form-horizontal '>";
|
||||
print "<h5 class=''>" . T_("Select groups to limit availability (Selecting none means always available)") . "</h5><div class='col-sm-6'>";
|
||||
foreach ($rs as $r)
|
||||
foreach ($rs as $g)
|
||||
{
|
||||
$checked = "";
|
||||
|
||||
//if ($allselected || $r['availability_group_id'] == $r['selected_group_id'])
|
||||
if ($r['availability_group_id'] == $r['selected_group_id'])
|
||||
//if ($allselected || $g['availability_group_id'] == $g['selected_group_id'])
|
||||
if ($g['availability_group_id'] == $g['selected_group_id'])
|
||||
$checked = "checked='checked'";
|
||||
|
||||
print " <input type='checkbox' name='ag{$r['availability_group_id']}' id='ag{$r['availability_group_id']}' value='{$r['availability_group_id']}' $checked />  <label class='control-label' for='ag{$r['availability_group_id']}'>{$r['description']}</label></br>";
|
||||
print " <input type='checkbox' name='ag{$g['availability_group_id']}' id='ag{$g['availability_group_id']}' value='{$g['availability_group_id']}' $checked />  <label class='control-label' for='ag{$g['availability_group_id']}'>{$g['description']}</label></br>";
|
||||
}
|
||||
?> </div>
|
||||
<input type="hidden" name="case_id" value="<?php echo $case_id;?>"/>
|
||||
|
||||
@@ -101,13 +101,14 @@ else
|
||||
{
|
||||
xhtml_head(T_("Monitor system wide case sorting"),true,array("../include/bootstrap/css/bootstrap.min.css","../css/custom.css"));
|
||||
//print "<h2>" . T_("Monitor system wide case sorting") . "</h2>";
|
||||
print "<p><a href='?watch=watch'>" . T_("Click here to enable and begin system wide case sorting") . "</a></p>";
|
||||
print "<div class='well pull-right col-sm-4'><p>" . T_("System wide case sorting is periodically (via SYSTEM_SORT_MINUTES configuration directive) sorting cases on a system wide basis instead of finding the most appropriate case each time an operator requests a new case. This may increase performance where there are a large number of cases or complex quotas in place. If you are not experiencing any performance problems, it is not recommended to use this feature.") . "</p></div>";
|
||||
print "<h2>" . T_("Outcome of last process run (if any)") . "</h2>";
|
||||
print "<div class='col-sm-6'></br></br><a href='?watch=watch' class = 'btn btn-danger btn-lg'>" . T_("Click here to enable and begin system wide case sorting") . "</a></div>";
|
||||
print "<div class='well pull-right col-sm-6'><p>" . T_("System wide case sorting is periodically (via SYSTEM_SORT_MINUTES configuration directive) sorting cases on a system wide basis instead of finding the most appropriate case each time an operator requests a new case. This may increase performance where there are a large number of cases or complex quotas in place. If you are not experiencing any performance problems, it is not recommended to use this feature.") . "</p></div>";
|
||||
|
||||
$d = process_get_last_data(2);
|
||||
if ($d !== false)
|
||||
{
|
||||
xhtml_table($d,array('process_log_id','datetime','data'),array(T_("Log id"), T_("Date"), T_("Log entry")));
|
||||
print "<h2>" . T_("Outcome of last process run (if any)") . "</h2>";
|
||||
xhtml_table($d,array('process_log_id','datetime','data'),array(T_("Log id"), T_("Date"), T_("Log entry")));
|
||||
}
|
||||
}
|
||||
xhtml_foot();
|
||||
|
||||
@@ -106,7 +106,7 @@ $tzl = $db->GetAll($sql);
|
||||
|
||||
if (empty($tzl) || !$tzl)
|
||||
{
|
||||
print "<div class='alert alert-danger'>" . T_("Your database does not have timezones installed, please see here for details") . "<a href='http://dev.mysql.com/doc/mysql/en/time-zone-support.html'> ... </a></div>";
|
||||
print "<div class='alert alert-danger'>" . T_("Your database does not have timezones installed, please see here for details") . "<a href='http://dev.mysql.com/doc/mysql/en/time-zone-support.html'> ... </a></br>" .T_("or") . "</br>" . T_("Check that you have granted relevant permissions on 'time_zone_...' tables in database named 'mysql'.") . "</div>";
|
||||
}
|
||||
|
||||
print "<div class='col-sm-4 '><h3 class=''>" . T_("Default Timezone: ") . " <b class='text-primary'>$dtz</b></h3>";//<div class='panel-body'>
|
||||
|
||||
Reference in New Issue
Block a user