mirror of
https://github.com/fusionpbx/fusionpbx.git
synced 2025-12-30 00:53:50 +00:00
Update time_condition_edit.php (#7680)
This commit is contained in:
@@ -815,14 +815,12 @@
|
||||
|
||||
case 'hour': //hours of day
|
||||
<?php
|
||||
if ($time_format == '24h') {
|
||||
if ($settings->get('domain', 'time_format') == '24h') {
|
||||
for ($h = 0; $h <= 23; $h++) {
|
||||
echo "sel_start.options[sel_start.options.length] = new Option(".$h.", ".$h.");\n";
|
||||
echo "sel_stop.options[sel_stop.options.length] = new Option(".$h.", ".$h.");\n";
|
||||
}
|
||||
|
||||
} else {
|
||||
|
||||
for ($h = 0; $h <= 23; $h++) {
|
||||
echo "sel_start.options[sel_start.options.length] = new Option(((".$h." != 0) ? ((".$h." >= 12) ? ((".$h." == 12) ? ".$h." : (".$h." - 12)) + ' PM' : ".$h." + ' AM') : '12 AM'), ".$h.");\n";
|
||||
echo "sel_stop.options[sel_stop.options.length] = new Option(((".$h." != 0) ? ((".$h." >= 12) ? ((".$h." == 12) ? ".$h." : (".$h." - 12)) + ' PM' : ".$h." + ' AM') : '12 AM'), ".$h.");\n";
|
||||
@@ -833,7 +831,7 @@
|
||||
|
||||
case 'time-of-day': //time of day
|
||||
<?php
|
||||
if ($time_format == '24h') {
|
||||
if ($settings->get('domain', 'time_format') == '24h') {
|
||||
for ($h = 0; $h <= 23; $h++) {
|
||||
for ($m = 0; $m <= 59; $m++) {
|
||||
echo "sel_start.options[sel_start.options.length] = new Option(('0'+'".$h."').slice(-2)+':'+('0'+'".$m."').slice(-2),pad('".$h."', 2) + ':' + pad(".$m.", 2));\n";
|
||||
|
||||
Reference in New Issue
Block a user