1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
|
<?php
$event_calendar_times = elgg_get_plugin_setting('times', 'event_calendar');
$event_calendar_hide_end = elgg_get_plugin_setting('hide_end', 'event_calendar');
$prefix = $vars['prefix'];
$body = '';
if ($event_calendar_times != 'no') {
if ($event_calendar_hide_end != 'yes') {
$body .= '<p><label>'.elgg_echo('event_calendar:from_label').'</label>';
}
$body .= elgg_view("event_calendar/input/date_local",array(
//'timestamp'=>TRUE,
'autocomplete'=>'off',
'class'=>'event-calendar-compressed-date',
'name' => 'start_date',
'value'=>$vars['start_date']));
$body .= '<span id="event-calendar-start-time-wrapper">';
$body .= elgg_view("input/timepicker",array('name' => 'start_time','value'=>$vars['start_time']));
$body .= '</span>';
if ($event_calendar_hide_end != 'yes') {
$body .= '</p><p id="event-calendar-to-time-wrapper"><label>'.elgg_echo('event_calendar:to_label').'</label>';
$body .= elgg_view("event_calendar/input/date_local",array(
//'timestamp'=>TRUE,
'autocomplete'=>'off',
'class'=>'event-calendar-compressed-date',
'name' => 'end_date',
'value'=>$vars['end_date'],
));
$body .= '<span id="event-calendar-end-time-wrapper">';
$body .= elgg_view("input/timepicker",array('name' => 'end_time','value'=>$vars['end_time']));
$body .= '</span>';
}
$body .= '</p></span>';
} else {
$body .= '<p><label>'.elgg_echo("event_calendar:start_date_label").'<br />';
$body .= elgg_view("event_calendar/input/date_local",array('timestamp'=>TRUE, 'autocomplete'=>'off','name' => 'start_date','value'=>$vars['start_date']));
$body .= '</label></p>';
$body .= '<p class="description">'.$prefix['start_date'].elgg_echo('event_calendar:start_date_description').'</p>';
if ($event_calendar_hide_end != 'yes') {
$body .= '<p id="event-calendar-to-time-wrapper"><label>'.elgg_echo("event_calendar:end_date_label").'<br />';
$body .= elgg_view("event_calendar/input/date_local",array('timestamp'=>TRUE,'autocomplete'=>'off','name' => 'end_date','value'=>$vars['end_date']));
$body .= '</label></p>';
//$body .= '<p class="description">'.$prefix['end_date'].elgg_echo('event_calendar:end_date_description').'</p>';
}
}
echo $body;
|