Updates for better CSS hooks

This commit is contained in:
moodler
2006-09-25 08:20:14 +00:00
parent 0462b3589e
commit afee986420
4 changed files with 33 additions and 33 deletions
+30 -30
View 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".