aboutsummaryrefslogtreecommitdiff
path: root/views/default/input/timepicker_old.php
diff options
context:
space:
mode:
authorKevin Jardine <kevinjardine@yahoo.com>2012-03-19 17:09:30 +0100
committerKevin Jardine <kevinjardine@yahoo.com>2012-03-19 17:09:30 +0100
commit2d19bfa232be5eff43bb6c1d1eef12e681552956 (patch)
treed956a896521dfa64f70bc79686d28892ccc0e90e /views/default/input/timepicker_old.php
parent978d6aa6283933c805622d4d24fa6068833f7817 (diff)
downloadelgg-2d19bfa232be5eff43bb6c1d1eef12e681552956.tar.gz
elgg-2d19bfa232be5eff43bb6c1d1eef12e681552956.tar.bz2
full calendar click to view, time system revamp
Diffstat (limited to 'views/default/input/timepicker_old.php')
-rw-r--r--views/default/input/timepicker_old.php38
1 files changed, 38 insertions, 0 deletions
diff --git a/views/default/input/timepicker_old.php b/views/default/input/timepicker_old.php
new file mode 100644
index 000000000..1d2156cda
--- /dev/null
+++ b/views/default/input/timepicker_old.php
@@ -0,0 +1,38 @@
+<?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);
+
+ // add 1 to avoid pulldown 0 bug
+ $hour++;
+ $minute++;
+} else {
+ $hour = '-';
+ $minute = '-';
+}
+
+$hours = array();
+$hours['-'] = '-';
+
+for($i=0;$i<$time_format;$i++) {
+ $hours[$i+1] = $i;
+}
+
+$minutes = array();
+$minutes['-'] = '-';
+
+for($i=0;$i<60;$i=$i+15) {
+ $minutes[$i+1] = sprintf("%02d",$i);
+}
+
+echo elgg_view('input/dropdown',array('name'=>$vars['name'].'_h','value'=>$hour,'options_values'=>$hours));
+echo elgg_view('input/dropdown',array('name'=>$vars['name'].'_m','value'=>$minute,'options_values'=>$minutes));
+
+?> \ No newline at end of file