Resolved duplicate id issue MDL-8410

This commit is contained in:
moodler 2007-02-05 07:58:29 +00:00
parent 378ef1fe98
commit 1e0fb1054c
2 changed files with 13 additions and 3 deletions

View File

@ -1891,17 +1891,26 @@ function print_my_moodle() {
function print_course_search($value="", $return=false, $format="plain") {
global $CFG;
static $count = 0;
$count++;
$id = 'coursesearch';
if ($count > 1) {
$id .= $count;
}
$strsearchcourses= get_string("searchcourses");
if ($format == 'plain') {
$output = '<form id="coursesearch" action="'.$CFG->wwwroot.'/course/search.php" method="get">';
$output = '<form id="'.$id.'" action="'.$CFG->wwwroot.'/course/search.php" method="get">';
$output .= '<fieldset class="coursesearchbox invisiblefieldset">';
$output .= '<input type="text" size="30" name="search" alt="'.s($strsearchcourses).'" value="'.s($value, true).'" />';
$output .= '<input type="submit" value="'.s($strsearchcourses).'" />';
$output .= '</fieldset></form>';
} else if ($format == 'short') {
$output = '<form id="coursesearch" action="'.$CFG->wwwroot.'/course/search.php" method="get">';
$output = '<form id="'.$id.'" action="'.$CFG->wwwroot.'/course/search.php" method="get">';
$output .= '<fieldset class="coursesearchbox invisiblefieldset">';
$output .= '<input type="text" size="12" name="search" alt="'.s($strsearchcourses).'" value="'.s($value, true).'" />';
$output .= '<input type="submit" value="'.s($strsearchcourses).'" />';

View File

@ -1591,7 +1591,8 @@ body#course-index .addcategory {
padding-bottom:10px;
}
#coursesearch {
#coursesearch,
#coursesearch2 {
text-align:center;
}