aboutsummaryrefslogtreecommitdiff
path: root/views/default/input/timepicker.php
diff options
context:
space:
mode:
Diffstat (limited to 'views/default/input/timepicker.php')
-rw-r--r--views/default/input/timepicker.php51
1 files changed, 0 insertions, 51 deletions
diff --git a/views/default/input/timepicker.php b/views/default/input/timepicker.php
deleted file mode 100644
index 2cc95ced7..000000000
--- a/views/default/input/timepicker.php
+++ /dev/null
@@ -1,51 +0,0 @@
-<?php
-$time_format = elgg_get_plugin_setting('timeformat', 'event_calendar');
-if (!$time_format) {
- $time_format = '24';
-}
-
-$value = $vars['value'];
-if (is_numeric($value)) {
- $hour = floor($value/60);
- $minute = ($value -60*$hour);
-} else {
- $hour = 0;
- $minute = 0;
-}
-
-$hours = array();
-$minutes = array();
-
-if ($time_format == '12') {
- $meridians = array('am'=>'am','pm'=>'pm');
- if ($hour == 0) {
- $hour = 12;
- $meridian = 'am';
- } else if ($hour == 12) {
- $meridian = 'pm';
- } else if ($hour < 12) {
- $meridian = 'am';
- } else {
- $hour -= 12;
- $meridian = 'pm';
- }
- for($h=1;$h<=12;$h++) {
- $hours[$h] = $h;
- }
-} else {
- for($h=0;$h<=23;$h++) {
- $hours[$h] = $h;
- }
-}
-
-for($m=0;$m<60;$m=$m+5) {
- $mt = sprintf("%02d",$m);
- $minutes[$m] = $mt;
-}
-
-echo elgg_view('input/dropdown',array('name'=>$vars['name'].'_hour','value'=>$hour,'options_values'=>$hours));
-echo " <b>:</b> ";
-echo elgg_view('input/dropdown',array('name'=>$vars['name'].'_minute','value'=>$minute,'options_values'=>$minutes));
-if ($time_format == '12') {
- echo elgg_view('input/dropdown',array('name'=>$vars['name'].'_meridian','value'=>$meridian,'options_values'=>$meridians));
-}