]> git.mjollnir.org Git - moodle.git/commitdiff
MDL-7861 various xhtml fixes and fixed layout of add activity/resource menu
authorskodak <skodak>
Thu, 4 Jan 2007 12:44:58 +0000 (12:44 +0000)
committerskodak <skodak>
Thu, 4 Jan 2007 12:44:58 +0000 (12:44 +0000)
blocks/admin_tree/block_admin_tree.php
blocks/search/block_search.php
blocks/search_forums/block_search_forums.php
course/lib.php
lib/weblib.php
theme/standard/styles_layout.css

index af544670b727880dc07746e6dccd29c251e7a3ce..e0b6fcdace1025ca62c7107ff8a5dc16bf43c41b 100644 (file)
@@ -195,10 +195,10 @@ class block_admin_tree extends block_base {
             $searchcontent = isset($CFG->adminsearchquery) ? $CFG->adminsearchquery : '';
 
             $this->content->footer = '<div class="adminsearchform">'.
-                                     '<form action="'.$CFG->wwwroot.'/admin/search.php" method="get">'.
+                                     '<form action="'.$CFG->wwwroot.'/admin/search.php" method="get"><div>'.
                                      '<label for="query" class="accesshide">'.get_string('searchinsettings', 'admin').'</label>'.
                                      '<input type="text" name="query" id="query" size="8" value="'.s($searchcontent).'" />'.
-                                     '<input type="submit" value="'.get_string('search').'" />'.
+                                     '<input type="submit" value="'.get_string('search').'" /></div>'.
                                      '</form></div>';
         } else {
             $this->content = new stdClass;
index 96b73ec2d799c616f7de811bcd68e3375ed142f9..f06d6c9d07f35695b3f41158c1ae61c6e4e352fb 100644 (file)
         
         //basic search form
         $this->content->text =
-            '<form name="query" method="get" action="'. $CFG->wwwroot .'/search/query.php">'
+            '<form name="query" method="get" action="'. $CFG->wwwroot .'/search/query.php"><div>'
           . '<label for="block_search_q">'. $label .'</label>'
           . '<input id="block_search_q" type="text" name="query_string" length="50" />'
           . '<input type="submit" value="'.$button.'" />'
-          . '</form>';
+          . '</div></form>';
       } else {
         $this->content->text = "Sorry folks, PHP 5 is needed for the new search module.";
       } //else
index de679ee13cb01249cdb2b97f2e1d428ce863f52f..0a76909e756efce41f620e3839d645a41b5554e5 100644 (file)
@@ -32,13 +32,13 @@ class block_search_forums extends block_base {
         $button = (isset($CFG->block_search_button)) ? $CFG->block_search_button : get_string('go');
         
         $this->content->text  = '<div class="searchform">';
-        $this->content->text .= '<form name="search" action="'.$CFG->wwwroot.'/mod/forum/search.php" style="display:inline">';
+        $this->content->text .= '<form name="search" action="'.$CFG->wwwroot.'/mod/forum/search.php" style="display:inline"><div>';
         $this->content->text .= '<input name="id" type="hidden" value="'.$this->instance->pageid.'" />';  // course
         $this->content->text .= '<input name="search" type="text" size="16" />';
         $this->content->text .= '<button type="submit" title="'.get_string('search').'">'.$button.'</button><br />'; 
         $this->content->text .= '<a href="'.$CFG->wwwroot.'/mod/forum/search.php?id='.$this->instance->pageid.'">'.$advancedsearch.'</a>';
         $this->content->text .= helpbutton('search', $advancedsearch, 'moodle', true, false, '', true);
-        $this->content->text .= '</form></div>';
+        $this->content->text .= '</div></form></div>';
 
         return $this->content;
     }
