Only show search box when there is content in the block
This commit is contained in:
@@ -182,18 +182,19 @@ class block_admin_tree extends block_base {
|
||||
$this->content->text .= $this->expandjavascript;
|
||||
|
||||
$this->content->text .= '</script>' . "\n";
|
||||
|
||||
$searchcontent = isset($CFG->adminsearchquery) ? $CFG->adminsearchquery : '';
|
||||
|
||||
$this->content->footer = '<div class="adminsearchform">'.
|
||||
'<form action="'.$CFG->wwwroot.'/admin/search.php" method="get">'.
|
||||
'<input type="text" name="query" size="8" value="'.$searchcontent.'" />'.
|
||||
'<input type="submit" value="'.get_string('search').'" />'.
|
||||
'</form></div>';
|
||||
} else {
|
||||
$this->content = new stdClass;
|
||||
$this->content->text = '';
|
||||
}
|
||||
|
||||
$searchcontent = isset($CFG->adminsearchquery) ? $CFG->adminsearchquery : '';
|
||||
|
||||
$this->content->footer = '<div class="adminsearchform">'.
|
||||
'<form action="'.$CFG->wwwroot.'/admin/search.php" method="get">'.
|
||||
'<input type="text" name="query" size="8" value="'.$searchcontent.'" />'.
|
||||
'<input type="submit" value="'.get_string('search').'" />'.
|
||||
'</form></div>';
|
||||
return $this->content;
|
||||
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user