diff --git a/app/dialplan/dialplan_edit.php b/app/dialplan/dialplan_edit.php
index 81b8a9478c..558e0f3ca8 100644
--- a/app/dialplan/dialplan_edit.php
+++ b/app/dialplan/dialplan_edit.php
@@ -764,12 +764,14 @@ if (count($_POST) > 0 && strlen($_POST["persistformvar"]) == 0) {
} //end if update
+ echo "
\n";
echo "
| \n";
- echo $msg." "; - echo " |
| \n"; - -echo ""; - -echo " | \n"; -echo "
| \n";
+ echo $msg." "; + echo " |
| \n";
+echo " ".$text['title-time-condition-add']." \n"; +echo " | \n";
+echo " \n"; +echo " \n"; +echo " \n"; +echo " | \n"; +echo "
| \n"; +echo " \n"; +echo " ".$text['description-time-condition-add']."\n"; +echo " \n"; +echo " | \n"; +echo "|
| \n"; +echo " ".$text['label-name']."\n"; +echo " | \n"; +echo "\n";
+echo " \n";
+echo " \n"; +echo " ".$text['description-name']."\n"; +echo " \n"; +echo "\n"; +echo " | \n";
+echo "|||||||
| \n"; +echo " ".$text['label-extension']."\n"; +echo " | \n"; +echo "\n";
+echo " \n";
+echo " \n"; +echo " ".$text['description-extension']." \n"; +echo " | \n";
+echo "|||||||
| \n"; +echo " ".$text['label-conditions']."\n"; +echo " | \n"; +echo "\n";
+//define select box options for each time condition variable (where appropriate)
+for ($y = date('Y'); $y <= (date('Y') + 10); $y++) { $var_option_select['year'][$y] = $y; } //years
+for ($m = 1; $m <= 12; $m++) { $var_option_select['mon'][$m] = date('F', strtotime('2015-'.number_pad($m,2).'-01')); } //month names
+for ($d = 1; $d <= 366; $d++) { $var_option_select['yday'][$d] = $d; } //days of year
+for ($d = 1; $d <= 31; $d++) { $var_option_select['mday'][$d] = $d; } //days of month
+for ($d = 1; $d <= 7; $d++) { $var_option_select['wday'][$d] = date('l', strtotime('Sunday +'.($d-1).' days')); } //week days
+for ($w = 1; $w <= 53; $w++) { $var_option_select['week'][$w] = $w; } //weeks of year
+for ($w = 1; $w <= 5; $w++) { $var_option_select['mweek'][$w] = $w; } //weeks of month
+for ($h = 0; $h <= 23; $h++) { $var_option_select['hour'][$h] = (($h) ? (($h >= 12) ? (($h == 12) ? $h : ($h-12)).' PM' : $h.' AM') : '12 AM'); } //hours of day
+for ($m = 0; $m <= 59; $m++) { $var_option_select['minute'][$m] = number_pad($m,2); } //minutes of hour
+//output condition fields
+echo "
\n"; +echo " | \n";
+echo "|||||||
| \n"; +echo " ".$text['label-presets']."\n"; +echo " | \n"; +echo "\n";
+foreach ($_SESSION['time_conditions']['preset'] as $json) {
+ $presets[] = json_decode($json, true);
+}
+//echo ""; print_r($presets); echo "
\n"; +echo " ".$text['description-presets']." \n"; +echo " | \n";
+echo "|||||||
| \n"; +echo " ".$text['label-action']."\n"; +echo " | \n"; +echo "\n"; +//switch_select_destination(select_type, select_label, select_name, select_value, select_style, $action); +switch_select_destination("dialplan", $action_1, "action_1", $action_1, "", ""); +echo " | \n"; +echo "|||||||
| \n"; +echo " ".$text['label-action-alternate']."\n"; +echo " | \n"; +echo "\n"; +//switch_select_destination(select_type, select_label, select_name, select_value, select_style, $action); +switch_select_destination("dialplan", $anti_action_1, "anti_action_1", $anti_action_1, "", ""); +echo " \n"; +echo " | \n"; +echo "|||||||
| \n"; +echo " ".$text['label-order']."\n"; +echo " | \n"; +echo "\n";
+echo " \n";
+echo " \n"; +echo " | \n";
+echo "|||||||
| \n"; +echo " ".$text['label-enabled']."\n"; +echo " | \n"; +echo "\n";
+echo " \n";
+echo " \n"; +echo "\n"; +echo " | \n";
+echo "|||||||
| \n"; +echo " ".$text['label-description']."\n"; +echo " | \n"; +echo "\n";
+echo " \n";
+echo " \n"; +echo "\n"; +echo " | \n";
+echo "|||||||