MDL-26037: import: display search box even when no courses are currently displayed
authorTony Levi <tony.levi@netspot.com.au>
Fri, 6 Jan 2012 05:28:08 +0000 (15:58 +1030)
committerEloy Lafuente (stronk7) <stronk7@moodle.org>
Thu, 1 Mar 2012 12:18:45 +0000 (13:18 +0100)
backup/util/ui/renderer.php

index 0845440..d6e2ff2 100644 (file)
@@ -568,6 +568,12 @@ class core_backup_renderer extends plugin_renderer_base {
         $output = html_writer::start_tag('div', array('class' => 'import-course-search'));
         if ($component->get_count() === 0) {
             $output .= $this->output->notification(get_string('nomatchingcourses', 'backup'));
+
+            $output .= html_writer::start_tag('div', array('class'=>'ics-search'));
+            $output .= html_writer::empty_tag('input', array('type'=>'text', 'name'=>restore_course_search::$VAR_SEARCH, 'value'=>$component->get_search()));
+            $output .= html_writer::empty_tag('input', array('type'=>'submit', 'name'=>'searchcourses', 'value'=>get_string('search')));
+            $output .= html_writer::end_tag('div');
+
             $output .= html_writer::end_tag('div');
             return $output;
         }