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
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
|
<?php
/**
* Log browser search form
*
* @package ElggLogBrowser
*/
?>
<div id="logbrowser-search-area">
<?php
// Time lower limit
if ($vars['timelower']) {
$lowerval = date('r',$vars['timelower']);
} else {
$lowerval = "";
}
if ($vars['timeupper']) {
$upperval = date('r',$vars['timeupper']);
} else {
$upperval = "";
}
if ($vars['user_guid']) {
if ($user = get_entity($vars['user_guid']))
$userval = $user->username;
} else {
$userval = "";
}
$form = "<p>" . elgg_echo('logbrowser:user');
$form .= elgg_view('input/text', array(
'name' => 'search_username',
'value' => $userval,
)) . "</p>";
$form .= "<p>" . elgg_echo('logbrowser:starttime');
$form .= elgg_view('input/text', array(
'name' => 'timelower',
'value' => $lowerval,
)) . "</p>";
$form .= "<p>" . elgg_echo('logbrowser:endtime');
$form .= elgg_view('input/text', array(
'name' => 'timeupper',
'value' => $upperval,
)) . "</p>";
$form .= elgg_view('input/submit', array(
'value' => elgg_echo('search'),
));
//@todo Forms 1.8: Convert to use elgg_view_form()
$wrappedform = elgg_view('input/form', array(
'body' => $form,
'method' => 'get',
'action' => "admin/overview/logbrowser",
'disable_security' => true,
));
?>
<div id="log-browser-search-form" class="elgg-module elgg-module-inline hidden">
<div class="elgg-head">
<h3><?php echo elgg_echo('logbrowser:search'); ?></h3>
</div>
<div class="elgg-body">
<?php echo $wrappedform; ?>
</div>
</div>
<p>
<?php //@todo JS 1.8: no ?>
<a class="link" href="#" onclick="elgg_slide_toggle(this,'#logbrowser-search-area','#log-browser-search-form');">
<?php echo elgg_echo('logbrowser:search'); ?>
</a>
</p>
</div>
|