]> git.mjollnir.org Git - moodle.git/commitdiff
Updates for better CSS hooks
authormoodler <moodler>
Mon, 25 Sep 2006 08:20:14 +0000 (08:20 +0000)
committermoodler <moodler>
Mon, 25 Sep 2006 08:20:14 +0000 (08:20 +0000)
admin/settings.php
lib/adminlib.php
lib/weblib.php
theme/standard/styles_layout.css

index b17bbf56198b9ef4d3cf207134af1a661e40964e..d9647c2163c1c0d256b5ebb2f969fb336f2cbf49 100644 (file)
@@ -113,7 +113,7 @@ print_heading($root->visiblename);
 
 echo $root->output_html();
 
-echo '<center><input type="submit" value="' . get_string('savechanges','admin') . '" /></center>';
+echo '<center><input class="form-submit" type="submit" value="' . get_string('savechanges','admin') . '" /></center>';
 
 echo '</form>';
 
index 53d1d3d30ac7dd4a30e2004591ce14c881511cb8..49c72b85471e7f941a91dc424d5f7d5bcd58961e 100644 (file)
@@ -1340,7 +1340,7 @@ class admin_setting_configtext extends admin_setting {
             $current = $this->get_setting();
         }
         return format_admin_setting('text', $this->name, $this->visiblename, 
-                '<input type="text" size="50" id="id_s_'.$this->name.'" name="s_'.$this->name.'" value="'.$current.'" />', 
+                '<input type="text" size="50" class="form-text" class="form-text" id="id_s_'.$this->name.'" name="s_'.$this->name.'" value="'.$current.'" />', 
                 $this->description);
     }
 
@@ -1372,7 +1372,7 @@ class admin_setting_configcheckbox extends admin_setting {
             $current = $this->get_setting();
         }
         return format_admin_setting('checkbox', $this->name, $this->visiblename, 
-                '<input type="checkbox" size="50" id="id_s_'.$this->name.'" name="s_'. $this->name .'" value="1" ' . ($current == true ? 'checked="checked"' : '') . ' />',
+                '<input type="checkbox" size="50" class="form-checkbox" id="id_s_'.$this->name.'" name="s_'. $this->name .'" value="1" ' . ($current == true ? 'checked="checked"' : '') . ' />',
                 $this->description);
     }
 
@@ -1408,7 +1408,7 @@ class admin_setting_configselect extends admin_setting {
         } else {
             $current = $this->get_setting();
         }
-        $return = '<select id="id_s_'.$this->name.'" name="s_' . $this->name .'">';
+        $return = '<select class="form-select" id="id_s_'.$this->name.'" name="s_' . $this->name .'">';
         foreach ($this->choices as $key => $value) {
             $return .= '<option value="'.$key.'"'.($key==$current ? ' selected="selected"' : '').'>'.$value.'</option>';
         }
@@ -1460,11 +1460,11 @@ class admin_setting_configtime extends admin_setting {
         } else {
           $currentsetting = $this->get_setting();
         }
-        $return = '<select id="id_s_'.$this->name.'h" name="s_' . $this->name .'[h]">';
+        $return = '<select class="form-select" id="id_s_'.$this->name.'h" name="s_' . $this->name .'[h]">';
         foreach ($this->choices as $key => $value) {
             $return .= '<option value="' . $key . '"' . ($key == $currentsetting['h'] ? ' selected="selected"' : '') . '>' . $value . '</option>';
         }
-        $return .= '</select>&nbsp;&nbsp;&nbsp;<select id="id_s_'.$this->name.'m" name="s_' . $this->name . '[m]">';
+        $return .= '</select>&nbsp;&nbsp;&nbsp;<select class="form-select" id="id_s_'.$this->name.'m" name="s_' . $this->name . '[m]">';
         foreach ($this->choices2 as $key => $value) {
             $return .= '<option value="' . $key . '"' . ($key == $currentsetting['m'] ? ' selected="selected"' : '') . '>' . $value . '</option>';
         }
