If there is no item in the group of destinations then don't the group name.
This commit is contained in:
parent
e19f459cd8
commit
07e884d494
|
|
@ -168,6 +168,7 @@ class destinations {
|
||||||
$text2 = $language2->get($_SESSION['domain']['language']['code'], 'app/'.$name);
|
$text2 = $language2->get($_SESSION['domain']['language']['code'], 'app/'.$name);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (count($row['result']['data']) > 0 and strlen($row['select_value'][$destination_type]) > 0) {
|
||||||
$response .= " <optgroup label='".$text2['title-'.$label]."'>\n";
|
$response .= " <optgroup label='".$text2['title-'.$label]."'>\n";
|
||||||
foreach ($row['result']['data'] as $data) {
|
foreach ($row['result']['data'] as $data) {
|
||||||
$select_value = $row['select_value'][$destination_type];
|
$select_value = $row['select_value'][$destination_type];
|
||||||
|
|
@ -195,6 +196,7 @@ class destinations {
|
||||||
$response .= " </optgroup>\n";
|
$response .= " </optgroup>\n";
|
||||||
unset($text);
|
unset($text);
|
||||||
}
|
}
|
||||||
|
}
|
||||||
$response .= " </select>\n";
|
$response .= " </select>\n";
|
||||||
if (if_group("superadmin")) {
|
if (if_group("superadmin")) {
|
||||||
$response .= "<input type='button' id='btn_select_to_input_".$destination_id."' class='btn' name='' alt='back' onclick='changeToInput".$destination_id."(document.getElementById(\"".$destination_id."\"));this.style.visibility = \"hidden\";' value='◁'>";
|
$response .= "<input type='button' id='btn_select_to_input_".$destination_id."' class='btn' name='' alt='back' onclick='changeToInput".$destination_id."(document.getElementById(\"".$destination_id."\"));this.style.visibility = \"hidden\";' value='◁'>";
|
||||||
|
|
@ -206,6 +208,7 @@ class destinations {
|
||||||
}
|
}
|
||||||
/*
|
/*
|
||||||
$obj = new destinations;
|
$obj = new destinations;
|
||||||
|
//$destinations = $obj->destinations;
|
||||||
echo $obj->select('ivr', 'example1', 'menu-exec-app:transfer 32 XML voip.fusionpbx.com');
|
echo $obj->select('ivr', 'example1', 'menu-exec-app:transfer 32 XML voip.fusionpbx.com');
|
||||||
echo $obj->select('ivr', 'example2', '');
|
echo $obj->select('ivr', 'example2', '');
|
||||||
echo $obj->select('ivr', 'example3', '');
|
echo $obj->select('ivr', 'example3', '');
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue