If there is no item in the group of destinations then don't the group name.
This commit is contained in:
parent
ebe536c66d
commit
c0a0cb308b
|
|
@ -168,6 +168,7 @@ class destinations {
|
|||
$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";
|
||||
foreach ($row['result']['data'] as $data) {
|
||||
$select_value = $row['select_value'][$destination_type];
|
||||
|
|
@ -195,6 +196,7 @@ class destinations {
|
|||
$response .= " </optgroup>\n";
|
||||
unset($text);
|
||||
}
|
||||
}
|
||||
$response .= " </select>\n";
|
||||
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='◁'>";
|
||||
|
|
@ -206,6 +208,7 @@ class 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', 'example2', '');
|
||||
echo $obj->select('ivr', 'example3', '');
|
||||
|
|
|
|||
Loading…
Reference in New Issue