Ability to order the time conditions
This commit is contained in:
parent
49fcc5e8d9
commit
d90b080913
|
|
@ -70,6 +70,8 @@ require_once "resources/header.php";
|
|||
|
||||
$dialplan_enabled = check_str($_POST["dialplan_enabled"]);
|
||||
$dialplan_description = check_str($_POST["dialplan_description"]);
|
||||
|
||||
|
||||
}
|
||||
|
||||
if (count($_POST) > 0 && strlen($_POST["persistformvar"]) == 0) {
|
||||
|
|
@ -248,7 +250,17 @@ require_once "resources/header.php";
|
|||
$is_preset = (in_array($group_id, $_REQUEST['preset'])) ? true : false;
|
||||
|
||||
//set group and order number
|
||||
|
||||
$dialplan_detail_group_user = check_str($_POST["group_$group_id"]);
|
||||
|
||||
if($dialplan_detail_group_user!='') {
|
||||
$dialplan_detail_group = $dialplan_detail_group_user;
|
||||
} else {
|
||||
$dialplan_detail_group = $group_id;
|
||||
}
|
||||
|
||||
|
||||
|
||||
$dialplan_detail_order = 0;
|
||||
|
||||
foreach ($conditions as $cond_num => $cond_var) {
|
||||
|
|
@ -291,6 +303,7 @@ require_once "resources/header.php";
|
|||
}
|
||||
|
||||
//add condition to query string
|
||||
|
||||
$dialplan_detail_order += 10;
|
||||
$sql .= ", ( ";
|
||||
$sql .= "'".$domain_uuid."', ";
|
||||
|
|
@ -362,6 +375,11 @@ require_once "resources/header.php";
|
|||
$dialplan_action_data = '';
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
//add group action to query
|
||||
$dialplan_detail_order += 10;
|
||||
$sql .= ", ( ";
|
||||
|
|
@ -505,6 +523,7 @@ require_once "resources/header.php";
|
|||
$prep_statement->execute();
|
||||
$result = $prep_statement->fetchAll(PDO::FETCH_NAMED);
|
||||
$result_count = count($result);
|
||||
|
||||
unset ($prep_statement, $sql);
|
||||
|
||||
//load current conditions into array (combined by group), and retrieve action and anti-action
|
||||
|
|
@ -846,12 +865,23 @@ function add_custom_condition($destination, $group_id, $dialplan_action = '') {
|
|||
echo " <tr>";
|
||||
echo " <td colspan='4' style='white-space: nowrap;' id='group_".$group_id."'></td>";
|
||||
echo " </tr>";
|
||||
echo " </tr>";
|
||||
echo " <td class='vtable' style='width: 108px;'>".$text['label-destination']."</td>\n";
|
||||
echo " </tr>";
|
||||
echo " <tr>";
|
||||
echo " <td colspan='4' style='padding-top: 10px;'>";
|
||||
//$destination = new destinations;
|
||||
echo $destination->select('dialplan', 'dialplan_action['.$group_id.']', $dialplan_action);
|
||||
echo " </td>";
|
||||
echo " </tr>";
|
||||
echo " <td class='vtable' style='width: 108px;'>".$text['label-group']."</td>\n";
|
||||
echo " </tr>";
|
||||
|
||||
echo " </tr>";
|
||||
echo " <td><input class='formfld' type='text' name='group_".$group_id."' id='group_".$group_id."' maxlength='255' value=\"".$group_id."\"></td>\n";
|
||||
echo " </tr>";
|
||||
|
||||
|
||||
echo " </table>";
|
||||
echo " <br />";
|
||||
echo " ".$text['description-settings'];
|
||||
|
|
|
|||
Loading…
Reference in New Issue