@@ -1501,7 +1501,7 @@ class admin_setting_configmultiselect extends admin_setting_configselect {
         } else {
           $currentsetting = $this->get_setting();
         }
-        $return = '<select id="id_s_'.$this->name.'" name="s_' . $this->name .'[]" size="10" multiple="multiple">';
+        $return = '<select class="form-select" id="id_s_'.$this->name.'" name="s_' . $this->name .'[]" size="10" multiple="multiple">';
         foreach ($this->choices as $key => $value) {
             $return .= '<option value="' . $key . '"' . (in_array($key,$currentsetting) ? ' selected="selected"' : '') . '>' . $value . '</option>';
         }
@@ -1610,7 +1610,7 @@ class admin_setting_courselist_frontpage extends admin_setting_configselect {
         }
         $return = '';
         for ($i = 0; $i < count($this->choices) - 1; $i++) {
-            $return .='<select id="id_s_'.$this->name.'" name="s_' . $this->name .'[]">';
+            $return .='<select class="form-select" id="id_s_'.$this->name.'" name="s_' . $this->name .'[]">';
             foreach ($this->choices as $key => $value) {
                 $return .= '<option value="' . $key . '"' . ($key == $currentsetting[$i] ? ' selected="selected"' : '') . '>' . $value . '</option>';
             }
@@ -1828,16 +1828,16 @@ class admin_setting_special_editorfontlist extends admin_setting {
 
         $return = '';
         for ($i = 0; $i < count($currentsetting) / 2; $i++) {
-            $return .= '<input type="text" name="s_editorfontlist[k' . $i . ']" value="' . $currentsetting['k' . $i] . '" size="20" />';
+            $return .= '<input type="text" class="form-text" name="s_editorfontlist[k' . $i . ']" value="' . $currentsetting['k' . $i] . '" size="20" />';
             $return .= '&nbsp;&nbsp;';
-            $return .= '<input type="text" name="s_editorfontlist[v' . $i . ']" value="' . $currentsetting['v' . $i] . '" size="40" /><br />';
+            $return .= '<input type="text" class="form-text" name="s_editorfontlist[v' . $i . ']" value="' . $currentsetting['v' . $i] . '" size="40" /><br />';
         }
-        $return .= '<input type="text" name="s_editorfontlist[k' . $i . ']" value="" size="20" />';
+        $return .= '<input type="text" class="form-text" name="s_editorfontlist[k' . $i . ']" value="" size="20" />';
         $return .= '&nbsp;&nbsp;';
-        $return .= '<input type="text" name="s_editorfontlist[v' . $i . ']" value="" size="40" /><br />';
-        $return .= '<input type="text" name="s_editorfontlist[k' . ($i + 1) . ']" value="" size="20" />';
+        $return .= '<input type="text" class="form-text" name="s_editorfontlist[v' . $i . ']" value="" size="40" /><br />';
+        $return .= '<input type="text" class="form-text" name="s_editorfontlist[k' . ($i + 1) . ']" value="" size="20" />';
         $return .= '&nbsp;&nbsp;';
-        $return .= '<input type="text" name="s_editorfontlist[v' . ($i + 1) . ']" value="" size="40" />';
+        $return .= '<input type="text" class="form-text" name="s_editorfontlist[v' . ($i + 1) . ']" value="" size="40" />';
 
         return format_admin_setting('editorfontlist', $this->name, $this->visiblename, $return, $this->description);
     }
@@ -2013,7 +2013,7 @@ class admin_setting_special_editorhidebuttons extends admin_setting {
             }
 
             $return .= ($value == '' ? get_string($key,'editor') : '<img width="18" height="18" src="' . $CFG->wwwroot . '/lib/editor/htmlarea/images/' . $value . '" alt="' . get_string($key,'editor') . '" title="' . get_string($key,'editor') . '" />') . '&nbsp;';
-            $return .= '<input type="checkbox" value="1" id="id_s_'.$this->name.$key.'" name="s_' . $this->name . '[' . $key . ']"' . (in_array($key,$currentsetting) ? ' checked="checked"' : '') . ' />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;';
+            $return .= '<input type="checkbox" class="form-checkbox" value="1" id="id_s_'.$this->name.$key.'" name="s_' . $this->name . '[' . $key . ']"' . (in_array($key,$currentsetting) ? ' checked="checked"' : '') . ' />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;';
             $count++;
             if ($count % 15 != 0) {
                 $return .= '<br /><br />';
@@ -2165,13 +2165,13 @@ class admin_setting_special_backupdays extends admin_setting {
         get_string('monday', 'calendar') . '&nbsp;&nbsp;</div></td><td><div align="center">&nbsp;&nbsp;' . get_string('tuesday', 'calendar') . '&nbsp;&nbsp;</div></td><td><div align="center">&nbsp;&nbsp;' .
         get_string('wednesday', 'calendar') . '&nbsp;&nbsp;</div></td><td><div align="center">&nbsp;&nbsp;' . get_string('thursday', 'calendar') . '&nbsp;&nbsp;</div></td><td><div align="center">&nbsp;&nbsp;' .
         get_string('friday', 'calendar') . '&nbsp;&nbsp;</div></td><td><div align="center">&nbsp;&nbsp;' . get_string('saturday', 'calendar') . '&nbsp;&nbsp;</div></td></tr><tr>' .
-        '<td><div align="center"><input type="checkbox" id="id_s_'.$this->name.'u" name="s_'. $this->name .'[u]" value="1" ' . (substr($currentsetting,0,1) == '1' ? 'checked="checked"' : '') . ' /></div></td>' .
-        '<td><div align="center"><input type="checkbox" id="id_s_'.$this->name.'m" name="s_'. $this->name .'[m]" value="1" ' . (substr($currentsetting,1,1) == '1' ? 'checked="checked"' : '') . ' /></div></td>' .
-        '<td><div align="center"><input type="checkbox" id="id_s_'.$this->name.'t" name="s_'. $this->name .'[t]" value="1" ' . (substr($currentsetting,2,1) == '1' ? 'checked="checked"' : '') . ' /></div></td>' .
-        '<td><div align="center"><input type="checkbox" id="id_s_'.$this->name.'w" name="s_'. $this->name .'[w]" value="1" ' . (substr($currentsetting,3,1) == '1' ? 'checked="checked"' : '') . ' /></div></td>' .
-        '<td><div align="center"><input type="checkbox" id="id_s_'.$this->name.'r" name="s_'. $this->name .'[r]" value="1" ' . (substr($currentsetting,4,1) == '1' ? 'checked="checked"' : '') . ' /></div></td>' .
-        '<td><div align="center"><input type="checkbox" id="id_s_'.$this->name.'f" name="s_'. $this->name .'[f]" value="1" ' . (substr($currentsetting,5,1) == '1' ? 'checked="checked"' : '') . ' /></div></td>' .
-        '<td><div align="center"><input type="checkbox" id="id_s_'.$this->name.'s" name="s_'. $this->name .'[s]" value="1" ' . (substr($currentsetting,6,1) == '1' ? 'checked="checked"' : '') . ' /></div></td>' .
+        '<td><div align="center"><input type="checkbox" class="form-checkbox" id="id_s_'.$this->name.'u" name="s_'. $this->name .'[u]" value="1" ' . (substr($currentsetting,0,1) == '1' ? 'checked="checked"' : '') . ' /></div></td>' .
+        '<td><div align="center"><input type="checkbox" class="form-checkbox" id="id_s_'.$this->name.'m" name="s_'. $this->name .'[m]" value="1" ' . (substr($currentsetting,1,1) == '1' ? 'checked="checked"' : '') . ' /></div></td>' .
+        '<td><div align="center"><input type="checkbox" class="form-checkbox" id="id_s_'.$this->name.'t" name="s_'. $this->name .'[t]" value="1" ' . (substr($currentsetting,2,1) == '1' ? 'checked="checked"' : '') . ' /></div></td>' .
+        '<td><div align="center"><input type="checkbox" class="form-checkbox" id="id_s_'.$this->name.'w" name="s_'. $this->name .'[w]" value="1" ' . (substr($currentsetting,3,1) == '1' ? 'checked="checked"' : '') . ' /></div></td>' .
+        '<td><div align="center"><input type="checkbox" class="form-checkbox" id="id_s_'.$this->name.'r" name="s_'. $this->name .'[r]" value="1" ' . (substr($currentsetting,4,1) == '1' ? 'checked="checked"' : '') . ' /></div></td>' .
+        '<td><div align="center"><input type="checkbox" class="form-checkbox" id="id_s_'.$this->name.'f" name="s_'. $this->name .'[f]" value="1" ' . (substr($currentsetting,5,1) == '1' ? 'checked="checked"' : '') . ' /></div></td>' .
+        '<td><div align="center"><input type="checkbox" class="form-checkbox" id="id_s_'.$this->name.'s" name="s_'. $this->name .'[s]" value="1" ' . (substr($currentsetting,6,1) == '1' ? 'checked="checked"' : '') . ' /></div></td>' .
         '</tr></table>';
 
         return format_admin_setting('backupdays', $this->name, $this->visiblename, $return, $this->description);
@@ -2268,13 +2268,13 @@ class admin_setting_special_calendar_weekend extends admin_setting {
         get_string('monday', 'calendar') . '&nbsp;&nbsp;</div></td><td><div align="center">&nbsp;&nbsp;' . get_string('tuesday', 'calendar') . '&nbsp;&nbsp;</div></td><td><div align="center">&nbsp;&nbsp;' .
         get_string('wednesday', 'calendar') . '&nbsp;&nbsp;</div></td><td><div align="center">&nbsp;&nbsp;' . get_string('thursday', 'calendar') . '&nbsp;&nbsp;</div></td><td><div align="center">&nbsp;&nbsp;' .
         get_string('friday', 'calendar') . '&nbsp;&nbsp;</div></td><td><div align="center">&nbsp;&nbsp;' . get_string('saturday', 'calendar') . '&nbsp;&nbsp;</div></td></tr><tr>' .
-        '<td><div align="center"><input type="checkbox" id="id_s_'.$this->name.'u" name="s_'. $this->name .'[u]" value="1" ' . ($currentsetting['u'] ? 'checked="checked"' : '') . ' /></div></td>' .
-        '<td><div align="center"><input type="checkbox" id="id_s_'.$this->name.'m" name="s_'. $this->name .'[m]" value="1" ' . ($currentsetting['m'] ? 'checked="checked"' : '') . ' /></div></td>' .
-        '<td><div align="center"><input type="checkbox" id="id_s_'.$this->name.'t" name="s_'. $this->name .'[t]" value="1" ' . ($currentsetting['t'] ? 'checked="checked"' : '') . ' /></div></td>' .
-        '<td><div align="center"><input type="checkbox" id="id_s_'.$this->name.'w" name="s_'. $this->name .'[w]" value="1" ' . ($currentsetting['w'] ? 'checked="checked"' : '') . ' /></div></td>' .
-        '<td><div align="center"><input type="checkbox" id="id_s_'.$this->name.'r" name="s_'. $this->name .'[r]" value="1" ' . ($currentsetting['r'] ? 'checked="checked"' : '') . ' /></div></td>' .
-        '<td><div align="center"><input type="checkbox" id="id_s_'.$this->name.'f" name="s_'. $this->name .'[f]" value="1" ' . ($currentsetting['f'] ? 'checked="checked"' : '') . ' /></div></td>' .
-        '<td><div align="center"><input type="checkbox" id="id_s_'.$this->name.'s" name="s_'. $this->name .'[s]" value="1" ' . ($currentsetting['s'] ? 'checked="checked"' : '') . ' /></div></td>' .
+        '<td><div align="center"><input type="checkbox" class="form-checkbox" id="id_s_'.$this->name.'u" name="s_'. $this->name .'[u]" value="1" ' . ($currentsetting['u'] ? 'checked="checked"' : '') . ' /></div></td>' .
+        '<td><div align="center"><input type="checkbox" class="form-checkbox" id="id_s_'.$this->name.'m" name="s_'. $this->name .'[m]" value="1" ' . ($currentsetting['m'] ? 'checked="checked"' : '') . ' /></div></td>' .
+        '<td><div align="center"><input type="checkbox" class="form-checkbox" id="id_s_'.$this->name.'t" name="s_'. $this->name .'[t]" value="1" ' . ($currentsetting['t'] ? 'checked="checked"' : '') . ' /></div></td>' .
+        '<td><div align="center"><input type="checkbox" class="form-checkbox" id="id_s_'.$this->name.'w" name="s_'. $this->name .'[w]" value="1" ' . ($currentsetting['w'] ? 'checked="checked"' : '') . ' /></div></td>' .
+        '<td><div align="center"><input type="checkbox" class="form-checkbox" id="id_s_'.$this->name.'r" name="s_'. $this->name .'[r]" value="1" ' . ($currentsetting['r'] ? 'checked="checked"' : '') . ' /></div></td>' .
+        '<td><div align="center"><input type="checkbox" class="form-checkbox" id="id_s_'.$this->name.'f" name="s_'. $this->name .'[f]" value="1" ' . ($currentsetting['f'] ? 'checked="checked"' : '') . ' /></div></td>' .
+        '<td><div align="center"><input type="checkbox" class="form-checkbox" id="id_s_'.$this->name.'s" name="s_'. $this->name .'[s]" value="1" ' . ($currentsetting['s'] ? 'checked="checked"' : '') . ' /></div></td>' .
         '</tr></table>';
 
         return format_admin_setting('calendarweekend', $this->name, $this->visiblename, $return, $this->description);
@@ -2308,7 +2308,7 @@ class admin_setting_special_perfdebug extends admin_setting_configcheckbox {
             $currentsetting = $this->get_setting();
         }
 
-        $return = '<input type="checkbox" size="50" id="id_s_'.$this->name.'" name="s_'. $this->name .'" value="1" ' . ($currentsetting == 15 ? 'checked="checked"' : '') . ' />';
+        $return = '<input type="checkbox" size="50" class="form-checkbox" id="id_s_'.$this->name.'" name="s_'. $this->name .'" value="1" ' . ($currentsetting == 15 ? 'checked="checked"' : '') . ' />';
         return format_admin_setting('checkbox', $this->name, $this->visiblename, $return, $this->description);
     }
 
@@ -2470,7 +2470,7 @@ function apply_default_exception_settings($defaults) {
 
 function format_admin_setting($class, $name, $title='', $form='', $description='') {
     return "\n".
-           '<div class="adminsetting form-'.$class.'">'."\n".
+           '<div class="form-item admin-'.$class.'">'."\n".
            '<label for="id_s_'.$name.'">'.$title."\n".
            '   <span class="form-shortname">'.$name.'</span>'."\n".
            '</label>'."\n".
index ef60e789e3a930f4817b804afef5979718e8c206..a39831fc7f754213ef990bcaa4784f349b4d18a6 100644 (file)
@@ -3600,7 +3600,7 @@ function print_textarea($usehtmleditor, $rows, $cols, $width, $height, $name, $v
             }
         }
     }
-    $str .= '<textarea id="edit-'. $name .'" name="'. $name .'" rows="'. $rows .'" cols="'. $cols .'">';
+    $str .= '<textarea class="form=textarea" id="edit-'. $name .'" name="'. $name .'" rows="'. $rows .'" cols="'. $cols .'">';
     if ($usehtmleditor) {
         $str .= htmlspecialchars(stripslashes_safe($value)); // needed for editing of cleaned text!
     } else {
index 4974eb3c78fb1312ad9bff2ebf482256a3e4a423..da126ea46e8bec754365477fce9b39ebf256c4e0 100644 (file)
@@ -489,7 +489,7 @@ fieldset.adminsettings .description {
     margin: 10px 0 0 160px;
 }
 
-.form-text input {
+.form-text {
     width: 20em;
 }
 .form-textarea { }