From 4744de1a17b85e337cf6a3dd915328fc1e777e4c Mon Sep 17 00:00:00 2001 From: Alex Date: Sun, 20 Sep 2015 15:01:20 +0300 Subject: [PATCH] fix missing variable in extensionstatus.php set new created operators to have "normal" skills (1 and 5), removed initial operator skills setup on create to avoid mismatch with operatorskills.php, hide chat setup parameters if disabled, filter extension assign if Freepbx location is not set and hide setup parameters if uses_voip = off --- admin/extensionstatus.php | 43 +++++++------ admin/operatorlist.php | 98 +++++++++++++++++------------- admin/operators.php | 123 ++++++++++++++++++-------------------- 3 files changed, 137 insertions(+), 127 deletions(-) diff --git a/admin/extensionstatus.php b/admin/extensionstatus.php index c2e0c82a..baf4c0a5 100644 --- a/admin/extensionstatus.php +++ b/admin/extensionstatus.php @@ -185,41 +185,43 @@ if (isset($_GET['edit']) || isset($_GET['addext'])) WHERE extension_id = " . intval($_GET['edit']); $rs = $db->GetRow($sql); - } else $rs = array(); - - print "" . T_("Go back") . ""; + } + ?>
-

+

- - " maxlength="12" required value="" class="form-control"/> + + " maxlength="12" required value="" class="form-control"/>
- - "/>    + + "/>  " class="btn btn-default fa" /> 
-
- " /> -
+
+
+ +
+ + " /> - - " /> + + " />
" . T_("Unassign the operator from this extension to be able to delete it") . ""; } - print "
"; + print "
"; } else { @@ -241,8 +243,10 @@ else $rs = $db->GetAll($sql); + print "
"; + if ($msg != "") - print "

$msg

"; + print "

$msg


"; if (!empty($rs)) { @@ -258,14 +262,15 @@ else if ($rs[$i]['assignment'] == "list") $rs[$i]['assignment'] = display_chooser($ers,"operator_id_" . $rs[$i]["extension_id"],"operator_id_" . $rs[$i]["extension_id"],true,"extension_id=".$rs[$i]["extension_id"],true,false,false,false); } - print "
"; + xhtml_table($rs,array("extension","firstName","assignment","status","case_id","state","calltime"),array(T_("Extension"),T_("Operator"),T_("Assignment"),T_("VoIP Status"),T_("Case ID"),T_("Call state"),T_("Time on call")),"tclass",array("vs" => "1")); - print "
"; + print "
"; } else - print "

" . T_("No extensions") . "

"; + print "

" . T_("No extensions") . "

"; - print ""; + print "" . T_("Add extension") . " +
"; } diff --git a/admin/operatorlist.php b/admin/operatorlist.php index 3be9ddf5..16821cbc 100644 --- a/admin/operatorlist.php +++ b/admin/operatorlist.php @@ -195,7 +195,7 @@ function generate() { } -
+
" . T_("Operator") . ": " . $rs['username'] . ""; echo "
"; @@ -213,78 +213,92 @@ function generate() { ?>
- -
+ +
- -
"/>
-
  + +
"/>
+
" class="btn btn-default"/> 
- -
+ +
- -
+ +
- -
+ +
- -
-
+ +
+
-
- -
-
- - + + +
+ +
" data-off="" value="1" />
+
+