diff options
Diffstat (limited to 'mod/logbrowser')
-rw-r--r-- | mod/logbrowser/views/default/logbrowser/form.php | 96 |
1 files changed, 48 insertions, 48 deletions
diff --git a/mod/logbrowser/views/default/logbrowser/form.php b/mod/logbrowser/views/default/logbrowser/form.php index b09fd79dd..d2476afac 100644 --- a/mod/logbrowser/views/default/logbrowser/form.php +++ b/mod/logbrowser/views/default/logbrowser/form.php @@ -9,56 +9,59 @@ <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 = ""; + } + - 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:user'); - $form .= elgg_view('input/text', array( - 'name' => 'search_username', - 'value' => $userval, - )) . "</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'), + )); - $form .= "<p>" . elgg_echo('logbrowser:starttime'); - $form .= elgg_view('input/text', array( - 'name' => 'timelower', - 'value' => $lowerval, - )) . "</p>"; + //@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, + )); - $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, - )); + $toggle_link = elgg_view('output/url', array( + 'href' => '#log-browser-search-form', + 'text' => elgg_echo('logbrowser:search'), + 'class' => 'elgg-toggler', + )); ?> - <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> @@ -68,9 +71,6 @@ </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> + <?php echo $toggle_link; ?> </p> </div>
\ No newline at end of file |