index d48807482759b5148281d74fc4de170e9f72c12c..9adf446a59636468bfcdaa85abcdb30b51b63212 100644 (file)
@@ -1484,24 +1484,24 @@ function print_section_add_menus($course, $section, $modnames, $vertical=false,
     $straddactivity = get_string('addactivity');
     $straddresource = get_string('addresource');
 
-    $output  = '<div class="section_add_menus" style="text-align: right">';
+    $output  = '<div class="section_add_menus">';
+
+    if (!$vertical) {
+        $output .= '<div class="horizontal">';
+    }
 
     if (!empty($resources)) {
         $output .= popup_form("$CFG->wwwroot/course/mod.php?id=$course->id&amp;section=$section&amp;sesskey=".sesskey()."&amp;add=",
                               $resources, "ressection$section", "", $straddresource, 'resource/types', $straddresource, true);
     }
 
-    if ($vertical) {
-        $output .= '<div>';
-    }
-
     if (!empty($activities)) {
         $output .= ' ';
         $output .= popup_form("$CFG->wwwroot/course/mod.php?id=$course->id&amp;section=$section&amp;sesskey=".sesskey()."&amp;add=",
                     $activities, "section$section", "", $straddactivity, 'mods', $straddactivity, true);
     }
 
-    if ($vertical) {
+    if (!$vertical) {
         $output .= '</div>';
     }
 
index 378cf3ff807308e06569b718c743b1121f11d99a..c42222cce9bb395dd4b68f6905ba1ace892b920f 100644 (file)
@@ -958,13 +958,18 @@ function popup_form($common, $options, $formid, $selected='', $nothing='choose',
 
     // changed reference to document.getElementById('id_abc') instead of document.abc
     // MDL-7861
-    $startoutput = '<form action="'.$CFG->wwwroot.'/course/jumpto.php"'.
+    $output = '<form action="'.$CFG->wwwroot.'/course/jumpto.php"'.
                         ' method="get"'.
                         $target.
                         ' id="'.$formid.'"'.
                         ' class="popupform">';
+    if ($help) {
+        $button = helpbutton($help, $helptext, 'moodle', true, false, '', true);
+    } else {
+        $button = '';
+    }
 
-    $output = '<div><select name="jump" onchange="'.$targetwindow.'.location=document.getElementById(\''.$formid.'\').jump.options[document.getElementById(\''.$formid.'\').jump.selectedIndex].value;">'."\n";
+    $output .= '<div>'.$button.'<select name="jump" onchange="'.$targetwindow.'.location=document.getElementById(\''.$formid.'\').jump.options[document.getElementById(\''.$formid.'\').jump.selectedIndex].value;">'."\n";
 
     if ($nothing != '') {
         $output .= "   <option value=\"javascript:void(0)\">$nothing</option>\n";
@@ -1047,16 +1052,10 @@ function popup_form($common, $options, $formid, $selected='', $nothing='choose',
                "\n//]]>\n".'</script>';
     $output .= '</form>' . "\n";
 
-    if ($help) {
-        $button = helpbutton($help, $helptext, 'moodle', true, false, '', true);
-    } else {
-        $button = '';
-    }
-
     if ($return) {
-        return $startoutput.$button.$output;
+        return $output;
     } else {
-        echo $startoutput.$button.$output;
+        echo $output;
     }
 }
 
@@ -3851,11 +3850,11 @@ function update_course_icon($courseid) {
             $target = ' target="'.$CFG->framename.'"';
         }
 
-        return "<form$target method=\"get\" action=\"$CFG->wwwroot/course/view.php\">".
+        return "<form$target method=\"get\" action=\"$CFG->wwwroot/course/view.php\"><div>".
             "<input type=\"hidden\" name=\"id\" value=\"$courseid\" />".
             "<input type=\"hidden\" name=\"edit\" value=\"$edit\" />".
             "<input type=\"hidden\" name=\"sesskey\" value=\"".sesskey()."\" />".
-            "<input type=\"submit\" value=\"$string\" /></form>";
+            "<input type=\"submit\" value=\"$string\" /></div></form>";
     }
 }
 
index 6a794fd1ed7f0268a4a5fa0e4500c9f7feff50ac..6e4062697b5c1a0afb8378618f46d509508edd78 100644 (file)
@@ -1187,6 +1187,15 @@ span.current {
   list-style: none;
 }
 
+.section_add_menus {
+  text-align:right;
+}
+
+.section_add_menus .horizontal div {
+  display:inline;
+}
+
+
 /*#course-view ul.section li.activity ul li,
 #site-index ul.section li.activity ul li {
   list-style: disc;